#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4B::7.2.2.2 Satisfiability (part 3)
#columns:Front	Back	Tags
TAOCP §7.2.2.2 Satisfiability (part 3): what does it cover?	Part 3 covers pages 244 to 274 of 7.2.2.2. It starts with conflict-driven clause learning: a simple learning solver (Algorithm I), then the full CDCL Algorithm C with a trail, watched literals, conflict analysis that learns a clause and backjumps, variable activity scores, certificates of unsatisfiability, purging learned clauses and restarts. Then come Monte Carlo methods: Papadimitriou's random walk for 2SAT and 3SAT (Algorithm P), WalkSAT (Algorithm W), and Las Vegas restarts with the 'reluctant doubling' sequence. It ends with the Lovász Local Lemma, including Shearer's exact bound, traces and the Moser-Tardos resampling Algorithm M.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::about
TAOCP §7.2.2.2 (part 3): why does it matter?	CDCL is why SAT went from theory to industrial tool. It is a beautiful example of an algorithm learning from its own failures.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::why
CDCL (conflict-driven clause learning): what is it?	Conflict-driven clause learning is the algorithm behind modern SAT solvers: when a partial assignment leads to a contradiction, the solver analyzes why, adds a new clause that rules the cause out, and jumps back.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::definition
CDCL (conflict-driven clause learning): Who invented CDCL?	Clause learning came from the GRASP solver (Marques-Silva and Sakallah, 1996); Chaff (2001) added watched literals and activity-based decisions that made it fast.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::definition
WalkSAT: what is it?	WalkSAT is a randomized local search algorithm for satisfiability that repeatedly picks an unsatisfied clause and flips one of its variables, mixing greedy and random choices.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::definition
WalkSAT: What does the noise parameter do?	It is the probability of a random flip instead of a greedy one. Too low and the search gets stuck; too high and it wanders aimlessly.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::definition
TAOCP §7.2.2.2 (part 3): what is Algorithm I about?	A simple learning solver.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::algorithm
TAOCP §7.2.2.2 (part 3): what is Algorithm P about?	Papadimitriou's random walk for 2SAT and 3SAT.<div class="cg-dim cg-ctx">Then come Monte Carlo methods: Papadimitriou's random walk for 2SAT and 3SAT (Algorithm P), WalkSAT (Algorithm W), and Las Vegas restarts with the 'reluctant doubling' sequence.</div>	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::algorithm
TAOCP §7.2.2.2 (part 3), a common trap: “Expecting local search (Algorithms P and W) to prove unsatisfiability.” What's the catch?	They can't; they only find solutions.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::trap
TAOCP §7.2.2.2 (part 3), a common trap: “Restarting on a fixed schedule.” What's the catch?	The reluctant doubling sequence is near optimal when you don't know the run-time distribution.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::trap
TAOCP §7.2.2.2 (part 3): what traps should you watch for?	<ul><li>Getting the implication graph wrong when analyzing conflicts.</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 3), exercise 254 (rated 16): what is it asking?	Work out the first clause a CDCL solver learns on a tiny binary example.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 253 (rated 18, recommended): what is it asking?	Continue the text's conflict example by one decision and find the next learned clauses.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 255 (rated 20, recommended): what is it asking?	Build a small ternary formula that makes CDCL learn a chosen clause.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 257 (rated 30, recommended): what is it asking?	Implement Sörensson's recursive test for redundant literals, which shortens learned clauses.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 271 (rated 25, recommended): what is it asking?	Drop a learned clause right away when the next one subsumes it.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 300 (rated 25, recommended): what is it asking?	Run 64 random walks of Algorithm P at once with bitwise operations.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 313 (rated 22, recommended): what is it asking?	Show that WalkSAT's free flips reduce unsatisfied clauses but can move away from a solution.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3), exercise 351 (rated 25, recommended): what is it asking?	Apply the Local Lemma to SAT with variables biased individually.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercise
TAOCP §7.2.2.2 (part 3): how many exercises, and how are they rated?	108 exercises, rated 10 to HM46.	cracked.guide cracked.guide::phase::taocp-4b cracked.guide::section::7.2.2.2 cracked.guide::kind::exercises
