#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4B::7.2.2.1 Dancing Links (part 4)
#columns:Front	Back	Tags
TAOCP §7.2.2.1 Dancing Links (part 4): what does it cover?	Part 4 covers pages 98 to 123 of 7.2.2.1, mostly starred material. It analyzes Algorithm X's running time (strict exact cover, the extreme problem with Bell-like counts, matching problems), explains why choosing the item to branch on matters (maintaining focus), uses bipairs for local equivalence and symmetry breaking, and preprocesses options to remove useless ones (Algorithm P). Then it finds minimum-cost solutions with cost cutoffs (Algorithms X$ and C$), builds a ZDD of all solutions at once (Algorithm Z), and closes with a summary and historical notes.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::about
TAOCP §7.2.2.1 (part 4): why does it matter?	This is where you see how far one data structure trick can go, and how modeling a problem well matters more than raw speed.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::why
TAOCP §7.2.2.1 (part 4): what is Algorithm P about?	Preprocesses options to remove useless ones.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::algorithm
TAOCP §7.2.2.1 (part 4): what is Algorithm Z about?	Builds a ZDD of all solutions at once.<div class="cg-dim cg-ctx">Then it finds minimum-cost solutions with cost cutoffs (Algorithms X$ and C$), builds a ZDD of all solutions at once (Algorithm Z), and closes with a summary and historical notes.</div>	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::algorithm
TAOCP §7.2.2.1 (part 4), a common trap: “Reading every starred section line by line.” What's the catch?	Get the main results, then move on.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::trap
TAOCP §7.2.2.1 (part 4), a common trap: “Using negative or fractional option costs with Algorithm X$.” What's the catch?	Costs must be nonnegative integers, so scale and round first.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::trap
TAOCP §7.2.2.1 (part 4), exercise 184 (rated M22, recommended): what is it asking?	Decide whether a strict exact cover problem with n items can have exactly t solutions, for any t.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 195 (rated M22, recommended): what is it asking?	Estimate how many updates Algorithm X makes when listing the perfect matchings of the text's example graph.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 218 (rated 20, recommended): what is it asking?	Explain one detail of the forcing rule in option preprocessing.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 229 (rated 25, recommended): what is it asking?	Find the lexicographically smallest and largest Langford pairings for n = 16 with the min-cost machinery.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 253 (rated 21, recommended): what is it asking?	Extend Algorithm Z to report the number of solutions as well as the ZDD.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 390 (rated 21, recommended): what is it asking?	Show two different exact cover encodings of futoshiki: one with pairwise ordering, one with colors.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 399 (rated 22, recommended): what is it asking?	Encode kenken for Algorithm C.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4), exercise 200 (rated HM25, recommended): what is it asking?	The stretch: decide 3D matching with polynomial algebra instead of backtracking (Björklund's method).	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercise
TAOCP §7.2.2.1 (part 4): how many exercises, and how are they rated?	150 exercises, rated 10 to HM46.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::exercises
TAOCP §7.2.2.1 (part 4): what should you be comfortable with first?	<ul><li>7.2.2.1 part 3</li></ul>	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::prereqs
TAOCP §7.2.2.1 (part 4): how should you work through it?	Skim the starred analysis sections for the main results. Spend real time on minimum-cost solutions and on Algorithm Z, since both change what the solver can answer. If you have a working solver, add a cost bound to it and solve one of the text's min-cost queens examples.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.1 cracked.guide::kind::approach
