cslib-frontier guide

2. NP-Completeness🔗

This chapter states and proves NP-completeness results the way the library does: problems with explicit encodings, polynomial time on multi-tape Turing machines, verifiers, polynomial-time reductions and the Cook–Levin theorem. It ends by proving that Clique is NP-complete, step by step, which is the outline every new NP-completeness proof follows.

Each problem lives in its own module under CslibFrontier.Computability.Complexity.Problems, so a development imports the problems it uses. The first examples need only these:

import CslibFrontier.Computability.Complexity.CookLevin.Completeness
import CslibFrontier.Computability.Complexity.Problems.Clique
import CslibFrontier.Tactic.PolyTime

open Cslib.Complexity Turing.MultiTapeTM
  1. 2.1. Problems and Encodings
  2. 2.2. Polynomial Time
  3. 2.3. P, Verifiers and NP
  4. 2.4. Reductions
  5. 2.5. NP-Hardness and NP-Completeness
  6. 2.6. The Cook–Levin Theorem
  7. 2.7. The Catalogue
  8. 2.8. Boolean Constraint Languages
  9. 2.9. Proving a Problem NP-Complete
  10. 2.10. Planar Boolean CSP Prerequisites
  11. 2.11. Indexed CSP and Table Operations
  12. 2.12. Finite Ordered Rotation Certificates
  13. 2.13. Frozen XOR Queries and Checked Recovery
  14. 2.14. Indexed Duality and Boolean Difference Lifting
  15. 2.15. Face Boundaries and Intersection Parity
  16. 2.16. Indexed Rotation Surgery
  17. 2.17. Polygonal Geometry Prerequisites
  18. 2.18. Ordered Incidence-to-Polygon Rotations
  19. 2.19. Checked Cyclic-Difference Edge Compilation
  20. 2.20. Delta-Matroid Closure for Local Contraction
  21. 2.21. Prefix-Valid Edge-CSP Augmentation
  22. 2.22. Timestamped DAG Search Prerequisites
  23. 2.23. Fresh Forest Search
  24. 2.24. Native Fresh Forest Search
  25. 2.25. Whole-Instance Blossom Contraction and Lifting
  26. 2.26. Complete Native Even Edge-CSP Solver
  27. 2.27. Ordered Boundary and Static Gadget Closure
  28. 2.28. Original-Language Ordered Disequality
  29. 2.29. Finite Crossover Gadget Semantics
  30. 2.30. Ordered Cyclic-Obstruction Normalization
  31. 2.31. Original-Language Nonselfdual Gadgets