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 L1Σ1L_1\subseteq\Sigma_1^* and L2Σ2L_2\subseteq\Sigma_2^* be languages. A log-space many-one reduction from L1L_1 to L2L_2 is a function f:Σ1Σ2f:\Sigma_1^*\rarr\Sigma_2^* s.t.

  1. There exists a log-space Turing machine computing ff.
  2. For all xΣ1x\in\Sigma_1^*, we have xL1f(x)L2x\in L_1\Lrarr f(x)\in L_2.

Denote: L1mlogL2L_1\le_m^{\log}L_2

The definition of polynomial-time many-one reduction (L1mpL2L_1\le_m^pL_2) is similar (simply using polynomial-time Turing machine instead).

📖Definition 15 (mlog\le_m^{\log}-hard/complete). Let LL be a language and C\mathcal C be a class of languages. We say that LL is mlog\le_m^{\log}-hard for C\mathcal C if for every LCL'\in\mathcal C we have LmlogLL'\le_m^{\log}L. We say LL is mlog\le_m^{\log}-complete if we additionally have LCL\in\mathcal C.

Reduction has property of transitivity.

🤔Lemma 1. L1mlogL2,L2mlogL3L1mlogL3L_1\le_m^{\log}L_2, L_2\le_m^{\log}L_3\Rarr L_1\le_m^{\log}L_3.

Let M1M_1 and M2M_2 be log-space Turing machines computing f1:L1L2,f2:L2L3f_1:L_1\to L_2,f_2:L_2\to L_3, respectively. It suffices to show that f=f2f1f=f_2\circ f_1 is computable by log-space Turing machine MM.

On input xx, we simulate M2M_2 with virtual input tape f1(x)f_1(x). We maintain a counter giving the position of the virtual input tape head of M2M_2. To simulate step of computation of M2M_2, we start simulating M1M_1 on input xx, counting and then discarding the output symbols by M1M_1 until the output symbol where the virtual input tape head is placed is to be written. Then the step of M2M_2 can be complete.

Let xx be of length n=nn=|n|. f(x)=2O(logn)=nO(1)|f(x)|=2^{O(\log n)}=n^{O(1)}, storing the position of the virtual tape head as well as the work tapes of M1M_1 and M2M_2 takes space O(logn)O(\log n).

我觉得也挺显然的呀,用两台对数空间的图灵机模拟,总空间仍然是对数的。

Then we define reduction \preceq between languages.

📖Definition 16. A language LL is hard for C\mathcal C under \preceq reductions if for all LCL'\in\mathcal C we have LLL'\preceq L. A language LL is complete for C\mathcal C under \preceq reductions if LCL\in\mathcal C in addition to begin hard for C\mathcal C under \preceq reductions.

Complexity class has an important property: the complexity class is closed under reductions.

We say C\mathcal C is closed w.r.t. \preceq reductions, if whenever LLL'\preceq L and LCL\in\mathcal C, we also have LCL'\in C. Proof omitted.

🤔Proposition 2. The classes L,NL,P,NP,PSPACE,EXP,NEXPL,NL,P,NP,PSPACE,EXP,NEXP are all closed under log-space many-one reductions. The classes P,NP,PSPACE,EXP,NEXPP,NP,PSPACE,EXP,NEXP are all closed under polynomial-time many-one reductions.

NL-completeness

The basic NL-complete problem is given by connectivity in a directed graph (STCONSTCON).

STCON

The instance: Directed graph DD and nodes ss and tt.

Question: Is there a directed path in DD from ss to tt?

🎯Theorem 20. STCONSTCON is complete for NL.

A non-deterministic log-space Turing machine can guess a path from ss to tt one node at a time, reusing space.

To show NL-hardness, Let LNLL\in NL be accepted by non-deterministic log-space Turing machine MM.

Given input xx s.t. MM accepts xx iff there is a path in the configuration graph of MM on input xx from the initial configuration to an accepting configuration.

A log-space reduction from LL to STCONSTCON is:

On input xx we generate all configurations of MM on input xx, which then forms the set of nodes together with an additional node tt. Initial configuration becomes the node ss.

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 tt. We then have that the resulting directed graph DD has a path from ss to tt iff MM accepts xx.

