Table of contents

The Two Water Jug Puzzle – Measure 4 Liters with Logic

The Two Water Jug Puzzle is one of the most classic and popular logic problems. It tests your ability to plan, reason, and think systematically. The puzzle involves two jugs of different sizes and the task of measuring an exact amount of water using only these jugs with no measuring cups or other tools.

At first glance, it seems impossible. But with the right sequence of steps, logic, and careful thinking, the puzzle can be solved easily. This challenge is often seen in aptitude tests, coding interviews, and competitive exams to assess problem-solving skills.

Two-Water-Jug-Puzzle

Two Water Jug Puzzle Setup and Rules

Here’s how the puzzle is set up:

  • Jug A can hold exactly 3 liters of water.
  • Jug B can hold exactly 5 liters of water.
  • There is an unlimited water supply available.
  • You can fill, empty, or pour water between the jugs.
  • The goal: Measure exactly 4 liters of water using only these two jugs.

The question:
How can you get exactly 4 liters without any markings or extra measuring tools?

How to Solve the Two Water Jug Puzzle

The secret to solving this puzzle lies in transferring water between the jugs in such a way that their remaining capacities give you the exact required amount. You’ll use a logical sequence of filling, pouring, and emptying steps.

Let’s go through the full step-by-step method.

Step 1: Fill the 5-Liter Jug (Jug B)

Fill Jug B completely from the water source.

Jug A: 0 liters
Jug B: 5 liters

Step 2: Pour from Jug B into Jug A

Pour water from Jug B into Jug A until Jug A is full.

Since Jug A can hold 3 liters, it takes 3 liters from Jug B.

Jug A: 3 liters
Jug B: 2 liters

Step 3: Empty Jug A

Now empty Jug A completely.

Jug A: 0 liters
Jug B: 2 liters

Step 4: Transfer Water from Jug B to Jug A

Pour the remaining 2 liters from Jug B into Jug A.

Jug A: 2 liters
Jug B: 0 liters

Step 5: Refill Jug B

Fill Jug B to its full capacity again (5 liters).

Jug A: 2 liters
Jug B: 5 liters

Step 6: Pour Water from Jug B into Jug A

Pour from Jug B into Jug A until Jug A is full.
Since Jug A already has 2 liters, it can take only 1 more liter.

Jug A: 3 liters
Jug B: 4 liters

Now, Jug B contains exactly 4 liters of water your target amount!

Final Answer – Measured 4 Liters Successfully

To measure exactly 4 liters of water:

  1. Fill the 5-liter Jug B completely.
  2. Pour from Jug B into Jug A until Jug A is full.
  3. Empty Jug A.
  4. Pour the remaining water from Jug B into Jug A.
  5. Refill Jug B completely.
  6. Pour from Jug B into Jug A until Jug A is full.

After these steps, Jug B will have exactly 4 liters of water.

Visual Summary:

StepActionJug A (3L)Jug B (5L)
1Fill Jug B fully05
2Pour from B → A32
3Empty Jug A02
4Pour remaining B → A20
5Fill Jug B again25
6Pour from B → A34

Result: Jug B = 4 liters

Mathematical Explanation – The Logic Behind It

This puzzle uses a concept from number theory, the greatest common divisor (GCD). If you have two jugs with capacities m and n, you can measure any quantity that is a multiple of GCD(m, n).

Here:

  • Jug A = 3 liters
  • Jug B = 5 liters
  • GCD(3, 5) = 1

Since 1 divides 4, it’s possible to measure 4 liters using these two jugs.
The trick is in finding the right sequence to achieve that volume as shown above.

This puzzle is loved for its simplicity and logic. It’s a timeless example of how math and problem-solving work together. It’s widely used in:

  • Tech interviews (Google, Amazon, Microsoft)
  • Competitive exams and logical reasoning tests
  • Math and physics challenges
  • IQ puzzles and brain teasers

It’s even featured in popular movies like Die Hard with a Vengeance, where Bruce Willis’s character solves this very puzzle to defuse a bomb.

Similar Logic Puzzles with Answers

If you enjoyed the Two Water Jug Puzzle, here are a few other logic puzzles that test your reasoning skills in similar ways:

1. The River Crossing Puzzle – Farmer, Goat, Wolf, and Cabbage

Setup: A farmer must carry a wolf, goat, and cabbage across a river without leaving dangerous pairs together.
Answer: Take the goat first, return alone, take the wolf, bring goat back, take cabbage, and finally take goat again.

2. The 100 Prisoners Hat Puzzle – Teamwork and Parity

Setup: 100 prisoners must guess their hat colors (red or black) to survive.
Answer: Using parity logic, 99 survive for sure, and sometimes all 100.

3. The Blue Eyes Puzzle – Logic on an Island

Setup: People on an island discover someone has blue eyes.
Answer: If n people have blue eyes, all leave on the nth night.

4. The Monty Hall Problem – Probability Trick

Setup: Pick one of three doors; one hides a car. The host reveals a goat. Should you switch?
Answer: Yes, switching gives you a 2/3 chance of winning.

5. The Two Doors Riddle – Truth and Lies

Setup: Two guards, one lies and one tells truth. You must find the safe door.
Answer: Ask either guard, “If I asked the other guard which door leads to freedom, what would he say?” Then take the opposite door.

Puzzles

Related Articles