Total search problems, NP-hardness, and NP = coNP #
A total FNP search problem (Cslib.Complexity.TFNP) is unlikely to be NP-hard, because any
polynomial-time reduction from an NP-hard decision problem to a TFNP relation collapses NP to
coNP ([MP91]; [Pap07], Section 2.2, p. 32).
This module formalizes this barrier at three levels of generality:
- Universal-property reductions ([Pap07], Section 2.2, p. 32): if
R ∈ FNP encB(in particularR ∈ TFNP encB) and polynomial-time mapsf : α → βandP : α × List Bool → Boolsatisfy∀ a, a ∈ A ↔ ∀ w, R (f a) w → P (a, w) = true, thenA ∈ coNP encA(mem_coNP_of_forall_rel_iff), because an existential witnesswwithR (f a) w ∧ P (a, w) = falsecertifiesa ∉ A. Totality ofRis not needed here because the biconditional itself guarantees a counterexamplewwhenevera ∉ A. Hence ifAisNP-hard, thenNP = coNPfor every encoding (NP_eq_coNP_of_NPHard_forall_rel_iff). - Single-query total search reductions: if
R ∈ TFNP encBand polynomial-time mapsfandPsatisfy∀ a w, R (f a) w → (P (a, w) = true ↔ a ∈ A), thenA ∈ NP encA ∩ coNP encA(mem_NP_inter_coNP_of_total_search_decides), soNP-hardness ofAimpliesNP = coNP(NP_eq_coNP_of_NPHard_total_search_decides). - Adaptive multi-query polynomial-time Turing reductions to
TFNP([MP91]): anAdaptiveSearchReductionmakessteps(|encA a|)adaptive queries to any oracle returning solutions ofR ∈ TFNP encB, maintaining a polynomially bounded bit-string state and decidingAregardless of which valid solutions the oracle returns. Guessing and verifying the full sequence of oracle answers putsA ∈ NP encA ∩ coNP encA(AdaptiveSearchReduction.mem_NP_inter_coNP), so anNP-hard problem with anAdaptiveSearchReductionto anyR ∈ TFNP encBcollapsesNP = coNP(NP_eq_coNP_of_NPHard_adaptiveSearchReduction).
For the specialization of these barriers to two-player rational Nash equilibria
(BimatrixCode.BimatrixNash), see CslibFrontier.GameTheory.Bimatrix.CoNPBarrier.
Main definitions #
Cslib.Complexity.replayState,Cslib.Complexity.IsValidOracleTrace: deterministic replay and oracle-trace validity for adaptive search reductions.Cslib.Complexity.AdaptiveSearchReduction: polynomial-time adaptive multi-query Turing reduction from a decision problemAto a search relationR.
Main results #
Cslib.Complexity.NP_eq_coNP_of_NPHard_mem_coNP: anNP-hard problem incoNPimpliesNP = coNPfor every encoding.Cslib.Complexity.mem_coNP_of_forall_rel_iff,Cslib.Complexity.NP_eq_coNP_of_NPHard_forall_rel_iff: universal-property reductions toFNP/TFNPplaceAincoNPand collapseNP = coNPwhenAisNP-hard ([Pap07], Section 2.2, p. 32).Cslib.Complexity.mem_NP_inter_coNP_of_total_search_decides,Cslib.Complexity.NP_eq_coNP_of_NPHard_total_search_decides: single-query decision reductions toTFNPplaceAinNP ∩ coNP.Cslib.Complexity.AdaptiveSearchReduction.mem_NP_inter_coNP,Cslib.Complexity.NP_eq_coNP_of_NPHard_adaptiveSearchReduction: adaptive multi-query Turing reductions toTFNPplaceAinNP ∩ coNPand collapseNP = coNPwhenAisNP-hard ([MP91]).
References #
Collapse from an NP-hard problem in coNP #
Universal-property and single-query reductions to TFNP #
Universal-property reduction into FNP / TFNP puts A in coNP
([Pap07], Section 2.2, p. 32): if R ∈ FNP encB and polynomial-time maps f and P
satisfy ∀ a, a ∈ A ↔ ∀ w, R (f a) w → P (a, w) = true, then A ∈ coNP encA.
If an NP-hard problem reduces via a universal property to an FNP (in particular TFNP)
search problem, then NP = coNP ([Pap07], Section 2.2, p. 32).
Single-query total-search reduction puts A in NP ∩ coNP ([MP91]):
if R ∈ TFNP encB and polynomial-time f and P decide A from any solution of R (f a),
then A ∈ NP encA and A ∈ coNP encA.
If an NP-hard problem has a single-query polynomial-time reduction to a TFNP search
problem, then NP = coNP.
Adaptive multi-query polynomial-time Turing reductions to TFNP #
Predicate stating that ws is a valid sequence of oracle answers to R along the replay
starting from init a with query map query and state transition update.
A polynomial-time adaptive Turing reduction from a decision problem A to a search
relation R ([MP91]): starting from init a, the reduction executes
steps(|encA a|) rounds, maintaining a bit-string state of length at most stateBound(|encA a|).
In each round it computes a query query (a, s), receives any valid solution w with
R (query (a, s)) w, updates s ↦ update ((a, s), w), and after all rounds outputs
finish (a, s), which correctly decides a ∈ A for every valid oracle answer sequence.
- steps : Polynomial ℕ
Number of adaptive oracle queries as a polynomial in
(encA a).length. - stateBound : Polynomial ℕ
Upper bound on the bit-length of the internal state as a polynomial in
(encA a).length. Initial state from the instance.
Query emitted from the instance and current state.
State transition given the instance, current state, and oracle answer.
Final decision bit extracted from the instance and final state.
initis computable in polynomial time.- query_polyTime : Turing.MultiTapeTM.ComputableInPolyTime self.query (Turing.MultiTapeTM.encPair encA Turing.MultiTapeTM.encBits) encB
queryis computable in polynomial time. - update_polyTime : Turing.MultiTapeTM.ComputableInPolyTime self.update (Turing.MultiTapeTM.encPair (Turing.MultiTapeTM.encPair encA Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits
updateis computable in polynomial time. - finish_polyTime : Turing.MultiTapeTM.ComputableInPolyTime self.finish (Turing.MultiTapeTM.encPair encA Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBool
finishis computable in polynomial time. The initial state obeys
stateBound.- update_length_le (a : α) (s w : List Bool) : s.length ≤ Polynomial.eval (encA a).length self.stateBound → R (self.query (a, s)) w → (self.update ((a, s), w)).length ≤ Polynomial.eval (encA a).length self.stateBound
Valid transitions preserve
stateBound. - correct (a : α) (ws : List (List Bool)) : ws.length = Polynomial.eval (encA a).length self.steps → IsValidOracleTrace R self.init self.query self.update a ws → (self.finish (a, replayState self.init self.update a ws) = true ↔ a ∈ A)
Soundness: every valid trace of
steps(|encA a|)oracle answers decidesa ∈ A.
Adaptive multi-query polynomial-time Turing reductions to TFNP place A in NP ∩ coNP
([MP91]).
Megiddo–Papadimitriou theorem ([MP91]): if an NP-hard decision
problem has a polynomial-time adaptive Turing reduction to a TFNP search problem, then
NP = coNP for every encoding.