Skip to content

The classes P, NP and coNP

15 fully proved

Bitstring encodings

ClassBitstring encodings#✓fully proved

A canonical bitstring encoding of a type \(\alpha\) consists of an encoding map from \(\alpha\) to finite lists of booleans and a partial decoding map from finite lists of booleans to \(\alpha\), such that decoding the encoding of any \(a \in \alpha\) succeeds and returns \(a\).

class BitstringEncoding α extends Computability.Encoding α Bool
Sources
  • a class version of Mathlib's Computability.Encoding specialized to the alphabet Bool, inlined from FormalConjectures (absent from Mathlib).
Used by 318
Used byBinary encoding of natural numbers · Theorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · Fixed-parameter tractable problems · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · Decoding function of a bitstring encoding · Decoding inverts bitstring encoding · Encoding function of a bitstring encoding · Polynomial-time computable functions · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Decoding natural-number payloads never fails · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Raw field projection agrees with the pair decoder · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The primality decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · Polynomial-time functions are closed under composition · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

Bitstring Encoding

DefinitionEncoding function of a bitstring encoding#✓fully proved

For a type \(\alpha\) with a canonical bitstring encoding, the bitstring encoding of \(a \in \alpha\) is the finite list of booleans that this encoding assigns to \(a\).

def bitEncode [BitstringEncoding α] (a : α) : List Bool := toEncoding.encode a
Uses 1 · Used by 310
Statement usesBitstring encodings
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · Decoding inverts bitstring encoding · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Raw field projection agrees with the pair decoder · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionDecoding function of a bitstring encoding#✓fully proved

For a type \(\alpha\) with a canonical bitstring encoding, bitstring decoding is the decoding function of that encoding: it sends each finite list of booleans either to an element of \(\alpha\) or to failure.

def bitDecode [BitstringEncoding α] (l : List Bool) : Option α := toEncoding.decode l
Uses 1 · Used by 312
Statement usesBitstring encodings
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · Decoding inverts bitstring encoding · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Decoding natural-number payloads never fails · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Raw field projection agrees with the pair decoder · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The primality decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

TheoremDecoding inverts bitstring encoding#✓fully proved

Let \(\alpha\) be a type with a canonical bitstring encoding. For every \(a \in \alpha\), decoding the bitstring encoding of \(a\) succeeds and returns \(a\).

@[simp]
theorem bitDecode_bitEncode [BitstringEncoding α] (a : α) :
    bitDecode (bitEncode a) = some a
Uses 3 · Used by 309
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Raw field projection agrees with the pair decoder · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionSelf-delimiting form of a bitstring#✓fully proved

The self-delimiting form of a bitstring \((b_1, \dots, b_n)\) is \((\mathrm{true}, b_1, \dots, \mathrm{true}, b_n, \mathrm{false})\): each bit is preceded by \(\mathrm{true}\) and the block is terminated by \(\mathrm{false}\). In particular the empty bitstring becomes \((\mathrm{false})\).

def delimit : List Bool → List Bool
  | [] => [false]
  | b :: l => true :: b :: delimit l
Used by 367
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · The CNF decoder inverts the length-prefixed CNF code · Prefix-free code of a natural number · Polynomial-time many-one reduction · Parsing a self-delimiting block · List canonicalizer normalizes a sequence of framed payloads · List canonicalizer normalizes one element · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Successful block parsing reconstructs the input · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Normalizing framed number payloads at most triples the length · Frame counter yields the number of raw frames in unary · One frame adds one unary count bit · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Frame emitter takes one step per payload bit plus one · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Number-pair projector normalizes both fields of a raw pair frame · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Raw field projection agrees with the pair decoder · Pair-frame splitter extracts both raw fields · Pair-frame splitter projects every well-framed input in linear time · Reading a complete framed block · Converter turns a unary count into a canonical binary frame · Converter turns a unary count into a raw canonical binary payload · Decoded block count is at most the input length · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · Parsing a framed head leaves the raw remainder · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Self-delimiting code of a block of ones · Dense CNF-SAT is in NP · Binary codes of literals on variables one less than a power of two · The dense certificate check runs in polynomial time · SAT accepts the code of a formula exactly when it is satisfiable · Unparsable input is not in SAT · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT verifier verifies SAT · The literal count is at most the code length · A clause has at most as many tokens as code bits · Tokenizer run on one clause · Tokenizer rejects undecodable clauses · Tokenizer rejects an undecodable literal · Tokenizer run on one literal · Tokenizer rejects undecodable literals · Reading the literals of a clause · Reading a name block · Rejecting run · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · Doubling pass maps a number block to the block of its double · Doubling pass doubles every number in a list · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · Bit-string encoding of SUBSET-SUM instances · The fixed no-instance of SUBSET-SUM · Delimiting a bit list that ends in true · Subset-sum emitter: one vertex number · Run of the vertex-number phase of the subset-sum emitter · Decoding a SUBSET-SUM instance inverts its encoding · Run of the VERTEX-COVER to SUBSET-SUM machine · SUBSET-SUM is characterized by its verifier · Run of the target-output phase of the subset-sum emitter · The verifier rejects a chosen block that ends in false · Adding a canonical chosen block · Skipping a number block · Reading the target block · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · Bit length of the sum is at most the input length · The summing loop of the SUBSET-SUM verifier · Framed input of two natural numbers · The SUBSET-SUM verifier machine · Binary addition of framed numbers in quadratic time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · SUBSET-SUM verifier computes the mask-selected sum · Embedded SUBSET-SUM summing component reaches the mapped label · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Code of a fresh literal · Code of a renamed literal · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · Correctness of the SAT-to-3SAT reduction on bit strings · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionParsing one self-delimiting block#✓fully proved

Write booleans as bits, with true as \(1\) and false as \(0\). Reading a list of bits from the front, a \(0\) ends the block, and a \(1\) followed by a bit \(b\) contributes \(b\) to the payload. The result is the payload together with the rest of the list after the terminating \(0\). Parsing fails if the list runs out before a terminating \(0\) is read.

def undelimit : List Bool → Option (List Bool × List Bool)
  | false :: rest => some ([], rest)
  | true :: b :: input => (undelimit input).map fun p => (b :: p.1, p.2)
  | _ => none
Used by 338
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · The complexity class NP · The complexity class P · Bounded parsing of self-delimiting blocks · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · The CNF decoder inverts the length-prefixed CNF code · Decoding a prefix-coded natural number · Polynomial-time many-one reduction · Parsing a self-delimiting block · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Pair-list projector emits one weight and one value frame per item · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Successful block parsing reconstructs the input · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoding a pair of naturals fails exactly on a malformed first frame · Canonical payloads of a decoded pair are bounded by the raw input · Number-pair projector reaches the decoding outcome · Embedded number-pair projector preserves outside stacks · Number-pair projector fails on malformed framing in linear time · Number-pair projector yields both canonical payloads on success · Pair-frame splitter reaches the framing outcome · Raw field projection agrees with the pair decoder · Embedded pair-frame splitter preserves caller stacks · Pair-frame splitter fails on malformed first-field framing · Pair-frame splitter projects every well-framed input in linear time · Framed block reader fails on truncated framing · Decoded block count is at most the input length · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Decoded pair exposes its raw component payloads · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · Parsing a framed head leaves the raw remainder · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · SAT accepts the code of a formula exactly when it is satisfiable · Unparsable input is not in SAT · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT verifier verifies SAT · Tokenizer rejects undecodable clauses · Tokenizer rejects an undecodable literal · Tokenizer rejects undecodable literals · Rejecting an unterminated name block · Rejecting run · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The fixed no-instance of SUBSET-SUM · Decoding a SUBSET-SUM instance inverts its encoding · The verifier rejects an unterminated chosen block · The verifier rejects an unterminated skipped block · The verifier rejects an unterminated target block · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · The summing loop of the SUBSET-SUM verifier · The SUBSET-SUM verifier machine · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · SUBSET-SUM verifier computes the mask-selected sum · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · Correctness of the SAT-to-3SAT reduction on bit strings · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionBounded parsing of self-delimiting blocks#✓fully proved

