之前[计算理论]({{< relref "post/2025-01-14-computation-theory.md" >}})的坑还没填完.. 但是后面很多内容都在这本复杂性里面,于是先看这个了
Hierarchy, Diagonalization (and its limitations), Circuit Complexity forms the Chapter 9 INTRACTABILITY in Sipser's book🤣
先挂一张 reduction graph

首先将判定问题扩展到搜索问题.
回顾我们是怎么证 为 -hard 的, 是假设给到了任意一个 语言, 根据这个语言造一个逻辑表达式. 由于 是 的,一定存在确定性图灵机 ,使得 . 我们构造一个逻辑表达式,它描述了图灵机 每一步的状态直到接受,所需满足的条件. (有一个细节,我们需要根据原来的图灵机构造一个 纸带图灵机,有一条是只读带,而且图灵机的指针移动和输入内容无关,只和输入长度有关,这样的图灵机称为 Oblivious TM). 这样一来,逻辑表达式只需要描述 个条件:
- 输入的前 位等于
- 初始状态
- 对于每一个时间步,符合图灵机运行规则
- 结束状态,在接受态停机
这样的一个归约函数 不仅满足 , 而且将 的一个 witness 转换成了逻辑表达式的一个赋值. 同时,由于这个逻辑公式完全符合图灵机的运行情况,一个使表达式为真的赋值也对应了一个 witness. 这样的归约称为 Levin reduction, 可被用于搜索问题上(搜索问题就是找到一个 witness).
Thm 1. 如果 ,那么对任意 , verifier , 存在多项式时间的确定性图灵机 , 对于任意输入 , .
Pf. 首先, 如果我们对 证明了这个结论并得到 ,那么任何 , 对于一个 Levin 归约 ,将 作为输入给到 得到一个赋值后,将赋值转化成一个 witness 即可. 下面证明对于 上面的论断成立.
如何构造?首先由于 , 存在多项式算法 确定 问题. 对于一个逻辑表达式 , 先用 确定 是否可满足;然后假设第一个变量 ,得到 . 我们知道如果 可满足, 那么 和 必有一个可满足,因此跑一次 就够了. 这样一来,运行时间为 , 多项式;同时记录下每个赋值,就是计算出了一个 witness.
Def.
即,存在一个确定性图灵机 和多项式 , 对任意 ,
注意核心的区别不在于输出 还是 , 在于中间的量词是存在还是任意.
定义 , 有
Thm 2. 是 -complete 语言.
Pf. 首先对于 存在一个 witness 让 的值为 false, 因此属于 .
下证所有 比 容易. 可以知道 , 因此根据 Cook-Levin 定理的证明,存在多项式可计算的归约函数, 可满足, 不可满足. 直接取 就是 tautology.
Diagonal Method
回顾一道妙题:
Ex. Prove that is undecidable.
Pf. Soppose there exists a decider TM . Construct a TM that operates on input : run on input , if rejects, halt; if accepts, simulate on input where .
For all possible input , if , then halts and halts; if not, rejects and also halts. Thus .
However, consider . Since , will simulate on input recursively and without terminating, a contradiction.
Thm 3. (Deterministic time hierarchy thm) If are time-constructible functions that , then .
Pf. For simplicity we relax the condition to for all .
Goal: find a language that can be decided in time but never in time.

A Turing Machine operates like this: on input , run the universal TM for steps, simulating the TM on input . If the step is used up, reject. Otherwise output the opposite of the answer of the simulation.
The language that is decided by TM is a member of class . For contradiction, assume , then there exists a TM , on input , outputs in steps Thus the universal TM that simulates on input operates in at most steps. For enough large , , so the simulation halts in advance. By definition the output of on input is the opposite of , which is a contradiction.
Thm 4. (Ladner) If , then there is a language that is not -complete.
Pf. The key is the language with .
(to be completed)
参考资料
- [1] Sanjeev Arora and Boaz Barak. Computational Complexity: A Modern Approach. Cambridge University Press, USA, 1st edition, 2009.
- [2] Sipser, M. Introduction to the Theory of Computation. Thomson Course Technology, Boston, 3rd edition, 2012.