Generalized version of Simon's problem (Die Hard With A Vengeance) and its solution.
In the "Die Hard With a Vengeance" movie, a bomber named Simon Says was terrorizing the city. One policeman (McClane) and an electrician (Zeus Carver) were exposed to a different type of torture. They had to solve Simon's increasingly difficult logical tasks. Luckily, they were good matematicians and so they saved the world!
One of the Simon's problem was to disarm the suitcase-bomb by placing exactly 4 gallons of water on the scale in the suitcase. But, McClane and Zeus were equiped with just two jugs of 5 and 3 gallons respectively.
I've been thinking a bit... What happens if McClane (and Zeus, eventually) find themself in a similar situation again? The Simon is dead now, but - what happens if an another Simon provides (for example) jugs of 15 and 10 gallons asking exactly 8 gallons for disarming the bomb?!
I want to be useful and so I've decided to help! I've made a small python program as an optimal general solution for whichever water-overbrimming problem.