#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4A::7.1.1 Boolean Basics (part 1)
#columns:Front	Back	Tags
TAOCP §7.1.1 Boolean Basics (part 1): what does it cover?	Part 1 covers the first half of 7.1.1 (book pages 47 to 62): the sixteen binary Boolean operations and their names, basic identities, functions of n variables and their representations (truth tables, multilinear polynomials), disjunctive and conjunctive normal forms with implicants and prime implicants, satisfiability, and the two easy special cases: Horn clauses (solved by unit propagation) and Krom clauses, that is 2SAT (solved with strong components).	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::about
TAOCP §7.1.1 (part 1): why does it matter?	Boolean logic is the foundation of hardware, query engines, feature-flag logic and SAT solving (which you will meet at the end of the path).	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::why
TAOCP §7.1.1 (part 1), fill in the blank:<br>Horn and 2SAT are solvable in <span class="cg-blank">&nbsp;</span>, and both live in this half of the section, not the next one.	Horn and 2SAT are solvable in <b>linear time</b>, and both live in this half of the section, not the next one.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::complexity
TAOCP §7.1.1 (part 1), a common trap: “Confusing CNF and DNF.” What's the catch?	Write a mnemonic.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::trap
TAOCP §7.1.1 (part 1), a common trap: “Thinking all SAT is hard.” What's the catch?	Horn and 2SAT are solvable in linear time, and both live in this half of the section, not the next one.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::trap
TAOCP §7.1.1 (part 1), exercise 3 (rated 13, recommended): what is it asking?	Redo the operation table with -1 and +1 instead of 0 and 1. Shows which operations are really min, max, negation and product in disguise.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 13 (rated 20, recommended): what is it asking?	Model a system of working or failing parts as a Boolean function and get its reliability polynomial. A practical reason to care about representations.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 18 (rated 20, recommended): what is it asking?	Show any implicant of a DNF and any clause of a CNF for the same function must share a literal. One line once you see it, and it fixes the duality in your head.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 30 (rated 27, recommended): what is it asking?	Compute all prime implicants by treating them as subcubes encoded with two bit masks. Real code, and bit tricks you will meet again in 7.1.3.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 48 (rated 21, recommended): what is it asking?	Test Horn clauses for satisfiability efficiently. Write it as unit propagation with counters; it is the core of many rule engines.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 56 (rated 20, recommended): what is it asking?	Restate satisfiability as a quantified formula. Short setup for the next pick.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 57 (rated 30, recommended): what is it asking?	Decide fully quantified 2CNF formulas in linear time, extending the strong-components algorithm for 2SAT. The main algorithmic payoff of the week.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1), exercise 37 (rated M31, recommended): what is it asking?	Build a shellable DNF for a simple function and prove no orthogonal DNF is shorter. The stretch.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercise
TAOCP §7.1.1 (part 1): how many exercises, and how are they rated?	133 exercises, rated 05 to M48.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::exercises
TAOCP §7.1.1 (part 1): what should you be comfortable with first?	<ul><li>7 intro</li></ul>	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::prereqs
TAOCP §7.1.1 (part 1): how should you work through it?	Make your own table of all 16 binary operations and their names. Convert a few small functions between truth table, DNF and CNF by hand. Then implement Horn clause satisfiability with unit propagation and the linear-time 2SAT algorithm with strongly connected components; both are in this half.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.1 cracked.guide::kind::approach
