原书出处
Introduction to Algorithms, Fourth Edition
34 第34章 NP完全性
struct a graph G such that ϕ is satisfiable if and only if G contains a clique of size k.
We construct the undirected graph G = (V, E) as follows. For each clause in ϕ, place a triple of vertices , and into V. Add edge into E if both of the following hold: and are in different triples, that is, r ≠ s, and their corresponding literals are consistent, that is, is not the negation of . We can build this graph from ϕ in polynomial time.
As an example of this construction, if ϕ = (x1 ∨ ¬x2 ∨ ¬x3) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (x1 ∨ x2
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter034.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea