I am not sure which graph the problem statement talks about, but I guess the vertices are states of the system. If so, then there are 10 vertices (m, c) where 0 ≤ c ≤ m ≤ 3 and m, c represent the number of missionaries and cannibals, respectively, on one bank (the number of missionaries and cannibals on the other bank is then uniquely determined). There is an edge from v1 to v2 if there is a way to convert v1 into v2 by crossing the river.