Approaches to AI 8

Water jug puzzle: An eight-liter jug is filled with water, you are required to divide it into 4 + 4 liters. You may use two empty jugs of size 5 and 3 liters for this purpose. There is no other way of measuring water except by the size of the jugs, i.e., one can either empty a jug into another or fill another jug to its brim

Model this puzzle as a state-space search problem. A state is represented by a tuple (A,B,C), where A is the amount of water in 8L jug, B is the amount of water in 5L jug and C is the amount of water in 3L jug.
The initial state is (8,0,0), if you transfer water from 8L jug to 5L jug we reach (3,5,0) state, and if you transfer the remaining water from 8L jug to 3L jug we reach (0,5,3) state. Now we can reverse these two transfers. The state-space expresses all valid states and their transitions. Build the state-space to answers the following questions.

0. Which of the following is true about the state-space of water jug puzzle?
1. State-space is reversible
2. Every state is reachable from every other state
3. All eight volumes from 1L to 8L are measurable
4. There is at least one state that has no outgoing edge
5. There is at least one state that has no incoming edge

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *