Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

附录: 常见判定问题分类速查表

编程现场/面试/代码评审的快速参考. 按字母与域分别罗列.


A.1 — 自动机与文法层级

Chomsky Type文法自动机例子
0unrestricted grammarTM"任意程序计算的语言"
1context-sensitiveLBA (Linear Bounded Automaton)${a^n b^n c^n}$, ${ww}$
2context-freePDA${a^n b^n}$, balanced parens, JSON
3regularDFA / NFA / ε-NFAatom regex ^[ab]*$, IP match

A.2 — 经典 RE / CFL 反例

语言类别证度
$a^n b^n$CFL 非 REpumping
$a^n b^n c^n$sensit-context 非 CFLpumping
${ww}$CSG 非 CFLpumping
${ww^R}$ (回文)CFLconstruct CFG
Dyck language (balanced parens)CFLstandard
${a^* b^* c^*}$regulartrivial
$a^*$regulartrivial
${a^p \mid p \text{ prime}}$非 CFLpumping

A.3 — NP 问题速查表

A.3.1 NP-Complete 经典

问题起点归约在第一部分对应章节
SATCook-Levin— foundational —
3-SATSAT
Clique3-SAT见 reductions
Vertex CoverClique via ISreductions
Independent SetClique (补图)reductions
Hamiltonian Cycle3-SATreductions
TSP decisionHam Cyclereductions
3-Coloring3-SATreductions
Subset Sum3-SATreductions
0/1 KnapsackSubset Sumdsa/topics/dp
PartitionKnapsackdsa/topics/dp
Bin PackingPartition
Job SchedulingPartition
Longest PathHamiltoniandsa/topics/graphs
SAT for CircuitSAT
Planar 3-SATSAT
Set CoverVertex Coverapproximation
Steiner TreeSATgraph chapter
Hitting SetSet Coverreductions
Integer ProgrammingSubset Sumreductions
Job-shop SchedulingSAT

A.3.2 NP-Intermediate (conjectured, unproven if P≠NP)

问题推荐
FACTORShor's (BJP 算) crypto assumption
Graph IsomorphismBabai quasi-poly
Discrete Logcrypto assumption

A.3.3 PSPACE-Complete

  • QBF (Quantified Boolean Formulae)
  • Generalized Geography
  • Sokoban decision problem

A.4 — Undecidable (not even RE)

问题证明 tool
停机问题共形式对角线
Total TM 是否对所有输入必停 ("Tot")用 Rice ($\Pi_2$)
Post CorrespondenceTuring config 归约
Hilbert's 10thPCP 归约
Wang tiles 平面铺TM tape 归约
Word problem for groupsBoone-Novikov
判断 TM 输出多项式函数行数Rice
$\mathcal{RE} \neq \mathcal{R}$停机

A.5 — Crypto 困难假设对照

假设所属类推论
$P \neq NPC$complexity theoryCook-Levin 后仍未证
Integer factoring hardFACTOR not in P (假设)RSA 安全 iff factoring hard
Discrete log hardDLOG not in P (假设)ECDLP / 椭圆曲线安全
LWE (Learning-with-errors) hardworst-case lattice problem (Regev)后量子 crypto 基础
BQP 不含 NP-completequantum complexityShor 不能解 NP
Quad-SVP approximationlattice problem已知 NP-hard (under random reduction)

A.6 — Approximation Class 速查

Class含义
APXratio ≤ constant (存在 c-approx)
PTAS$\forall \epsilon$ poly → $(1+\epsilon)$-approx
FPTAStime poly in $n, 1/\epsilon$
APX-hard不可能 PTAS (unless P=NP)
APX-complete在 APX 类且其 reduction preserve ratio

例:

  • Vertex Cover: APX-complete, $(2-\theta)$ open.
  • TSP-metric: APX-complete, gap 1.5 ⇔ 1.3606.
  • Set Cover: log-approx, APX-hard 推 hard of approx.
  • Knapsack: FPTAS.

A.7 — 与项目其他章节交叉索引


下一节 → 密码学与安全 README