We assume that a state can be represented by the state of the left bank (say) and the state of the right bank. The states of the bank can be represented by the number of missionaries, the number of cannibals and the location of the boat - i.e. we represent the initial state as [[3m,3c,1b],[0m,0c,0b]] (three missionaries and three cannibals and a boat on the left bank and nothing on the right bank.
What are the operators? We can represent all operations with ten
operators. 2m0c, 1m1c
0m2c
, 1m0c
, 0m1c
,
2m0c,
1m1c,
0m2c,
1m0c,
0m1c.