Y
Hacker News
new
|
ask
|
show
|
jobs
Show HN: Water Pouring Problem Simulation
(
fyquah.me
)
23 points
by
fyquah95
3508 days ago
5 comments
thecynh
3507 days ago
I wonder how many people tried the "5 and 3 gallon canister, target is 4 gallons" from Die Hard 3 … I know I did!
Context:
https://www.youtube.com/watch?v=BVtQNK_ZUJg
link
fyquah95
3507 days ago
Adding this video to the page, thanks for sharing!
link
33a
3507 days ago
You can solve this problem faster using the extended Euclidean algorithm.
link
fyquah95
3507 days ago
Does the algorithm yield the exact path to the target volume?
link
jfroma
3507 days ago
It will be nice to have a list with all steps at the end
link
bbcbasic
3506 days ago
Intuitively, to be possible I think the target amount has to be divisible by the gcf of the two jugs.
link
fuzzythinker
3507 days ago
Thought it is real water pouring simulation..
link
Context: https://www.youtube.com/watch?v=BVtQNK_ZUJg