Water Jug Problem in AI You are given two jugs whose capacity are 5 litre and 3 litre. No jugs have any measuring marks on it. You have one source of water. How can you measure 4 litre of water in 5 litre jug ?
Empty the small jug.
Fill the large jug.
Use the large jug to fill the small jug. This leaves 2L in the large jug and 3L in the small jug.
Empty the small jug.
Use the large jug to fill the small jug. This leaves 0L in the large jug and 2L in the small jug.
Fill the large jug.
Use the large jug to fill the small jug. This leaves 4L in the large jug and 3L in the small jug.