原书出处
Introduction to Algorithms, Fourth Edition
34 第34章 NP完全性
ach of which has at most three literals. These clauses are not yet ORs of three literals.
The second step of the reduction converts each clause into conjunctive normal form. Construct a truth table for by evaluating all possible assignments to its variables. Each row of the truth table consists of a possible assignment of the variables of the clause, together with the value of the clause under that assignment. Using the truth-table entries that evaluate to 0, build a formula in disjunctive normal form (or DNF)—an OR of ANDs—that is equivalent to ¬ . Then negate this formula and convert it into a CNF formula by using DeMorgan’s laws for propositional logic, ¬(a ∧ b) = ¬a ∨ ¬b, ¬(a ∨ b) = ¬a ∧ ¬b, to complement all literals, change ORs into ANDs, and change ANDs into ORs.
In our example, the clause converts into CNF as follows. The truth table for appears in F
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter034.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea