#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4A::7.1.4 Binary Decision Diagrams (part 1)
#columns:Front	Back	Tags
TAOCP §7.1.4 Binary Decision Diagrams (part 1): what does it cover?	Part 1 covers the first 31 pages of 7.1.4 (book pages 202 to 233): what a BDD is and why the reduced ordered form is canonical, counting solutions (Algorithm C) and finding maximum-weight solutions (Algorithm B), generating functions and reliability polynomials from a BDD, functions with small BDDs, shared BDDs, reducing an arbitrary decision diagram (Algorithm R), and synthesis: combining BDDs breadth-first (Algorithm S) or recursively in a BDD base with a unique table and memo cache (Algorithm U), plus ternary operations, quantifiers and functional composition.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::about
TAOCP §7.1.4 (part 1): why does it matter?	BDDs are used in hardware verification, model checking, and configuration tools. Knuth has praised them as one of the few truly fundamental data structures to appear in recent decades.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::why
Binary decision diagram (BDD): what is it?	A binary decision diagram is a directed acyclic graph that represents a Boolean function; in its reduced ordered form it is canonical, so equal functions have identical diagrams.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::definition
Binary decision diagram (BDD): BDD or SAT solver?	A BDD describes all solutions at once and answers counting and equivalence questions; a SAT solver finds one solution or proves there is none, and scales to much bigger problems when you only need that.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::definition
TAOCP §7.1.4 (part 1): what is Algorithm C about?	Counting solutions.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::algorithm
TAOCP §7.1.4 (part 1): what is Algorithm B about?	Finding maximum-weight solutions.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::algorithm
TAOCP §7.1.4 (part 1): what is Algorithm R about?	Reducing an arbitrary decision diagram.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::algorithm
TAOCP §7.1.4 (part 1): what is Algorithm S about?	Combining BDDs breadth-first.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::algorithm
TAOCP §7.1.4 (part 1), a common trap: “Forgetting to memoize synthesis, which turns a fast operation into an exponential one.” What's the catch?	Synthesis is in this half of the section, not the next.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::trap
TAOCP §7.1.4 (part 1): what traps should you watch for?	<ul><li>Forgetting the unique table, which is what makes nodes shared and the BDD canonical.</li></ul>	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::traps
TAOCP §7.1.4 (part 1), exercise 1 (rated 20, recommended): what is it asking?	Draw the BDDs for all 16 functions of two variables. Do it before writing any code.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 10 (rated 21, recommended): what is it asking?	Test two BDDs for equality. Easy once you see why canonical form matters.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 16 (rated 22, recommended): what is it asking?	Generate all solutions of a function from its BDD. The first useful thing your BDD package should do.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 23 (rated M20, recommended): what is it asking?	Explain why every path to true in a particular BDD has the same number of solid arcs.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 53 (rated 23, recommended): what is it asking?	Trace the reduction algorithm on a small diagram by hand.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 78 (rated 25, recommended): what is it asking?	Use BDDs to count graphs on 12 labeled vertices by maximum degree. A real counting job no brute force could do.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 81 (rated 20, recommended): what is it asking?	Adapt the recursive AND synthesis to XOR in a BDD base. Small change, good test of understanding.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1), exercise 44 (rated M32, recommended): what is it asking?	Find the largest possible BDD for a symmetric function. The stretch.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercise
TAOCP §7.1.4 (part 1): how many exercises, and how are they rated?	267 exercises, rated 05 to M47.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::exercises
TAOCP §7.1.4 (part 1): what should you be comfortable with first?	<ul><li>7.1.1 Boolean Basics</li><li>2.3 Trees</li></ul>	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.4 cracked.guide::kind::prereqs
