算法和计算复杂度 4 Reductions and Completeness
Reductions
NP-completeness: by polynomial-time many-one reductions (aka Karp reductions)
Studying completeness of P and NL: by log-space many-one reduction. Also too powerful for completeness inside L.
📖Definition 14 (Log-space reductions). Let and be languages. A log-space many-one reduction from to is a function s.t.
- There exists a log-space Turing machine computing .
- For all , we have .
Denote:
The definition of polynomial-time many-one reduction () is similar (simply using polynomial-time Turing machine instead).
📖Definition 15 (-hard/complete). Let be a language and be a class of languages. We say that is -hard for if for every we have . We say is -complete if we additionally have .
Reduction has property of transitivity.
🤔Lemma 1. .
Let and be log-space Turing machines computing , respectively. It suffices to show that is computable by log-space Turing machine .
On input , we simulate with virtual input tape . We maintain a counter giving the position of the virtual input tape head of . To simulate step of computation of , we start simulating on input , counting and then discarding the output symbols by until the output symbol where the virtual input tape head is placed is to be written. Then the step of can be complete.
Let be of length . , storing the position of the virtual tape head as well as the work tapes of and takes space .
我觉得也挺显然的呀,用两台对数空间的图灵机模拟,总空间仍然是对数的。
Then we define reduction between languages.
📖Definition 16. A language is hard for under reductions if for all we have . A language is complete for under reductions if in addition to begin hard for under reductions.
Complexity class has an important property: the complexity class is closed under reductions.
We say is closed w.r.t. reductions, if whenever and , we also have . Proof omitted.
🤔Proposition 2. The classes are all closed under log-space many-one reductions. The classes are all closed under polynomial-time many-one reductions.
NL-completeness
The basic NL-complete problem is given by connectivity in a directed graph ().
STCON
The instance: Directed graph and nodes and .
Question: Is there a directed path in from to ?
🎯Theorem 20. is complete for NL.
A non-deterministic log-space Turing machine can guess a path from to one node at a time, reusing space.
To show NL-hardness, Let be accepted by non-deterministic log-space Turing machine .
Given input s.t. accepts iff there is a path in the configuration graph of on input from the initial configuration to an accepting configuration.
A log-space reduction from to is:
On input we generate all configurations of on input , which then forms the set of nodes together with an additional node . Initial configuration becomes the node .
Next generate all arcs between configurations corresponding to a single step of the Turing machine and finally arcs between all accepting configurations to the new node . We then have that the resulting directed graph has a path from to iff accepts .
By Savitch’s Theorem and Immerman-Szelepcsényi Theorem, and , respectively.
P/NP-completeness
Basic and -complete problems are given by the ability of Boolean circuits to simulate Turing machines on fixed input length. For this gives the circuit value problem.
CVP problem
Instance: Boolean circuit on inputs and input .
Question: Is ?
🎯Theorem 21. is complete for .
SAT problem
CircuitSAT
Instance: Boolean circuit on inputs
Question: Does there exist s.t. ?
🎯Theorem 22. is complete for .
Let me use Chinese为什么 CircuitSAT 属于 。简单理解就是非确定性图灵机 NTM 可以在多项式时间解决此问题。一个简单的思想就是暴力枚举,一共遍历 次。这样在确定性图灵机 DTM 上确实就是 ,但是在非确定性图灵机上,就厉害了。针对每一位,非确定性图灵机可以同时猜测 和 ,这样一共遍历 次分别对应 位,就得到了 的结果。
As for -hard, construct language for .
…
SAT
Instance: CNF formula .
Question: Does have a satisfying assigment?
🎯Theorem 23. CNF satisfiability problem is also complete for .
It’s easy to see .
For hardness, by reduction from .
Given a Boolean circuit , take Tseitin transformation of giving an equi-satisfiable CNF formula .
This involves introducing new variable for each gate of .
The number of new variable for each gate is a constant.
3SAT 也是 NP 的,即每个合取范式最多包含三个子句。
PSPACE-completeness
Basic PSPACE-completeness is given by the problem of deciding validity of true quantified Boolean formulas as shown by Stockmeyer and Meyer. ()
Instance: Quantified Boolean formula with no free variable , where and for all .
Question: Is true?
🎯Theorem 24. is complete for .
To see : The algorithm is a recursion. At the bottom of the recursion, if , return iff both returned ; if , return iff both returned . We of course need a stack with length for evaluating .
To show hardness, proof similar to Savitch’s theorem.
…
EXP/NEXP-completeness
Consider so-called succinct versions of complete problems of and .
Let be a Boolean circuit with input gates and one output gate. The truthtable of is the string giving the evaluation of on all possible inputs.
Consider a language . Then define the succinct version of simply by . Note that when we have that simply by decompressing the input to in exponential time and then using the polynomial-time Turing machine to check for membership in .
简而言之,把上面这些玩意的真值表算出来,就是属于 EXP/NEXP 的复杂度类。
Similarly we have when .
🎯Theorem 25. is complete for .
Similar transformation.
🎯Theorem 26. and are complete for .