By Savitch’s Theorem and Immerman-Szelepcsényi Theorem, STCONDSPACE(log2n)STCON\in DSPACE(\log^2n) and STCONNL\overline{STCON}\in NL, respectively.

P/NP-completeness

Basic PP and NPNP-complete problems are given by the ability of Boolean circuits to simulate Turing machines on fixed input length. For PP this gives the circuit value problem.

CVP problem

Instance: Boolean circuit CC on nn inputs and input x{0,1}nx\in\{0,1\}^n.

Question: Is C(x)=1C(x)=1?

🎯Theorem 21. CVPCVP is complete for PP.

SAT problem

CircuitSAT

Instance: Boolean circuit CC on nn inputs

Question: Does there exist x{0,1}nx\in\{0,1\}^n s.t. C(x)=1C(x)=1?

🎯Theorem 22. CircuitSATCircuitSAT is complete for NPNP.

Let me use Chinese

为什么 CircuitSAT 属于 NPNP。简单理解就是非确定性图灵机 NTM 可以在多项式时间解决此问题。一个简单的思想就是暴力枚举,一共遍历 2n2^n 次。这样在确定性图灵机 DTM 上确实就是 O(2n)O(2^n),但是在非确定性图灵机上,就厉害了。针对每一位,非确定性图灵机可以同时猜测 0011,这样一共遍历 nn 次分别对应 nn 位,就得到了 NPNP 的结果。

As for NPNP-hard, construct language LNTIME(nk)L\in NTIME(n^k) for k>0k\gt0.

SAT

Instance: CNF formula φ\varphi.

Question: Does φ\varphi have a satisfying assigment?

🎯Theorem 23. CNF satisfiability problem is also complete for NPNP.

It’s easy to see SATNPSAT\in NP.

For hardness, by reduction from CircuitSATCircuitSAT.

Given a Boolean circuit CC, take Tseitin transformation of CC giving an equi-satisfiable CNF formula φ\varphi.

This involves introducing new variable for each gate of CC.

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. (TQBFTQBF)

Instance: Quantified Boolean formula with no free variable ψ=Q1x1Q2x2Qnxnφ(x1,,xn)\psi=Q_1x_1Q_2x_2\cdots Q_nx_n\varphi(x_1,\cdots,x_n), where Qi{,}Q_i\in\{\forall,\exist\} and xi{0,1}x_i\in\{0,1\} for all ii.

Question: Is ψ\psi true?

🎯Theorem 24. TQBFTQBF is complete for PSPACEPSPACE.

To see TQBFPSPACETQBF\in PSPACE: The algorithm is a recursion. At the bottom of the recursion, if Qi=Q_i=\forall, return 11 iff both returned 11; if Qi=Q_i=\exist, return 00 iff both returned 00. We of course need a stack with length O(n)O(n) for evaluating φ\varphi.

To show hardness, proof similar to Savitch’s theorem.

EXP/NEXP-completeness

Consider so-called succinct versions of complete problems of PP and NPNP.

Let CC be a Boolean circuit with nn input gates and one output gate. The truthtable of CC is the string tt(C){0,1}2ntt(C)\in\{0,1\}^{2^n} giving the evaluation of CC on all possible inputs.

Consider a language L{0,1}L\subseteq\{0,1\}^*. Then define the succinct version SuccinctLSuccinctL of LL simply by SuccinctL={Ctt(C)L}SuccinctL=\{C|tt(C)\in L\}. Note that when LPL\in P we have that SuccinctLEXPSuccinctL\in EXP simply by decompressing the input CC to tt(C)tt(C) in exponential time and then using the polynomial-time Turing machine to check for membership in LL.

简而言之,把上面这些玩意的真值表算出来,就是属于 EXP/NEXP 的复杂度类。

Similarly we have SuccinctLNEXPSuccinctL\in NEXP when LNPL\in NP.

🎯Theorem 25. SuccinctCVPSuccinctCVP is complete for EXPEXP.

Similar transformation.

🎯Theorem 26. SucinctCircuitSATSucinctCircuitSAT and SuccinctSATSuccinctSAT are complete for NEXPNEXP.