Consider first the subproblem of moving all but the nth disk from peg a to another peg using the third as ``temporary storage.''