#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4B::7.2.2.2 Satisfiability (part 2)
#columns:Front	Back	Tags
TAOCP §7.2.2.2 Satisfiability (part 2): what does it cover?	Part 2 covers pages 211 to 244 of 7.2.2.2. It starts with backtracking solvers: Algorithm A (counting literal occurrences), Algorithm B (watched literals), Algorithm D (watched literals plus a cyclic order of variables), then Algorithm L, a lookahead solver with binary implication tables, heuristic scores, autarkies and double lookahead (Algorithms X and Y as subroutines). Next is a mostly mathematical study of random clauses and the satisfiability threshold (random 2SAT, random 3SAT near 4.27 clauses per variable). It ends with resolution proofs: the Davis-Putnam elimination, treelike and regular resolution, the pigeonhole lower bounds and Tseytin's graph parity clauses.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::about
TAOCP §7.2.2.2 (part 2): why does it matter?	Watched literals are one of the key engineering ideas that made SAT solvers fast. Implementing them teaches serious data structure design.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::why
TAOCP §7.2.2.2 (part 2), a common trap: “Generalizing from random 3SAT.” What's the catch?	Structured industrial instances behave very differently.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::trap
TAOCP §7.2.2.2 (part 2): what traps should you watch for?	<ul><li>Bugs in watched-literal updates when a clause becomes unit or conflicting.</li></ul>	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::traps
TAOCP §7.2.2.2 (part 2), exercise 119 (rated 18): what is it asking?	Find which literal shrinks a small van der Waerden formula the most when set true.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 122 (rated 21, recommended): what is it asking?	Change Algorithm A to find all satisfying assignments.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 132 (rated 22, recommended): what is it asking?	Look for 2SAT inputs that make Algorithm D take exponential time, even though 2SAT is easy.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 135 (rated 16, recommended): what is it asking?	Use the binary implication tables to find the literals that imply a given one.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 163 (rated M25, recommended): what is it asking?	Prove a better-than-2^n bound for a simple recursive 3SAT procedure that uses autarkies.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 188 (rated HM25, recommended): what is it asking?	Work out the satisfiability threshold for random 1SAT, the easiest case.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 219 (rated M20, recommended): what is it asking?	Define resolution for arbitrary pairs of clauses so it is still sound.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2), exercise 237 (rated 28, recommended): what is it asking?	Show that extended resolution refutes the pigeonhole clauses in polynomial time.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 2): how many exercises, and how are they rated?	130 exercises, rated 05 to HM49.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercises
TAOCP §7.2.2.2 (part 2): what should you be comfortable with first?	<ul><li>7.2.2.2 part 1</li></ul>	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::prereqs
TAOCP §7.2.2.2 (part 2): how should you work through it?	Write a small DPLL solver with watched literals (Algorithm B or D) in C. Measure it on random 3SAT instances near the 4.27 ratio and on waerden problems. Read Algorithm L to see what lookahead buys, and the resolution part for why some problems need exponential time with any such solver.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::approach
