5.4. State Machines 165
“the impossible”):
15 14 13 12
11 10 9 8
7 6 5 4
3 2 1
A state machine model of the puzzle has states consisting of a 4 4 matrix with
16 entries consisting of the integers1;:::;15as well as one “empty” entry—like
each of the two arrays above.
The state transitions correspond to exchanging the empty square and an adjacent
numbered tile. For example, an empty at position.2;2/can exchange position with
tile above it, namely, at position.1;2/:
n 1 n 2 n 3 n 4
n 5 n 6 n 7
n 8 n 9 n 10 n 11
n 12 n 13 n 14 n 15