Erich Prisner

Wolf, goat, cabbage: Moving with State Graph Map

Here you can play and see the state graph at the same time. That makes the journey much easier and safer. In the If the boat is empty, the vertex of the state graph corresponding to the present state is surrounded by a green circle. the target state is always surrounded by a yellow circle. A state with encoding (x0,x1, x2, ..., xn) will be represented by the number x1 * 2n-1 + x2 * 2n-2+ ...+ xn-1*2 + xn. Since the graph is bipartite, we don't need x0--- it follows from the surrounding. Conversely, you can find the encoding (except x0) by taking the binary representation of the number shown in the state graph.

Note that you can modify the drawing of the state graph. Click close to a vertex, the vertex will be colred red. Then click on the white area where you want this vertex to be. The applet uses part of a Java program called GO I wrote during a DFG project for dealing with graph operators.

Try the previous examples of various difficulties:

 
Difficulty red-box boat size left --> right left <-- right number of moves probabilities
1 0 1 A,E,I 7 1:2 1:72
2 0 2 A,E,I,M,Q 7 1:84 1:240
3 2 2 B,E,J,R,F,F 9 1:533 1:4686
4 2 3 HO,F,J,K,M,E(4th row),O,P,R 9    
5 2 2 B,G,I,O,R,F,F A,J 15    
6 1 2 HO,G,L,E (2nd row),O,T H,P
impossible
7 1 2 B,D,E,G,D,L,M,R,S,V A,BR,Q 21    
8 1 2 B,D,E,G,I,M,HUW,O,U,X H,BR,W 19    

Unfortunately your browser does not support Java applets.

Changing Sides,
Challenges,


Erich Prisner, 2002-2004