How not to Die Hard with Math
Why Mathematics Stack Exchange recommends it
Mathematics Stack Exchange users link it when asked for a general, visual method for water-jug and bucket-pouring puzzles, including graph-theory approaches.
Recommended by 1 people across 1 different months, 2015 to 2020.
What it is
Mathologer walks through a graph-based method for solving the Die Hard 3 water-jug puzzle, where two jugs of different sizes must yield an exact amount of water. It shows how to turn the pouring moves into a path on a lattice or billiard-style diagram and read off the solution. Short animated explainer from the Mathologer channel.
Cited in 1 Wikipedia article, including Water pouring puzzle.
What people said
Recommends Alexander Glulkhovtsev · 2015-08 · Mathematics Stack Exchange · on “Is there a general solution to the water-bucket logic problem?”
You can look How not to Die Hard with Math [this video] or Lecture 7.5 - Case Study: the Water Pouring Problem (31:45) [LINK] and, for example, corresponding GithubGist [Scala: water pouring problem solution]gist.github.com /hanbzu /7302266 "concise & clear code"
Cites Jeff007 · 2019-03 · Mathematics Stack Exchange · on “General solution to water jug problem with limited amount of water”
The Problem goes as follows: There are 3 water containers of different sizes: 10 liters, 7 liters, and 3 liters. If we start by having 10 liters of water in the 10 liters container, and There is only 10 liters of water , you can’t spill it and you can’t get anymore water. The only allowed operation is: fill water from one container to the other until the first one is empty or the other one is full What is the minimum number of times you have to pour in order to get 5 liters of water in one container. Apparently the answer is 8 times: (x,y,z) = (water in 10 liters container, 7 liters, 3 liters) starting with (10,0,0) (3,7,0) (3,4,3) (6,4,0) (6,1,3) (9,1,0) (9,0,1) (2,7,1) (2, 5 ,3) The Questi
Cites Hamio Jiang · 2020-03 · Mathematics Stack Exchange · on “A variant "3 jugs problem" requires its general proof of non-existence of its solution.”
Here is a bank interview question: You have 3 bottles (or jugs whatever) which have 8, 8 and 3 liters volume. Initially, you have those 2 8-liter bottles filled. Now you are supposed to pour the water equally to 4 people. The poured water cannot return. How to achieve that? That is to say, initially, I have (8,8,0) for my bottles which have 8, 8, 3 liters volume respectively. Eventually, I would give each of these people 4 liters. I have figured out that there is NO such a solution but using the enumeration algorithm which is not beautiful to me. I just wonder whether there is any mathematic-ish solution to this problem. Like How not to Die Hard with Math [this video] , it uses graph theory to do