#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 3::5.3.2 Minimum-Comparison Merging
#columns:Front	Back	Tags
TAOCP §5.3.2 Minimum-Comparison Merging: what does it cover?	The fewest comparisons needed to merge two sorted lists of given sizes, with adversary arguments and a binary merging algorithm for unequal sizes (Hwang-Lin).	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::about
TAOCP §5.3.2: why does it matter?	Merging very unequal lists efficiently is useful for set intersection in search engines and databases. Adversary arguments are a powerful proof tool.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::why
TAOCP §5.3.2, exercise 15 (rated 12): what is it asking?	Compute a floor of a log ratio without division. A small practical trick used by binary merging.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 1 (rated 15): what is it asking?	Relate the merging function to the sorting function from 5.3.1.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 2 (rated 22, recommended): what is it asking?	Show every binary tree with n + 1 leaves is a merging algorithm for one element.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 8 (rated 24, recommended): what is it asking?	Merge two elements into eight with only six comparisons.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 19 (rated 23, recommended): what is it asking?	Prove a recurrence inequality for the merging function.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 25 (rated 25, recommended): what is it asking?	Searching a sorted matrix is exactly as hard as merging. A neat equivalence with interview flavor.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2, exercise 3 (rated M24): what is it asking?	Prove the adversary lower bound is exact when one list has a single element. The math stretch.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercise
TAOCP §5.3.2: how many exercises, and how are they rated?	25 exercises, rated 12 to M47.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::exercises
TAOCP §5.3.2: what should you be comfortable with first?	<ul><li>5.3.1 Minimum-Comparison Sorting</li></ul>	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::prereqs
TAOCP §5.3.2: how should you work through it?	Focus on the adversary argument idea and on the binary merge algorithm. Implement binary merging and compare against linear merge when one list is tiny.	cracked.guide cracked.guide::phase::taocp-3 cracked.guide::section::5.3.2 cracked.guide::kind::approach
