#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 1::2.3.3 Other Representations of Trees
#columns:Front	Back	Tags
TAOCP §2.3.3 Other Representations of Trees: what does it cover?	Alternative ways to store trees: sequential layouts in preorder or level order with tags or degrees, parent links only, and triply linked trees. It covers evaluating a function bottom-up over a tree, the algorithm for processing equivalence relations by keeping trees with parent pointers (the ancestor of union-find), and adding polynomials stored as trees.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::about
TAOCP §2.3.3: why does it matter?	Union-find is a workhorse (Kruskal's algorithm, connected components, type inference). Compact tree encodings matter for serialization and succinct data structures.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::why
TAOCP §2.3.3: what traps should you watch for?	<ul><li>Forgetting to find the roots before linking two trees.</li></ul>	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::traps
TAOCP §2.3.3, exercise 1 (rated 20, recommended): what is it asking?	Decide whether the left links can be rebuilt from a level-order layout with tags only.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 4 (rated 18): what is it asking?	Count the wasted null links and compare representations.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 6 (rated 24, recommended): what is it asking?	Fill in child and sibling links when only parent links exist.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 8 (rated 15): what is it asking?	Use the equivalence forest to answer whether two items are equivalent.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 9 (rated 20): what is it asking?	Trace the equivalence algorithm on the text's input.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 11 (rated 24, recommended): what is it asking?	Handle Fortran-style EQUIVALENCE declarations with the tree method.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 17 (rated 25, recommended): what is it asking?	Evaluate a top-down attribute over a tree stored sequentially.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3, exercise 10 (rated 28): what is it asking?	Fix the equivalence algorithm's quadratic worst case. The stretch: you will reinvent part of union-find.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercise
TAOCP §2.3.3: how many exercises, and how are they rated?	19 exercises, rated 15 to 40.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::exercises
TAOCP §2.3.3: what should you be comfortable with first?	<ul><li>2.3.2 Binary Tree Representation of Trees</li></ul>	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::prereqs
TAOCP §2.3.3: how should you work through it?	Implement the equivalence algorithm with parent pointers, then add path compression and union by size yourself and measure the speedup. The sequential representations are quick reads.	cracked.guide cracked.guide::phase::taocp-1 cracked.guide::section::2.3.3 cracked.guide::kind::approach