Given a bound \(n\) and a list of booleans \(s\), the parse returns the empty list of payloads if \(s\) is empty. If \(s\) is nonempty and \(n = 0\) it fails. If \(s\) is nonempty and \(n = m + 1\), it parses one self-delimiting block from the front of \(s\), then parses the remaining list with bound \(m\), and returns the first payload followed by the payloads of the rest. It fails if either step fails. So the parse succeeds exactly when \(s\) is the concatenation of at most \(n\) self-delimiting blocks, and it returns their payloads in order.

def undelimitBlocksAux : ℕ → List Bool → Option (List (List Bool))
  | _, [] => some []
  | 0, _ :: _ => none
  | fuel + 1, input =>
    (undelimit input).bind fun p => (undelimitBlocksAux fuel p.2).map (p.1 :: ·)
Uses 1 · Used by 304
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · The complexity class NP · The complexity class P · Parsing a list of booleans into self-delimiting blocks · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Successful block parsing reconstructs the input · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Decoded block count is at most the input length · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · Parsing a framed head leaves the raw remainder · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionParsing a list of booleans into self-delimiting blocks#✓fully proved

Given a list of booleans \(s\), this repeatedly parses one self-delimiting block from the front of \(s\) until \(s\) is used up, allowing at most as many blocks as the length of \(s\), and returns the list of payloads in order. It fails if some block fails to parse. The bound never binds, since every block uses at least one bit. So the parse succeeds exactly when \(s\) is a concatenation of self-delimiting blocks.

def undelimitBlocks (input : List Bool) : Option (List (List Bool)) :=
  undelimitBlocksAux input.length input
Uses 1 · Used by 301
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · The perfect-graph decision problem · The word problem of Aut(Fₙ) for a family of automorphisms · The Circuit Value Problem · Directed \(s\)-\(t\) connectivity · Geography as a decision problem · The decision problem \(\mathrm{QSAT}_k\) · Universality of postfix regular expressions with squaring · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Succinct 3SAT · Succinct Circuit Value · TQBF as a decision problem · UNSAT as a decision problem · Parameterized Clique · FPT-reductions · FPT time · Weighted circuit satisfiability with bounded weft and depth · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Log-space uniform circuit families · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Permanent of an encoded 0-1 matrix · Permanent of an encoded 0-1 matrix · Counting satisfying assignments of a CNF formula · Number of satisfying assignments of an encoded DNF formula · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold language of a counting function · The MAJSAT language · Encodings of a graph class as a decision problem · Encodings of a class of ordered graphs · Encodings of a class of ordered graphs · Algebraic extension oracles · The quadratic diagonal language is in P · Polynomial-time many-one reduction · List canonicalizer reaches the decoding outcome with canonical output · Embedded list canonicalizer preserves outside stacks · List canonicalizer fails on malformed input · List canonicalizer runs in linear time on decodable input · Payload normalization is polynomial-time · Pair-list projector main loop emits both lists in reverse · Projected pair lists total at most four times the input length · Pair-list projector always terminates at the decoding outcome · Embedded pair-list projector preserves outside stacks · Pair-list projector fails on malformed input in linear time · Pair-list projector yields canonical weight and value lists · Decoding a list of naturals is block parsing then number decoding · Re-encoded decoded list of naturals is linear in raw input · Re-encoding decoded payloads normalizes each one · Frame counter decides decodability and counts length in unary · Embedded frame counter preserves caller stacks · Frame counter fails on malformed list framing · Frame counter counts every successfully decoded list of naturals · Canonical bit-list decoder · Polynomial-time decoder of the canonical bit-list encoding · Polynomial-time encoder to the canonical bit-list encoding · Four-output decoder output is at most twice the input length · Four-output decoder reaches exactly the canonical decoding outcome · Embedded four-output decoder preserves outside stacks · Four-output decoder fails on malformed input · Four-output decoder emits four canonical outputs on success · Canonical encoding of a pair of bit lists · Polynomial-time conversion to the verifier's pair encoding · Quadratic encoding bound for vertex lists below \(n\) · Length bound for a list in the first field of a decoded pair · Decoded list has at most one element per input bit · Length bound for the middle list of a decoded triple · Length bound for a list in the second field of a decoded pair · Framed length bound for lists of \(m\)-bit naturals · Parsing a framed head leaves the raw remainder · List decoder consumes one raw payload at a time · Malformed first frame makes list decoding fail · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · EDGE COLORING as a decision problem · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · The BANDWIDTH decision problem · GRAPH COLORING as a decision problem · GRAPH HOMOMORPHISM as a decision problem · LINEAR ORDERING (TOURNAMENTS) as a decision problem · The LIST COLORING decision problem · MAXIMUM CUT as a decision problem · MAXIMUM k-CUT as a decision problem · The decision problem MINIMUM BISECTION · The MINIMUM LINEAR ARRANGEMENT decision problem · The MULTIWAY CUT decision problem · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO TRIANGLES as a decision problem · PRECOLORING EXTENSION as a decision problem · The decision problem BALANCED BICLIQUE · The biclique edge cover decision problem · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · DENSEST k-SUBGRAPH as a decision problem · DOMINATING SET as a decision problem · The EDGE DOMINATING SET decision problem · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · FEEDBACK ARC SET as a decision problem · FEEDBACK VERTEX SET as a decision problem · INDEPENDENT DOMINATING SET as a decision problem · The MAXIMUM INDUCED MATCHING decision problem · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · ODD CYCLE TRANSVERSAL as a decision problem · ROMAN DOMINATION as a decision problem · The decision problem TOTAL DOMINATING SET · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · The bin packing decision problem · Exact-cardinality subset sum as a decision problem · The KNAPSACK decision problem · MULTIPLE KNAPSACK as a decision problem · The MULTIWAY NUMBER PARTITION decision problem · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Padding reduction has linear output length · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION decision problem · Binary PARTITION decider is correct on canonical encodings · Binary-coded PARTITION is in NP · Program of the raw-input SUBSET-SUM to PARTITION machine · Encoded reduction from SUBSET-SUM to PARTITION · Correctness of the encoded SUBSET-SUM to PARTITION reduction · Encoded SUBSET-SUM to PARTITION map has linear output length · Encoded reduction from PARTITION to SUBSET-SUM · Correctness of the encoded PARTITION to SUBSET-SUM reduction · Quadratic run of the raw-input SUBSET-SUM to PARTITION machine · Quadratic run of the padding machine on canonical instances · Raw-input PARTITION membership machine runs in quadratic time · Canonical PARTITION membership transducer runs in quadratic time · Polynomial-time reduction from SUBSET-SUM to PARTITION · Bitlength of a PARTITION sum is at most the encoded length · PARTITION membership instance has linear bitlength · The STRIP PACKING decision problem · SUBSET PRODUCT as a decision problem · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · The asymmetric traveling salesperson decision problem · Capacitated vehicle routing as a decision problem · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · The directed Hamiltonian cycle decision problem · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · The decision problem LONGEST CYCLE · The LONGEST PATH decision problem · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · The decision problem MAXIMUM LEAF SPANNING TREE · MINIMUM EQUIVALENT DIGRAPH as a decision problem · DIRECTED PATH COVER as a decision problem · The STEINER TREE decision problem · SUBGRAPH ISOMORPHISM as a decision problem · Symmetric TSP as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · DIRECTED DISJOINT PATHS as a decision problem · The 1-in-3-SAT decision problem · 3-SAT with bounded occurrences as a decision problem · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · The BETWEENNESS decision problem · Binary constraint satisfaction as a decision problem · The CIRCUIT SAT decision problem · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY as a decision problem · The MINIMUM 2-SATISFIABILITY decision problem · The MINIMUM ONES 3-SAT decision problem · MONOTONE 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT as a decision problem · Job sequencing with deadlines, processing times and profits as a decision problem · The PARALLEL MACHINES WITH DEADLINES decision problem · The precedence-constrained multiprocessor scheduling decision problem · Resource-constrained project scheduling as a decision problem · Single-machine scheduling with release times and deadlines as a decision problem · The 3-machine flow shop scheduling decision problem · The TOTAL TARDINESS decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · The weighted number of tardy jobs decision problem · 3-DIMENSIONAL MATCHING as a decision problem · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER as a decision problem · The FACILITY LOCATION decision problem · The generalized assignment decision problem · The MAXIMUM COVERAGE decision problem · Maximum n-times coverage decision problem · The MINIMUM TEST SET decision problem · Generalized nonmetric k-center as a decision problem · The k-MEDIAN decision problem · QUADRATIC ASSIGNMENT as a decision problem · The SET COVER decision problem · The SET PACKING decision problem · The SET SPLITTING decision problem · The Akari decision problem · The CLOSEST STRING decision problem · LATIN SQUARE COMPLETION as a decision problem · The LONGEST COMMON SUBSEQUENCE decision problem · Minesweeper consistency as a decision problem · The NONOGRAM decision problem · The SHORTEST COMMON SUPERSEQUENCE decision problem · SUDOKU as a decision problem · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · Value of a MAX-3SAT assignment · L-reductions · The MAX-3SAT objective · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · 2-SAT as a decision problem · The marking algorithm is polynomial-time · PATH ∈ P · Decision version of hypergraph \(k\)-cut · Integer linear-programming feasibility in fixed dimension · Rational linear-program feasibility · General matching decision problem · Max-flow decision problem · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Easy on average · Key pair produced by a key generator · Eavesdropping advantage against a public-key scheme · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Directed graph non-isomorphism as a decision problem · No-instances of the 2-local Hamiltonian problem · Yes-instances of the 2-local Hamiltonian problem · Polynomial-time reduction between promise problems · QMA for promise problems · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · Valiant-Vazirani: SAT reduces to UniqueSAT · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

