1.(x, y)→(4, y) if x<4 4="" div="" fill="" ifx="" it="" nbsp="" remains="" to="" unchanged="" y="">4>
2.(x, y)→(x, 3)if y<3 3="" div="" fill="" ify="" it="" nbsp="" remains="" to="" unchanged="" x="">3>
3.(x, y)→(x −d, y) if there is some water in 4 Lt jug, drop
if x >0some more water from it
4.(x, y)→(x, y −d) if there is some water in 3 Lt jug, drop ify >0some more water from it
5. (x, y)→(0, y) if there is some water in 4-Lt, empty it, y remains unchanged ifx >0
6.(x, y)→(x, 0) if there is some water in 3-Lt, empty it, x remains unchanged ify >0
7.(x, y)→(4, y −(4 −x)) if there is some water in 3-Lt, the sum of ifx +y ≥4,y >0 water of 4-Lt and 3-Lt jug is >=4, then fill water in 4-Lt jug to its capacity from 3-Lt jug
8.(x, y)→(x −(3 −y), 3) same as 7 with suitable change in x,y ifx +y ≥3,x >0
9. (x, y)→(x +y, 0) if sum of water in both jugs <=4, then drop ifx +y ≤4,y >0 whole water from 3-Lt into 4-Lt
10.(x, y)→(0, x +y) if sum of water in both jugs <=3, then drop ifx +y ≤3,x >0whole water from 4-Lt into 3-Lt
11.(0, 2)→(2, 0) Transfer 2-Lt from 3-Lt jug into empty 4-Lt jug
12.(2, y)→(0, y) Empty 2 Lt water onto ground from 4-Lt jug without disturbing 3 Lt jug
Solution of Water Jug Problem Obviously to solve water jug problem, we can perform following sequence of actions, (0,0) (0,3) (3,0) (3,3) (4,2) (0,2) (2,0) By applying rules 2,9,2,7,5 and 9 with initial empty jugs
Remember: There is NO hard and fast rules to follow this sequence. In any state space search problem, there can be numerous ways to solve, your approach can be different to solve a problem and sequence of actions too.
State Space Search Other problems
1. Cannibals and missionaries problems: In the missionaries (humans)and cannibals (human eaters) problem, three missionaries and three cannibals must cross a river using a boat which can carry at most two people. At any time number of cannibals on either side should not be greater than number of missionaries otherwise former will eat latter. Also The boat cannot cross the river by itself with no people on board.
2. Tower of Hanoi Problem: It consists of three pegs, and a number of disks ( usually 60) of different sizes which can slide onto any peg. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallestat the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:
Only one disk must be moved at a time.
Each move consists of taking the upper disk from one of the rodsand sliding it onto another rod, on top of the other disks that may already be present on that rod.
No disk may be placed on top of a smaller disk.
3. Monkey Banana Problem: A monkey is in a room. A bunch of bananas is hanging from the ceiling and is beyond the monkey's reach. However, in the room there are also a chair and a stick. The ceiling is just the right height so that a monkey standing on a chair could knock the bananas down with the stick. The monkey knows how to move around, carry other things around, reach for the bananas, and wave a stick in the air. What is the best sequence of actions for the monkey?