本文主要是介绍NP-Completeness,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
NP-Completeness
The “First” NP-Complete problem
Theorem. CIRCUIT-SAT is NP-complete. [Cook 1971, Levin 1973]
Pf.(sketch)
- Any algorithm that takes a fixed number of bits n as input and produces a yes/no answer can be represented by such a circuit. Moreover, if algorithm takes poly-time, then circuit if of poly-size.
sketchy part of proof; fixing the number of bits is important, and reflects basic distinction between algorithm and circuits. - Consider some problem X in NP. It has a poly-time certifier C(s,t). To determine whether s is in X, need to know if there exists a certificate t of length p(|s|) such that C(s,t) = yes.
- View C(s,t) as an algorithm on |s| + p(|s|) bits(input s, certificate t) and convert it into a poly-size circuit.
- first |s| bits are hard-coded with s
- remaining p(|s|) bits are represent bits of t.
- Circuit K is satisfiable iff C(s,t) = yes
这篇关于NP-Completeness的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!