Complexity Theory

AbbreviationDecision problems#✓fully proved

A decision problem is a function from finite lists of booleans (bitstrings) to booleans.

abbrev DecisionProblem := List Bool → Bool
Sources
  • inlined from FormalConjectures (absent from Mathlib).
Used by 439
Used byEdmonds's question: an NP description of perfect graphs · The perfect-graph decision problem · Polynomial-time word problem for Aut(Fₙ) (Kourovka 16.109) · The word problem of Aut(Fₙ) for a family of automorphisms · Majority is not in AC0 · Parity is not in AC0 · NC is contained in P · NC^1 is contained in L · Smolensky: parity is not in AC0(mod 3) · Williams: NEXP is not contained in ACC0 · The Circuit Value Problem · The Circuit Value Problem is P-complete · Directed \(s\)-\(t\) connectivity · ST-connectivity is NL-complete · Geography as a decision problem · Geography is PSPACE-complete · \(\mathrm{QSAT}_k\) is \(\Sigma_k^p\)-complete, uniformly in \(k\) · The decision problem \(\mathrm{QSAT}_k\) · Regular expressions with squaring: universality is EXPSPACE-complete · Universality of postfix regular expressions with squaring · The model checking, satisfiability and validity problems of the linear modal μ-calculus are PSPACE-complete · Linear μ-calculus model checking as a decision problem · Linear μ-calculus satisfiability as a decision problem · Linear μ-calculus validity as a decision problem · Modal μ-calculus satisfiability as a decision problem · Satisfiability of a modal μ-calculus formula is EXPTIME-complete · Succinct 3SAT · Succinct 3SAT is NEXP-complete · Succinct Circuit Value · Succinct Circuit Value is EXP-complete · TQBF as a decision problem · TQBF is PSPACE-complete · UNSAT is coNP-complete · UNSAT as a decision problem · NEXP is contained in EXPSPACE · NL is contained in P · NP is contained in PSPACE · PSPACE is contained in EXP · Immerman-Szelepcsenyi theorem: NL = coNL · Karp-Lipton theorem: NP in P/poly collapses PH · Ladner's theorem: NP-intermediate languages exist · Mahaney's theorem: sparse NP-complete sets imply P = NP · NP-complete decision problems · Sparse decision problems · The polynomial hierarchy is contained in PSPACE · From declared-time to polynomial-time many-one reductions · A declared-time reduction followed by a decider for the target decides the source · Declared polynomial time is preserved under precomposition with a reduction · Declared-time many-one reduction by a timed function · Declared-time many-one reduction is reflexive · Declared-time many-one reductions compose · Every decision problem has a timed decider in declared polynomial time · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Verifying a decision problem with a witness bound · Pulling a verifier back along a declared reduction · A decider is a verifier with witness bound zero · Problems in P are decided in polynomial time by single-tape machines · Polynomial time on single-tape machines · The class coNP · Complexity classes · The complexity class NP · The complexity class P · The class \(\mathsf{AC}^0\) · The class \(\mathsf{AC}^0(m)\) · The class \(\mathsf{ACC}^0\) · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · The class coAM · The class coMA · The class coRP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · The class E · The class EXP · The class EXPSPACE · The class IP · Language of a decision problem · Deterministic logarithmic space · Log-space many-one reductions · The class MA (Merlin–Arthur) · The majority language · Membership in coMA · Membership in coRP · Membership in NC · NP membership pulls back along polynomial many-one reductions · The class NC · NC is the union of its levels · The class NC^k · The NC hierarchy is increasing · The complexity class NEXP · The complexity class NL · The complexity class NPSPACE · NP relative to an oracle · The parity language · Probabilistically checkable proofs · The polynomial hierarchy · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · Polynomial space for decision problems · Polynomial time with an oracle · Polynomial time with a #P oracle · The class RP · Preimage of SAT under a polynomial-time map is in NP · The class \(\Sigma_k^p\) · ZPP · ZPP is the intersection of RP and coRP · ZPP is contained in coRP · ZPP is contained in RP · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold languages of #P functions are in PSPACE · Threshold language of a counting function · Toda's theorem: PH is contained in \(\mathsf{P}^{\#\mathsf{P}}\) · The MAJSAT language · MAJSAT is PP-complete · NP is contained in PP · PP is contained in PSPACE · Fagin's theorem: NP is existential second-order logic · Encodings of a graph class as a decision problem · Immerman-Vardi: FO + least fixed point is P on ordered structures · Encodings of a class of ordered graphs · Immerman: FO + transitive closure is NL on ordered structures · Encodings of a class of ordered graphs · Aaronson-Wigderson: the algebrization barrier · The decision problem of a family of Boolean functions · Usefulness against P/poly · An oracle separates NP from coNP · There is a PSPACE language outside L (space-hierarchy separation) · Time classes on codes · Some step is needed · Monotonicity of time classes on codes · A hierarchy within codes, given an upper bound · Time classes are not empty once the bound exceeds the input length · Deciding within a time bound · The diagonal language · The diagonal language through the clocked evaluator · The diagonal argument · The quadratic diagonal language is in P · Diagonalization across models · Deciding within a larger time bound · The diagonal language in polynomial time, given the reformatting machine · Polynomial time is not contained in code time \(n^2 + 1\) · There is an EXP language outside P (time-hierarchy separation) · Polynomial-time many-one reduction · SAT as a decision problem · Cook-Levin for dense CNF-SAT · Every NP problem reduces to dense CNF-SAT · Cook–Levin theorem: SAT is NP-complete · Dense CNF-SAT as a decision problem · Dense CNF-SAT is in NP · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · SAT is in NP · Cook–Levin theorem · 3SAT is in NP · ACHROMATIC NUMBER as a decision problem · ACHROMATIC NUMBER is NP-complete · EDGE COLORING as a decision problem · EDGE COLORING is NP-complete · 3-COLOR · 3-COLOR is in NP · 3-COLOR is NP-complete · 3-COLOR is NP-hard · The BANDWIDTH decision problem · BANDWIDTH is NP-complete · GRAPH COLORING as a decision problem · GRAPH COLORING is NP-complete · GRAPH HOMOMORPHISM as a decision problem · GRAPH HOMOMORPHISM is NP-complete · LINEAR ORDERING (TOURNAMENTS) as a decision problem · LINEAR ORDERING (TOURNAMENTS) is NP-complete · The LIST COLORING decision problem · LIST COLORING is NP-complete · MAXIMUM CUT as a decision problem · MAXIMUM CUT is NP-complete · MAXIMUM k-CUT as a decision problem · MAXIMUM k-CUT is NP-complete · The decision problem MINIMUM BISECTION · MINIMUM BISECTION is NP-complete · The MINIMUM LINEAR ARRANGEMENT decision problem · MINIMUM LINEAR ARRANGEMENT is NP-complete · The MULTIWAY CUT decision problem · MULTIWAY CUT is NP-complete · PARTITION INTO PATHS OF LENGTH 2 · PARTITION INTO PATHS OF LENGTH 2 is NP-complete · PARTITION INTO TRIANGLES as a decision problem · PARTITION INTO TRIANGLES is NP-complete · PRECOLORING EXTENSION as a decision problem · PRECOLORING EXTENSION is NP-complete · The decision problem BALANCED BICLIQUE · BALANCED BICLIQUE is NP-complete · The biclique edge cover decision problem · BICLIQUE EDGE COVER is NP-complete · CLIQUE · INDEPENDENT-SET · Language of graph instances with a property · The VERTEX-COVER problem · Correctness of the complementing map from CLIQUE to INDEPENDENT-SET · CLIQUE is in NP · CLIQUE is NP-complete · CLIQUE is NP-hard · INDEPENDENT-SET is in NP · INDEPENDENT-SET is NP-complete · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is in NP · VERTEX-COVER (exact size k) is NP-complete · VERTEX-COVER (exact size k) is NP-hard · The decision problem CONNECTED DOMINATING SET · CONNECTED DOMINATING SET is NP-complete · DENSEST k-SUBGRAPH as a decision problem · DENSEST k-SUBGRAPH is NP-complete · DOMINATING SET as a decision problem · DOMINATING SET is NP-complete · The EDGE DOMINATING SET decision problem · EDGE DOMINATING SET is NP-complete · EFFICIENT DOMINATION (PERFECT CODE) as a decision problem · EFFICIENT DOMINATION (PERFECT CODE) is NP-complete · FEEDBACK ARC SET as a decision problem · FEEDBACK ARC SET is NP-complete · FEEDBACK VERTEX SET as a decision problem · FEEDBACK VERTEX SET is NP-complete · INDEPENDENT DOMINATING SET as a decision problem · INDEPENDENT DOMINATING SET is NP-complete · The MAXIMUM INDUCED MATCHING decision problem · MAXIMUM INDUCED MATCHING is NP-complete · The MINIMUM FILL-IN (CHORDAL COMPLETION) problem · MINIMUM FILL-IN (CHORDAL COMPLETION) is NP-complete · ODD CYCLE TRANSVERSAL as a decision problem · ODD CYCLE TRANSVERSAL is NP-complete · ROMAN DOMINATION as a decision problem · ROMAN DOMINATION is NP-complete · The decision problem TOTAL DOMINATING SET · TOTAL DOMINATING SET is NP-complete · 0-1 INTEGER PROGRAMMING FEASIBILITY is NP-complete · 0-1 integer programming feasibility as a decision problem · 3-PARTITION as a decision problem · 3-PARTITION is NP-complete · The bin packing decision problem · BIN PACKING is NP-complete · Exact-cardinality subset sum as a decision problem · EXACT-CARDINALITY SUBSET SUM is NP-complete · The KNAPSACK decision problem · KNAPSACK is NP-complete · MULTIPLE KNAPSACK as a decision problem · MULTIPLE KNAPSACK is NP-complete · The MULTIWAY NUMBER PARTITION decision problem · MULTIWAY NUMBER PARTITION is NP-complete · NUMERICAL 3-DIMENSIONAL MATCHING is NP-complete · NUMERICAL 3-DIMENSIONAL MATCHING as a decision problem · Binary-coded PARTITION decision problem · Binary-coded PARTITION is in NP · PARTITION is NP-complete · The STRIP PACKING decision problem · STRIP PACKING is NP-complete · SUBSET PRODUCT as a decision problem · SUBSET PRODUCT is NP-complete · The SUBSET-SUM problem · SUBSET-SUM is in NP · SUBSET-SUM is NP-complete · SUBSET-SUM is NP-hard · Unbounded knapsack as a decision problem · UNBOUNDED KNAPSACK is NP-complete · The asymmetric traveling salesperson decision problem · TRAVELING SALESPERSON (ASYMMETRIC) is NP-complete · Capacitated vehicle routing as a decision problem · CAPACITATED VEHICLE ROUTING is NP-complete · DEGREE-CONSTRAINED SPANNING TREE as a decision problem · DEGREE-CONSTRAINED SPANNING TREE is NP-complete · The directed Hamiltonian cycle decision problem · HAMILTONIAN CYCLE (DIRECTED) is NP-complete · The HAMPATH problem · HAMPATH is in NP · HAMPATH is NP-complete · HAMPATH is NP-hard · INDUCED SUBGRAPH ISOMORPHISM as a decision problem · INDUCED SUBGRAPH ISOMORPHISM is NP-complete · The decision problem LONGEST CYCLE · LONGEST CYCLE is NP-complete · The LONGEST PATH decision problem · LONGEST PATH is NP-complete · MAXIMUM COMMON INDUCED SUBGRAPH as a decision problem · MAXIMUM COMMON INDUCED SUBGRAPH is NP-complete · The decision problem MAXIMUM LEAF SPANNING TREE · MAXIMUM LEAF SPANNING TREE is NP-complete · MINIMUM EQUIVALENT DIGRAPH as a decision problem · MINIMUM EQUIVALENT DIGRAPH is NP-complete · DIRECTED PATH COVER as a decision problem · DIRECTED PATH COVER is NP-complete · The STEINER TREE decision problem · STEINER TREE is NP-complete · SUBGRAPH ISOMORPHISM as a decision problem · SUBGRAPH ISOMORPHISM is NP-complete · Symmetric TSP as a decision problem · TRAVELING SALESPERSON (SYMMETRIC) is NP-complete · HAMILTONIAN CYCLE (UNDIRECTED) as a decision problem · HAMILTONIAN CYCLE (UNDIRECTED) is NP-complete · HAMILTONIAN PATH (UNDIRECTED) as a decision problem · HAMILTONIAN PATH (UNDIRECTED) is NP-complete · DIRECTED DISJOINT PATHS as a decision problem · DIRECTED DISJOINT PATHS is NP-complete · The 1-in-3-SAT decision problem · 1-IN-3-SAT is NP-complete · 3-SAT with bounded occurrences as a decision problem · 3-SAT WITH BOUNDED OCCURRENCES is NP-complete · NP-hardness transfers along reductions · Transitivity of polynomial-time many-one reductions · The 3SAT decision problem · 3SAT is NP-complete · 3SAT is NP-hard · The BETWEENNESS decision problem · BETWEENNESS is NP-complete · Binary constraint satisfaction as a decision problem · BINARY CONSTRAINT SATISFACTION is NP-complete · The CIRCUIT SAT decision problem · CIRCUIT SAT is NP-complete · MAXIMUM 2-SATISFIABILITY as a decision problem · MAXIMUM 2-SATISFIABILITY is NP-complete · MAXIMUM SATISFIABILITY as a decision problem · MAXIMUM SATISFIABILITY is NP-complete · The MINIMUM 2-SATISFIABILITY decision problem · MINIMUM 2-SATISFIABILITY is NP-complete · The MINIMUM ONES 3-SAT decision problem · MINIMUM ONES 3-SAT is NP-complete · MONOTONE 3-SAT as a decision problem · MONOTONE 3-SAT is NP-complete · NOT-ALL-EQUAL 3-SAT as a decision problem · NOT-ALL-EQUAL 3-SAT is NP-complete · Job sequencing with deadlines, processing times and profits as a decision problem · JOB SEQUENCING WITH DEADLINES, PROCESSING TIMES, AND PROFITS is NP-complete · The PARALLEL MACHINES WITH DEADLINES decision problem · PARALLEL MACHINES WITH DEADLINES is NP-complete · The precedence-constrained multiprocessor scheduling decision problem · PRECEDENCE-CONSTRAINED MULTIPROCESSOR SCHEDULING is NP-complete · Resource-constrained project scheduling as a decision problem · RESOURCE-CONSTRAINED PROJECT SCHEDULING is NP-complete · Single-machine scheduling with release times and deadlines as a decision problem · SINGLE-MACHINE SCHEDULING WITH RELEASE TIMES AND DEADLINES is NP-complete · The 3-machine flow shop scheduling decision problem · 3-MACHINE FLOW SHOP SCHEDULING is NP-complete · The TOTAL TARDINESS decision problem · TOTAL TARDINESS is NP-complete · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE as a decision problem · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE is NP-complete · The weighted number of tardy jobs decision problem · WEIGHTED NUMBER OF TARDY JOBS is NP-complete · 3-DIMENSIONAL MATCHING as a decision problem · 3-DIMENSIONAL MATCHING is NP-complete · EXACT COVER BY 3-SETS as a decision problem · EXACT COVER BY 3-SETS is NP-complete · EXACT COVER as a decision problem · EXACT COVER is NP-complete · The FACILITY LOCATION decision problem · FACILITY LOCATION is NP-complete · The generalized assignment decision problem · GENERALIZED ASSIGNMENT is NP-complete · The MAXIMUM COVERAGE decision problem · MAXIMUM COVERAGE is NP-complete · Maximum n-times coverage decision problem · MAXIMUM n-TIMES COVERAGE is NP-complete · The MINIMUM TEST SET decision problem · MINIMUM TEST SET is NP-complete · Generalized nonmetric k-center as a decision problem · k-CENTER (GENERALIZED, NONMETRIC) is NP-complete · The k-MEDIAN decision problem · k-MEDIAN (GENERALIZED, NONMETRIC) is NP-complete · QUADRATIC ASSIGNMENT as a decision problem · QUADRATIC ASSIGNMENT is NP-complete · The SET COVER decision problem · SET COVER is NP-complete · The SET PACKING decision problem · SET PACKING is NP-complete · The SET SPLITTING decision problem · SET SPLITTING is NP-complete · The Akari decision problem · AKARI (LIGHT UP) is NP-complete · The CLOSEST STRING decision problem · CLOSEST STRING is NP-complete · LATIN SQUARE COMPLETION as a decision problem · LATIN SQUARE COMPLETION is NP-complete · The LONGEST COMMON SUBSEQUENCE decision problem · LONGEST COMMON SUBSEQUENCE is NP-complete · Minesweeper consistency as a decision problem · MINESWEEPER CONSISTENCY is NP-complete · The NONOGRAM decision problem · NONOGRAM is NP-complete · The SHORTEST COMMON SUPERSEQUENCE decision problem · SHORTEST COMMON SUPERSEQUENCE is NP-complete · SUDOKU as a decision problem · SUDOKU is NP-complete · The PCP theorem: NP = PCP(O(log n), O(1)) · 2-SAT as a decision problem · 2-SAT is in P · The primality decision problem · PRIMES is in P · The PATH problem · PATH ∈ P · Decision version of hypergraph \(k\)-cut · The EGRES question on hypergraph \(k\)-cut for fixed \(k\) · Integer linear-programming feasibility in fixed dimension · Integer linear programming in fixed dimension is in P (Lenstra) · Rational linear-program feasibility · Linear programming is in P (Khachiyan) · General matching decision problem · General matching is in P (Edmonds' blossom algorithm) · Max-flow decision problem · Max flow is in P (Edmonds-Karp) · Ruciński's question on perfect matchings in dense hypergraphs · Perfect matching in uniform hypergraphs with a codegree condition · Undirected s-t connectivity as a decision problem · Undirected ST-connectivity is in L (Reingold) · Easy on average · Hard on average · Heuristica · Impagliazzo's five worlds · Pessiland · Nisan-Wigderson: exponential hardness in E derandomizes BPP · Adleman's theorem: BPP is contained in P/poly · AM is contained in \(\Pi_2^p\) (Babai) · MA is contained in AM · MA is contained in PH · BPP is contained in PSPACE · RP is contained in BPP · RP is contained in NP · BQP is contained in PP · BQP is contained in PSPACE · Public-coin interactive proofs · Directed graph isomorphism as a decision problem · Graph isomorphism is in NP and coAM · Directed graph non-isomorphism as a decision problem · Graph non-isomorphism is in AM · Sipser-Gács-Lautemann: BPP is in \(\Sigma_2^p\) and \(\Pi_2^p\) · SAT with a unary variable count as a decision problem · UniqueSAT with a unary variable count as a decision problem · P is closed under polynomial-time preimages

AbbreviationComplexity classes#✓fully proved

A complexity class is a set of decision problems.

abbrev DecisionComplexityClass := Set DecisionProblem
Sources
  • inlined from FormalConjectures (absent from Mathlib).
Uses 1 · Used by 275
Statement usesDecision problems
Used byEdmonds's question: an NP description of perfect graphs · Polynomial-time word problem for Aut(Fₙ) (Kourovka 16.109) · Majority is not in AC0 · Parity is not in AC0 · NC is contained in P · NC^1 is contained in L · Smolensky: parity is not in AC0(mod 3) · Williams: NEXP is not contained in ACC0 · The Circuit Value Problem is P-complete · ST-connectivity is NL-complete · Geography is PSPACE-complete · \(\mathrm{QSAT}_k\) is \(\Sigma_k^p\)-complete, uniformly in \(k\) · Regular expressions with squaring: universality is EXPSPACE-complete · The model checking, satisfiability and validity problems of the linear modal μ-calculus are PSPACE-complete · Satisfiability of a modal μ-calculus formula is EXPTIME-complete · Succinct 3SAT is NEXP-complete · Succinct Circuit Value is EXP-complete · TQBF is PSPACE-complete · UNSAT is coNP-complete · NEXP is contained in EXPSPACE · NL is contained in P · NP is contained in PSPACE · PSPACE is contained in EXP · Immerman-Szelepcsenyi theorem: NL = coNL · Karp-Lipton theorem: NP in P/poly collapses PH · Ladner's theorem: NP-intermediate languages exist · Mahaney's theorem: sparse NP-complete sets imply P = NP · NP-complete decision problems · If P = NP then the polynomial hierarchy collapses to P · The polynomial hierarchy is contained in PSPACE · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · Problems in P are decided in polynomial time by single-tape machines · Polynomial time on single-tape machines · Savitch's theorem: NPSPACE = PSPACE · The class coNP · The complexity class NP · The complexity class P · The class \(\mathsf{AC}^0\) · The class \(\mathsf{AC}^0(m)\) · The class \(\mathsf{ACC}^0\) · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · The class coAM · The class coMA · The class coRP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · The class E · The class EXP · The class EXPSPACE · The class IP · Deterministic logarithmic space · The class MA (Merlin–Arthur) · Membership in coMA · Membership in coRP · Membership in NC · NP membership pulls back along polynomial many-one reductions · The class NC · NC is the union of its levels · The class NC^k · The NC hierarchy is increasing · The complexity class NEXP · The complexity class NL · The complexity class NPSPACE · NP relative to an oracle · Probabilistically checkable proofs · The polynomial hierarchy · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · Polynomial space for decision problems · Polynomial time with an oracle · Polynomial time with a #P oracle · The class RP · Preimage of SAT under a polynomial-time map is in NP · The class \(\Sigma_k^p\) · ZPP · ZPP is the intersection of RP and coRP · ZPP is contained in coRP · ZPP is contained in RP · Stockmeyer: approximate counting of #P functions in BPP^NP · Threshold languages of #P functions are in PSPACE · Toda's theorem: PH is contained in \(\mathsf{P}^{\#\mathsf{P}}\) · MAJSAT is PP-complete · NP is contained in PP · PP is contained in PSPACE · Fagin's theorem: NP is existential second-order logic · Immerman-Vardi: FO + least fixed point is P on ordered structures · Immerman: FO + transitive closure is NL on ordered structures · Aaronson-Wigderson: the algebrization barrier · Usefulness against P/poly · Baker-Gill-Solovay: oracles separate and collapse P vs NP · An oracle separates NP from coNP · There is a PSPACE language outside L (space-hierarchy separation) · Time classes on codes · Some step is needed · Monotonicity of time classes on codes · A hierarchy within codes, given an upper bound · Time classes are not empty once the bound exceeds the input length · The diagonal argument · The quadratic diagonal language is in P · Diagonalization across models · Polynomial time is not contained in code time \(n^2 + 1\) · There is an EXP language outside P (time-hierarchy separation) · Cook-Levin for dense CNF-SAT · Every NP problem reduces to dense CNF-SAT · Cook–Levin theorem: SAT is NP-complete · Dense CNF-SAT is in NP · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · SAT is in NP · Cook–Levin theorem · 3SAT is in NP · ACHROMATIC NUMBER is NP-complete · EDGE COLORING is NP-complete · 3-COLOR is in NP · 3-COLOR is NP-complete · 3-COLOR is NP-hard · BANDWIDTH is NP-complete · GRAPH COLORING is NP-complete · GRAPH HOMOMORPHISM is NP-complete · LINEAR ORDERING (TOURNAMENTS) is NP-complete · LIST COLORING is NP-complete · MAXIMUM CUT is NP-complete · MAXIMUM k-CUT is NP-complete · MINIMUM BISECTION is NP-complete · MINIMUM LINEAR ARRANGEMENT is NP-complete · MULTIWAY CUT is NP-complete · PARTITION INTO PATHS OF LENGTH 2 is NP-complete · PARTITION INTO TRIANGLES is NP-complete · PRECOLORING EXTENSION is NP-complete · BALANCED BICLIQUE is NP-complete · BICLIQUE EDGE COVER is NP-complete · CLIQUE is in NP · CLIQUE is NP-complete · CLIQUE is NP-hard · INDEPENDENT-SET is in NP · INDEPENDENT-SET is NP-complete · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is in NP · VERTEX-COVER (exact size k) is NP-complete · VERTEX-COVER (exact size k) is NP-hard · CONNECTED DOMINATING SET is NP-complete · DENSEST k-SUBGRAPH is NP-complete · DOMINATING SET is NP-complete · EDGE DOMINATING SET is NP-complete · EFFICIENT DOMINATION (PERFECT CODE) is NP-complete · FEEDBACK ARC SET is NP-complete · FEEDBACK VERTEX SET is NP-complete · INDEPENDENT DOMINATING SET is NP-complete · MAXIMUM INDUCED MATCHING is NP-complete · MINIMUM FILL-IN (CHORDAL COMPLETION) is NP-complete · ODD CYCLE TRANSVERSAL is NP-complete · ROMAN DOMINATION is NP-complete · TOTAL DOMINATING SET is NP-complete · 0-1 INTEGER PROGRAMMING FEASIBILITY is NP-complete · 3-PARTITION is NP-complete · BIN PACKING is NP-complete · EXACT-CARDINALITY SUBSET SUM is NP-complete · KNAPSACK is NP-complete · MULTIPLE KNAPSACK is NP-complete · MULTIWAY NUMBER PARTITION is NP-complete · NUMERICAL 3-DIMENSIONAL MATCHING is NP-complete · Binary-coded PARTITION is in NP · PARTITION is NP-complete · STRIP PACKING is NP-complete · SUBSET PRODUCT is NP-complete · SUBSET-SUM is in NP · SUBSET-SUM is NP-complete · SUBSET-SUM is NP-hard · UNBOUNDED KNAPSACK is NP-complete · TRAVELING SALESPERSON (ASYMMETRIC) is NP-complete · CAPACITATED VEHICLE ROUTING is NP-complete · DEGREE-CONSTRAINED SPANNING TREE is NP-complete · HAMILTONIAN CYCLE (DIRECTED) is NP-complete · HAMPATH is in NP · HAMPATH is NP-complete · HAMPATH is NP-hard · INDUCED SUBGRAPH ISOMORPHISM is NP-complete · LONGEST CYCLE is NP-complete · LONGEST PATH is NP-complete · MAXIMUM COMMON INDUCED SUBGRAPH is NP-complete · MAXIMUM LEAF SPANNING TREE is NP-complete · MINIMUM EQUIVALENT DIGRAPH is NP-complete · DIRECTED PATH COVER is NP-complete · STEINER TREE is NP-complete · SUBGRAPH ISOMORPHISM is NP-complete · TRAVELING SALESPERSON (SYMMETRIC) is NP-complete · HAMILTONIAN CYCLE (UNDIRECTED) is NP-complete · HAMILTONIAN PATH (UNDIRECTED) is NP-complete · DIRECTED DISJOINT PATHS is NP-complete · 1-IN-3-SAT is NP-complete · 3-SAT WITH BOUNDED OCCURRENCES is NP-complete · NP-hardness transfers along reductions · 3SAT is NP-complete · 3SAT is NP-hard · BETWEENNESS is NP-complete · BINARY CONSTRAINT SATISFACTION is NP-complete · CIRCUIT SAT is NP-complete · MAXIMUM 2-SATISFIABILITY is NP-complete · MAXIMUM SATISFIABILITY is NP-complete · MINIMUM 2-SATISFIABILITY is NP-complete · MINIMUM ONES 3-SAT is NP-complete · MONOTONE 3-SAT is NP-complete · NOT-ALL-EQUAL 3-SAT is NP-complete · JOB SEQUENCING WITH DEADLINES, PROCESSING TIMES, AND PROFITS is NP-complete · PARALLEL MACHINES WITH DEADLINES is NP-complete · PRECEDENCE-CONSTRAINED MULTIPROCESSOR SCHEDULING is NP-complete · RESOURCE-CONSTRAINED PROJECT SCHEDULING is NP-complete · SINGLE-MACHINE SCHEDULING WITH RELEASE TIMES AND DEADLINES is NP-complete · 3-MACHINE FLOW SHOP SCHEDULING is NP-complete · TOTAL TARDINESS is NP-complete · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE is NP-complete · WEIGHTED NUMBER OF TARDY JOBS is NP-complete · 3-DIMENSIONAL MATCHING is NP-complete · EXACT COVER BY 3-SETS is NP-complete · EXACT COVER is NP-complete · FACILITY LOCATION is NP-complete · GENERALIZED ASSIGNMENT is NP-complete · MAXIMUM COVERAGE is NP-complete · MAXIMUM n-TIMES COVERAGE is NP-complete · MINIMUM TEST SET is NP-complete · k-CENTER (GENERALIZED, NONMETRIC) is NP-complete · k-MEDIAN (GENERALIZED, NONMETRIC) is NP-complete · QUADRATIC ASSIGNMENT is NP-complete · SET COVER is NP-complete · SET PACKING is NP-complete · SET SPLITTING is NP-complete · AKARI (LIGHT UP) is NP-complete · CLOSEST STRING is NP-complete · LATIN SQUARE COMPLETION is NP-complete · LONGEST COMMON SUBSEQUENCE is NP-complete · MINESWEEPER CONSISTENCY is NP-complete · NONOGRAM is NP-complete · SHORTEST COMMON SUPERSEQUENCE is NP-complete · SUDOKU is NP-complete · Hastad: optimal inapproximability of MAX-3SAT · MAX-CUT has no PTAS unless P = NP · The PCP theorem: NP = PCP(O(log n), O(1)) · 2-SAT is in P · PRIMES is in P · PATH ∈ P · The EGRES question on hypergraph \(k\)-cut for fixed \(k\) · Integer linear programming in fixed dimension is in P (Lenstra) · Linear programming is in P (Khachiyan) · General matching is in P (Edmonds' blossom algorithm) · Max flow is in P (Edmonds-Karp) · Ruciński's question on perfect matchings in dense hypergraphs · Undirected ST-connectivity is in L (Reingold) · Algorithmica · Heuristica · Impagliazzo's five worlds · Pessiland · Nisan-Wigderson: exponential hardness in E derandomizes BPP · One-way functions imply P ≠ NP · Adleman's theorem: BPP is contained in P/poly · AM is contained in \(\Pi_2^p\) (Babai) · MA is contained in AM · MA is contained in PH · BPP is contained in PSPACE · RP is contained in BPP · RP is contained in NP · BQP is contained in PP · BQP is contained in PSPACE · Goldwasser-Sipser: private coins add no power to interactive proofs · Public-coin interactive proofs · Graph isomorphism is in NP and coAM · Graph non-isomorphism is in AM · IP = PSPACE (Shamir) · Sipser-Gács-Lautemann: BPP is in \(\Sigma_2^p\) and \(\Pi_2^p\) · P is closed under polynomial-time preimages

DefinitionPolynomial-time computability under given encodings#✓fully proved

Let \(e_\alpha\) encode \(\alpha\) as words over an alphabet \(\Gamma_\alpha\) and \(e_\beta\) encode \(\beta\) as words over \(\Gamma_\beta\). A function \(f : \alpha \to \beta\) is polynomial-time computable with respect to \(e_\alpha\) and \(e_\beta\) when there are a multi-stack Turing machine with finitely many stacks, function labels and internal states and a finite input stack alphabet, identifications of its input and output stack alphabets with \(\Gamma_\alpha\) and \(\Gamma_\beta\), and a polynomial \(p\) with natural-number coefficients, such that for every \(a \in \alpha\) the machine, started at its main function in its initial state with \(e_\alpha(a)\) on its input stack and every other stack empty, halts within \(p(n)\) steps, where \(n\) is the length of \(e_\alpha(a)\), with \(e_\beta(f(a))\) on its output stack, every other stack empty and its internal state equal to its initial state.

def IsPolyTimeWithEncoding {α β Γα Γβ : Type} (ea : Encoding α Γα)
    (eb : Encoding β Γβ) (f : α → β) :=
  Nonempty (Turing.TM2ComputableInPolyTime ea.encode eb.encode f)
Sources
  • inlined from FormalConjectures (absent from Mathlib).
Used by 2

DefinitionPolynomial-time computable functions#✓fully proved

Let \(\alpha\) and \(\beta\) be types with canonical bitstring encodings. A function \(f : \alpha \to \beta\) is polynomial-time computable when it is polynomial-time computable with respect to the canonical bitstring encodings of \(\alpha\) and \(\beta\).

def IsPolyTime {α β : Type} [BitstringEncoding α] [BitstringEncoding β]
    (f : α → β) : Prop :=
  IsPolyTimeWithEncoding (BitstringEncoding.toEncoding (α := α))
    (BitstringEncoding.toEncoding (α := β)) f
Sources
  • inlined from FormalConjectures (absent from Mathlib).
Uses 2 · Used by 103
Used byTheorem 3 (Smith's remoteness of exact slow k-NIM is polynomial-time computable) · FPT time · From declared-time to polynomial-time many-one reductions · A timed verifier with polynomial-time output function puts its language in NP · A timed decider with polynomial-time output function gives membership in P · The complexity class NP · The complexity class P · The class \(\mathsf{AM}\) (Arthur–Merlin) · BPP · BQP · coNP is closed under polynomial-time preimages · NP is closed under polynomial-time preimages · Polynomial many-one reductions also reduce complements · FPTAS is contained in PTAS · The class IP · Constant-factor approximable problems · Fully polynomial-time approximation schemes · NPO optimization problems · One-way function families · One-way permutation families · Polynomial-time approximation schemes · Output of a polynomial-time map is polynomial in raw input length · The class MA (Merlin–Arthur) · Mapping the first component of a pair is polynomial-time · NP membership pulls back along polynomial many-one reductions · NP relative to an oracle · One-way permutations are one-way functions · Probabilistically checkable proofs · The universal levels of the polynomial hierarchy · Probabilistic polynomial time with unbounded error · Polynomial time with polynomial advice · PTAS is contained in APX · Polynomial time with an oracle · Polynomial time with a #P oracle · Polynomial-time maps run on unframed bit lists · The class RP · Preimage of SAT under a polynomial-time map is in NP · The counting class \(\#P\) · \(\#P\)-complete functions · The class \(\Sigma_k^p\) · Jerrum-Sinclair-Vigoda: FPRAS for the permanent · Karp-Luby: FPRAS for DNF counting · Stockmeyer: approximate counting of #P functions in BPP^NP · Algebraic extension oracles · Polynomial-time many-one reduction · Payload normalization is polynomial-time · Every NP problem reduces to dense CNF-SAT · The Cook–Levin reduction is polynomial-time · Dense CNF-SAT is in NP · The dense certificate check runs in polynomial time · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · The dense-to-binary translation is polynomial-time in the canonical encoding · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · The SAT host's answer is polynomial-time · The SAT verifier is polynomial-time · 3SAT is in NP · 3-COLOR is in NP · 3-COLOR is NP-hard · The SAT-to-3-COLOR reduction is polynomial-time · CLIQUE ≤ INDEPENDENT-SET is polynomial-time · INDEPENDENT-SET ≤ VERTEX-COVER is polynomial-time · SAT ≤ CLIQUE is polynomial-time · CLIQUE is NP-hard · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is NP-hard · SUBSET-SUM to PARTITION map is polynomial-time · PARTITION to SUBSET-SUM map is polynomial-time · PARTITION doubling pass is polynomial-time · Binary-coded PARTITION is in NP · Polynomial-time reduction from SUBSET-SUM to PARTITION · The VERTEX-COVER to SUBSET-SUM reduction is polynomial-time · SUBSET-SUM is in NP · SUBSET-SUM is NP-hard · HAMPATH is in NP · HAMPATH is NP-hard · SAT ≤ HAMPATH is polynomial-time · Emitter reductions out of SAT are polynomial-time · The SAT-to-3SAT reduction is polynomial-time · Transitivity of polynomial-time many-one reductions · SAT reduces to 3SAT · Membership in APX · Hastad: optimal inapproximability of MAX-3SAT · L-reductions · MAXSNP problems · NPO problems · Dinur's gap amplification and alphabet reduction · The marking algorithm is polynomial-time · PATH ∈ P · Easy on average · One-way functions exist · Public-key encryption exists · Samplable distributions · Public-coin interactive proofs · Polynomial-time reduction between promise problems · QMA for promise problems · Valiant-Vazirani: SAT reduces to UniqueSAT · Polynomial-time functions are closed under composition · P is closed under polynomial-time preimages · Decider host · Reduction host, canonical form · Verifier host, canonical form

DefinitionThe complexity class P#✓fully proved

P is the set of decision problems (functions from lists of booleans to booleans) that are computable in polynomial time by a deterministic multi-stack Turing machine, with respect to the canonical bitstring encodings of inputs and outputs.

def P : DecisionComplexityClass :=
  { L | IsPolyTime L }
Uses 11 · Used by 32

DefinitionThe complexity class NP#✓fully proved

NP is the set of decision problems \(L\) (functions from lists of booleans to booleans) for which there exist a polynomial \(p\) with natural-number coefficients and a polynomial-time computable function \(R\) from pairs of lists of booleans to booleans such that, for every list of booleans \(x\), \(L(x)\) is true if and only if there is a list of booleans \(w\) whose length is at most \(p\) evaluated at the length of \(x\) and for which \(R(x, w)\) is true.

Polynomial time is measured with respect to the canonical bitstring encodings.

def NP : DecisionComplexityClass :=
  { L | ∃ (p : Polynomial ℕ), ∃ R : (List Bool × List Bool) → Bool,
      IsPolyTime R ∧
      ∀ x, L x ↔ ∃ w : List Bool, w.length ≤ p.eval x.length ∧ R (x, w) }
Uses 11 · Used by 159
Used byEdmonds's question: an NP description of perfect graphs · NP is contained in PSPACE · Karp-Lipton theorem: NP in P/poly collapses PH · Ladner's theorem: NP-intermediate languages exist · Mahaney's theorem: sparse NP-complete sets imply P = NP · NP-complete decision problems · If P = NP then the polynomial hierarchy collapses to P · A timed verifier with polynomial-time output function puts its language in NP · The class coNP · NP is closed under polynomial-time preimages · NP membership pulls back along polynomial many-one reductions · Preimage of SAT under a polynomial-time map is in NP · Stockmeyer: approximate counting of #P functions in BPP^NP · NP is contained in PP · Fagin's theorem: NP is existential second-order logic · Cook-Levin for dense CNF-SAT · Every NP problem reduces to dense CNF-SAT · Cook–Levin theorem: SAT is NP-complete · Dense CNF-SAT is in NP · Cook–Levin for binary-index CNF-SAT, given a polynomial-time verifier · Every NP problem reduces to binary-index CNF-SAT · SAT is in NP if its verifier is polynomial-time · SAT is in NP · Cook–Levin theorem · 3SAT is in NP · ACHROMATIC NUMBER is NP-complete · EDGE COLORING is NP-complete · 3-COLOR is in NP · 3-COLOR is NP-complete · 3-COLOR is NP-hard · BANDWIDTH is NP-complete · GRAPH COLORING is NP-complete · GRAPH HOMOMORPHISM is NP-complete · LINEAR ORDERING (TOURNAMENTS) is NP-complete · LIST COLORING is NP-complete · MAXIMUM CUT is NP-complete · MAXIMUM k-CUT is NP-complete · MINIMUM BISECTION is NP-complete · MINIMUM LINEAR ARRANGEMENT is NP-complete · MULTIWAY CUT is NP-complete · PARTITION INTO PATHS OF LENGTH 2 is NP-complete · PARTITION INTO TRIANGLES is NP-complete · PRECOLORING EXTENSION is NP-complete · BALANCED BICLIQUE is NP-complete · BICLIQUE EDGE COVER is NP-complete · CLIQUE is in NP · CLIQUE is NP-complete · CLIQUE is NP-hard · INDEPENDENT-SET is in NP · INDEPENDENT-SET is NP-complete · INDEPENDENT-SET is NP-hard · NP membership from the CLIQUE, INDEPENDENT-SET and VERTEX-COVER verifier · VERTEX-COVER (exact size k) is in NP · VERTEX-COVER (exact size k) is NP-complete · VERTEX-COVER (exact size k) is NP-hard · CONNECTED DOMINATING SET is NP-complete · DENSEST k-SUBGRAPH is NP-complete · DOMINATING SET is NP-complete · EDGE DOMINATING SET is NP-complete · EFFICIENT DOMINATION (PERFECT CODE) is NP-complete · FEEDBACK ARC SET is NP-complete · FEEDBACK VERTEX SET is NP-complete · INDEPENDENT DOMINATING SET is NP-complete · MAXIMUM INDUCED MATCHING is NP-complete · MINIMUM FILL-IN (CHORDAL COMPLETION) is NP-complete · ODD CYCLE TRANSVERSAL is NP-complete · ROMAN DOMINATION is NP-complete · TOTAL DOMINATING SET is NP-complete · 0-1 INTEGER PROGRAMMING FEASIBILITY is NP-complete · 3-PARTITION is NP-complete · BIN PACKING is NP-complete · EXACT-CARDINALITY SUBSET SUM is NP-complete · KNAPSACK is NP-complete · MULTIPLE KNAPSACK is NP-complete · MULTIWAY NUMBER PARTITION is NP-complete · NUMERICAL 3-DIMENSIONAL MATCHING is NP-complete · Binary-coded PARTITION is in NP · PARTITION is NP-complete · STRIP PACKING is NP-complete · SUBSET PRODUCT is NP-complete · SUBSET-SUM is in NP · SUBSET-SUM is NP-complete · SUBSET-SUM is NP-hard · UNBOUNDED KNAPSACK is NP-complete · TRAVELING SALESPERSON (ASYMMETRIC) is NP-complete · CAPACITATED VEHICLE ROUTING is NP-complete · DEGREE-CONSTRAINED SPANNING TREE is NP-complete · HAMILTONIAN CYCLE (DIRECTED) is NP-complete · HAMPATH is in NP · HAMPATH is NP-complete · HAMPATH is NP-hard · INDUCED SUBGRAPH ISOMORPHISM is NP-complete · LONGEST CYCLE is NP-complete · LONGEST PATH is NP-complete · MAXIMUM COMMON INDUCED SUBGRAPH is NP-complete · MAXIMUM LEAF SPANNING TREE is NP-complete · MINIMUM EQUIVALENT DIGRAPH is NP-complete · DIRECTED PATH COVER is NP-complete · STEINER TREE is NP-complete · SUBGRAPH ISOMORPHISM is NP-complete · TRAVELING SALESPERSON (SYMMETRIC) is NP-complete · HAMILTONIAN CYCLE (UNDIRECTED) is NP-complete · HAMILTONIAN PATH (UNDIRECTED) is NP-complete · DIRECTED DISJOINT PATHS is NP-complete · 1-IN-3-SAT is NP-complete · 3-SAT WITH BOUNDED OCCURRENCES is NP-complete · NP-hardness transfers along reductions · 3SAT is NP-complete · 3SAT is NP-hard · BETWEENNESS is NP-complete · BINARY CONSTRAINT SATISFACTION is NP-complete · CIRCUIT SAT is NP-complete · MAXIMUM 2-SATISFIABILITY is NP-complete · MAXIMUM SATISFIABILITY is NP-complete · MINIMUM 2-SATISFIABILITY is NP-complete · MINIMUM ONES 3-SAT is NP-complete · MONOTONE 3-SAT is NP-complete · NOT-ALL-EQUAL 3-SAT is NP-complete · JOB SEQUENCING WITH DEADLINES, PROCESSING TIMES, AND PROFITS is NP-complete · PARALLEL MACHINES WITH DEADLINES is NP-complete · PRECEDENCE-CONSTRAINED MULTIPROCESSOR SCHEDULING is NP-complete · RESOURCE-CONSTRAINED PROJECT SCHEDULING is NP-complete · SINGLE-MACHINE SCHEDULING WITH RELEASE TIMES AND DEADLINES is NP-complete · 3-MACHINE FLOW SHOP SCHEDULING is NP-complete · TOTAL TARDINESS is NP-complete · SINGLE-MACHINE WEIGHTED COMPLETION WITH PRECEDENCE is NP-complete · WEIGHTED NUMBER OF TARDY JOBS is NP-complete · 3-DIMENSIONAL MATCHING is NP-complete · EXACT COVER BY 3-SETS is NP-complete · EXACT COVER is NP-complete · FACILITY LOCATION is NP-complete · GENERALIZED ASSIGNMENT is NP-complete · MAXIMUM COVERAGE is NP-complete · MAXIMUM n-TIMES COVERAGE is NP-complete · MINIMUM TEST SET is NP-complete · k-CENTER (GENERALIZED, NONMETRIC) is NP-complete · k-MEDIAN (GENERALIZED, NONMETRIC) is NP-complete · QUADRATIC ASSIGNMENT is NP-complete · SET COVER is NP-complete · SET PACKING is NP-complete · SET SPLITTING is NP-complete · AKARI (LIGHT UP) is NP-complete · CLOSEST STRING is NP-complete · LATIN SQUARE COMPLETION is NP-complete · LONGEST COMMON SUBSEQUENCE is NP-complete · MINESWEEPER CONSISTENCY is NP-complete · NONOGRAM is NP-complete · SHORTEST COMMON SUPERSEQUENCE is NP-complete · SUDOKU is NP-complete · Hastad: optimal inapproximability of MAX-3SAT · MAX-CUT has no PTAS unless P = NP · The PCP theorem: NP = PCP(O(log n), O(1)) · Algorithmica · Heuristica · Impagliazzo's five worlds · Pessiland · One-way functions imply P ≠ NP · RP is contained in NP · Graph isomorphism is in NP and coAM

DefinitionThe class coNP#✓fully proved

The class coNP. coNP is the set of decision problems \(L\) whose complement, the decision problem that accepts exactly the bitstrings that \(L\) rejects, belongs to NP.

def coNP : DecisionComplexityClass :=
  { L | Lᶜ ∈ NP }
Sources
  • inlined from FormalConjectures (absent from Mathlib).
Uses 3 · Used by 2

The dependency explorer needs JavaScript and its graph data.

Download the complete graph data.