Week 57 of 145 ยท TAOCP Vol 1: Fundamental Algorithms

TAOCP 2.3.3 Other Representations of Trees

2 tasks, 5 steps. Open a task's steps to see exactly what to do; each guide has the detail.

Sign up or sign in to tick these off and give this week a due date.

By the end of this week you can

  • Recognize sequential tree layouts in preorder or level order with tags.
  • Implement the equivalence algorithm with parent links that finds roots first.
  • Use parent-link trees to decide whether two items are equivalent.

Week 57 ยท Self-check

Three quick questions

Ungraded, and it never holds anything up. Pick an answer to see why.

  1. Items 1 to 5 have PARENT(2) = 1, PARENT(3) = 1 and PARENT(4) = 2, and 1 and 5 are roots. Which two items are equivalent?
  2. To process a new relation j = k, what does Knuth's equivalence algorithm do?
  3. A tree is stored with parent links only. Which question is cheap to answer?

Nothing is saved while signed out.

Discussion

0 posts

Stuck on week 57, or finished early? Say what you tried and what happened. Hints over answers: full solutions go in a spoiler.

No posts yet. Ask a question or share a tip.

Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Spot a mistake? Report it