There are three pegs p1, p2 and p3. k disks of different sizes are all placed on peg p1 according to decreasing diameter (the largest one is at the bottom, the smallest one is at the top). Disks can be moved from one peg to another, one disk at a time, subject to the following constraints:
OUTPUT: a sequence of moves accomplishing the task.
DATA SETS: no data sets are needed
NOTES: