#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 3::5.4.2 The Polyphase Merge
#columns:Front	Back	Tags
TAOCP §5.4.2 The Polyphase Merge: what does it cover?	A way to merge runs using a limited number of tapes without wasting passes, where the ideal initial run distribution follows generalized Fibonacci numbers.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::about
TAOCP §5.4.2: why does it matter?	Honest note: the tape-merging sections describe hardware nobody uses anymore. Knuth himself says much of 5.4 is historical. The ideas (run generation, merge patterns, minimizing passes over slow storage) still apply to external sorting on disks and SSDs, database sort operators and big-data shuffles, so read for those ideas and skim the tape mechanics.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::why
TAOCP §5.4.2: what traps should you watch for?	<ul><li>Spending a lot of time on tape rewind details.</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::traps
TAOCP §5.4.2, exercise 1 (rated 16): what is it asking?	Find the order in which the early runs go to the tapes. Checks that you can follow Algorithm D.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 2 (rated 21, recommended): what is it asking?	True or false: all dummy runs are gone after two merge phases.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 3 (rated 22, recommended): what is it asking?	Prove an ordering invariant on the dummy-run counts and explain why the algorithm depends on it.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 12 (rated M18, recommended): what is it asking?	Connect powers of a small matrix to the perfect polyphase distributions.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 8 (rated M20): what is it asking?	Ordered sums of 1 to p are counted by generalized Fibonacci numbers.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 13 (rated 22, recommended): what is it asking?	A parity property of perfect Fibonacci distributions.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 10 (rated M27): what is it asking?	Every integer has a unique representation in generalized Fibonacci numbers. The math stretch.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2, exercise 23 (rated 29, recommended): what is it asking?	Rework the tape-splitting recurrences with a different merge rule.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercise
TAOCP §5.4.2: how many exercises, and how are they rated?	31 exercises, rated 11 to M47.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::exercises
TAOCP §5.4.2: what should you be comfortable with first?	<ul><li>5.4.1 Multiway Merging</li><li>1.2.8 Fibonacci Numbers</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::prereqs
TAOCP §5.4.2: how should you work through it?	Simulate a 3-tape polyphase merge by hand to see the Fibonacci pattern. Skim the detailed tape-handling algorithms.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.4.2 cracked.guide::kind::approach
