1/5
Tower of Hanoi
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Dual Color ToH
the variation: ring n is only flipped once while the remaining rings are moved evenly making n non-uniform
uniformity: think, how can i achieve the same parity in movements for ring n and n-1
Standard ToH
think: where should ring n go and when?
do not plan, but use physical modeling and n-1 solver to solve n
Disordered ToH
think: where is ring n and where is it going?
variation: if n is on pole A or C, the prior n-1 rings must be sent to the opposite pole
Circular ToH
think: how many jumps are needed for ring n to go from pole A to B?
use co-recursion to formulate the necessary jumps between A,B,and C (ex: A to B, B to C, C to B, B to A, etc)
Corecursion
two recursive functions that refer to one another
think: circular ToH
Program Invariant
think: assertion A was true at this point; when it is no longer true, the following steps must be taken until it is