×

# Milk Containers Puzzle - Hardest Logic Puzzle Problem I ever faced.

In India, everyday the morning train is overloaded with a lot of milk cans hanged on the windows as you can see above. The five persons named BHEEM, KABIR, TULSI, KAALI, and ZAKIR, who were great planners, planned to steal milk from the bypassing train.So one of them was already in the train. He, then, pulled the chain to stop the train and the other four were already standing at the place of event. The train stopped and all the five ran away by stealing one can each. Finally, they escaped and reached at the safe place. What they found is that they stole $$3$$ cans of $$32 L$$ each, one can of $$24 L$$ and one can of $$7 L$$. They got disappointed when they found that only the can of $$32 L$$ each are full of milk, while that of $$24 L$$ and $$7 L$$ are totally empty.

So they decided to divide the milk into the five. The two, who brought the empty cans with them, will get smaller amount of milk than the rest three.So $$3$$ persons, who stole cans with milk, will get $$24 L$$ each, while the two, who stole empty cans, will get $$24 L$$ together (12 L each). For that, they decided to equally divided the milk into the four cans (three cans of $$32 L$$ and one can of $$24L$$).

There are five containers of milk, lets name them : $\color{green}{A \rightarrow \text{Container with 32 L capacity} \\ B \rightarrow \text{Container wit 32 L capacity} \\ C \rightarrow \text{Container with 32 L capacity} \\ D \rightarrow \text{Container with 24 L capacity} \\ E \rightarrow \text{Container with 7 L capacity}}$

Initial Situation : The containers $$A,B,C$$ are having $$32 L$$ of milk in each of them, and the containers $$D$$ and $$E$$ are empty.

Final Situation to be reached : Container$$A$$, container $$B$$, container $$C$$ and container $$D$$ are having $$24 L$$ of milk each and container $$E$$ is empty.

Conditions : (How to reach the Final Situation)

1. You have to transfer the milk from one container to the other(s) to achieve the Final Situation.

2. You can only use the given containers i.e. Container $$A$$, container $$B$$ , container $$C$$, container $$D$$ and container $$E$$ for the purpose of measuring and transferring.

3. Obviously, you aren't supposed to use the approximations of the milk and the containers. So, the measure must be exact.

4. You're supposed to be perfect in the job of measuring and transferring milk (:P). So you don't let even a single drop of milk wasted in the whole process while transferring the milk from one container to the other(s).

What steps you will take to reach the Final Situation ?

Please post your solution step by step.

enjoy

$\Large \text{Thanks !}$

Note by Sandeep Bhardwaj
1 year, 4 months ago

## Comments

Sort by:

Top Newest

A generic approach for solving such problems would be to first define a directed graph $$\mathcal{G}(V,E)$$ with $$V$$ being the set of all $$5$$-tuples $$(a_1,a_2,a_3,a_4,a_5), 0\leq a_i \leq C_i, a_i \in \mathbb{Z}_+$$, with $$C_i$$ being the capacities of the containers (here $$32,32,32,24,7$$ respectively). Then from each vertex $$v\in V$$ we define at most $$2\times\binom{5}{2}=20$$ directed edges, each one pointing to a vertex corresponding to selecting two containers in $$v$$ and transferring the content from the first to the second until the first one becomes empty or the second one becomes full. The definition of $$\mathcal{G}$$ is now complete. Now the problem becomes finding a shortest path from the initial situation to the final situation (if there is any). · 1 year, 4 months ago

Log in to reply

So can you find the shortest path using graph theory ? · 1 year, 4 months ago

Log in to reply

Yes, e.g., by a Breadth First Search. · 1 year, 4 months ago

Log in to reply

Sir I also have a logical problem which is as follows

3 friends went to eat burger in McDonalds.They had a total combined 75rs. The cost of each burger is 25rs but as they were happy hour customer they got a discount of 5rs.So they gave 2rs tip to the waiter and distributed the remaining 3rs among them.Money spent by each of them-(25-1)=24rs. They calculated how much money they had spent which is as follows

Money spent by each person=24rs*3

Tip given=2rs

Total comes out to be 24*3=72+2=74

But they had brought 75rs.So where did 1rs go???

P.S Don't try to find out grammatical mistakes.. · 1 year, 4 months ago

Log in to reply

75 Rs =70 Rs ( McDonal expense) + 2 Rs (tip to the waiter) + 3 Rs (back to 3 friends)

You're trying to troll the audience by adding the different quantities. · 1 year, 4 months ago

Log in to reply

How r they different quantities I have just added the total expense by each person and their mutual expense · 1 year, 4 months ago

Log in to reply

Total Money = Money spent + Money left

$$\implies$$ Rs 75 ( total money) = Rs 72 ( Money spent : 70 - McDonald account, 2- tip to the waiter) + Rs 3 (Money left i.e. the money returned to them)

I mean to say different quantities is that you're trying to say : Total money=Money spent by them + Money in account's waiter. But there is no relation of money spent by them and the money in the waiter's account. The tip to the waiter is just a part of their money spent. · 1 year, 4 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...