How Do You Solve a 3 Jug Problem?

Explore expert answers regarding How Do You Solve a 3 Jug Problem.

Again, fill the 3-litter jug with water and pour into 5 litre jug (Now 5 litter Jug contains 5 litre water and 3 litre jug contains 1 litre water. Empty 5 litre jug and pour 1 litre water from 3 litre jug (now, 5 litre jug contains 1 litre water) Again, fill 3 litre jug and pour it into 5 litre jug (Now 5 litre jug contains 4 litre water)

How big is the water jug in Die Hard 3?

You’ve got to defuse a bomb by placing exactly 4 gallons (15 L) of water on a sensor. The problem is, you only have a 5 gallon (18.9 L) jug and a 3 gallons (11 L) jug on hand! This classic riddle, made famous in Die Hard 3, may seem impossible without a measuring cup, but it is actually remarkably simple.

How to measure jug J1 of 5 liters?

For example, if we have a jug J1 of 5 liters (n = 5) and another jug J2 of 3 liters (m = 3) and we have to measure 1 liter of water using them. The associated equation will be 5n + 3m = 1. First of all this problem can be solved since gcd (3,5) = 1 which divides 1 (See this for detailed explanation).

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest