#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4A::7 Combinatorial Searching intro (part 2)
#columns:Front	Back	Tags
TAOCP §7 Combinatorial Searching intro (part 2): what does it cover?	Part 2 is the rest of the chapter 7 introduction (book pages 18 to 35): directed graphs and tournaments, how the Stanford GraphBase represents graphs in memory, a simple 2-coloring algorithm (Algorithm B), the SGB graph generators, graph algebra (complements, sums, joins and five kinds of graph products), graphical degree sequences and Algorithm H for realizing them, hypergraphs and incidence matrices, and covering, independence, cliques and coloring.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::about
TAOCP §7 (part 2): why does it matter?	Graphs are the most common model for real problems (networks, dependencies, maps). Getting the vocabulary precise makes everything after this easier.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::why
TAOCP §7 (part 2): what is Algorithm B about?	A simple 2-coloring algorithm.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::algorithm
TAOCP §7 (part 2), a common trap: “Getting lost in notation.” What's the catch?	Keep a glossary of the graph products and their symbols; they come back in 7.1.4 and 7.2.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::trap
TAOCP §7 (part 2), a common trap: “Assuming the five graph products are interchangeable.” What's the catch?	Draw each for two small graphs (exercise 91) until you can tell them apart.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::trap
TAOCP §7 (part 2), exercise 59 (rated M23, recommended): what is it asking?	Show every tournament has a directed path through all its vertices. A neat induction that also gives an insertion-sort style algorithm.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 60 (rated M22, recommended): what is it asking?	Prove the player with the most wins can reach everyone else in at most two steps. Short and satisfying.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 69 (rated 20, recommended): what is it asking?	Compute in-degrees and out-degrees for a graph stored in SGB format. Makes sure you can actually walk the data structure.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 70 (rated M20, recommended): what is it asking?	Count how often each step of the 2-coloring algorithm runs. Classic Knuth-style analysis on a graph algorithm.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 108 (rated M23, recommended): what is it asking?	Adapt the degree-sequence construction to digraphs with given in-degrees and out-degrees.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 143 (rated M25, recommended): what is it asking?	Show you can always delete a column from a matrix with distinct rows and keep the rows distinct. Useful for thinking about minimal keys in data.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 145 (rated 25, recommended): what is it asking?	Find a majority element with fewer than n comparisons. The Boyer-Moore voting idea, which shows up in interviews and streaming code.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2), exercise 65 (rated HM31, recommended): what is it asking?	Use eigenvalues to pin down which degrees allow girth-5 graphs of the smallest possible size. The stretch; it is the Hoffman-Singleton theorem, and the one open case is exercise 67.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercise
TAOCP §7 (part 2): how many exercises, and how are they rated?	145 exercises, rated M00 to 50.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::exercises
TAOCP §7 (part 2): what should you be comfortable with first?	<ul><li>7 intro part 1</li><li>2.3.4 Mathematical properties of trees</li></ul>	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::prereqs
TAOCP §7 (part 2): how should you work through it?	Make a glossary as you read. Draw every named graph family for small sizes. Do not try to memorize every operation on graphs; aim to recognize them later.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7 cracked.guide::kind::approach
