We are trying to solve variant of the n-peg Tower of Hanoi problem. There can be limitations on possible moves among the pegs. In the graph vertices are pegs, and an edge from vertex to another tells us we can move a disk from the first peg to the other.
We need to find out what are the necessary and sufficient conditions the graph must have so that the problem of Hanoi can be solved, and if there is an algorithm for solving it.
Help will be much appreciated.