Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Show HN: Water Pouring Problem Simulation | Better HN
Show HN: Water Pouring Problem Simulation
(fyquah.me)
23 points · by
fyquah95
· 10y ago · 7 comments
Comments
[–]
thecynh
10y 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
[–]
fyquah95
OP
10y ago
Adding this video to the page, thanks for sharing!
[–]
33a
10y ago
You can solve this problem faster using the extended Euclidean algorithm.
[–]
fyquah95
OP
10y ago
Does the algorithm yield the exact path to the target volume?
[–]
jfroma
10y ago
It will be nice to have a list with all steps at the end
[–]
bbcbasic
10y ago
Intuitively, to be possible I think the target amount has to be divisible by the gcf of the two jugs.
[–]
fuzzythinker
10y ago
Thought it is real water pouring simulation..