HWx1 Concepts

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/5

flashcard set

Earn XP

Description and Tags

Tower of Hanoi

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

6 Terms

1
New cards

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

2
New cards

Standard ToH

think: where should ring n go and when?

do not plan, but use physical modeling and n-1 solver to solve n

3
New cards

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

4
New cards

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)

5
New cards

Corecursion

two recursive functions that refer to one another

think: circular ToH

6
New cards

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