co-NP 2026-10-24
The class of decision problems whose complements belong to NP. Equivalently, negative instances admit polynomially bounded witnesses verifiable in polynomial time. A problem is co-NP-complete when it is in co-NP and every problem in co-NP has a polynomial-time reduction to it. Unsatisfiability of a propositional formula is a basic example: its complement is the NP-complete Boolean satisfiability problem.
Given a Boolean game and a query propositional formula , decide whether some pure strategy Nash equilibrium satisfies . The problem is complete for the existential second level of the polynomial hierarchy.
For membership, existentially choose a Boolean valuation and universally check every player's every unilateral deviation. The goal must remain false under all such deviations for each player whose goal is currently false. Each individual check takes polynomial time.
For hardness, start with a two-block quantified Boolean formula . Give player 1 control of and the constant true goal. Give player 2 control of and goal , and use as the query. A queried Nash equilibrium exists exactly when some choice of leaves player 2 unable to falsify by changing . This is precisely the input quantified statement, and the construction is a polynomial-time reduction.
To establish strong NP-completeness, use an explicit adjacency matrix encoding for a finite simple graph, with enough length information to recover its number of vertices. Let be the canonical binary numeral system representation of the nonnegative integer . Defineand, using the unary numeral system for ,The surrounding pairing syntax delimits the two components, so the empty unary field can encode if zero is included in the convention for natural numbers. Malformed descriptions are excluded from both formal languages.
Fix a unary no-instance , for example one isolated vertex with requested size . The polynomial-time many-one reduction isMap malformed inputs to too. When , only the numerical representation changes, so the existence of a -clique is unchanged. When , the original instance is false, since a subset of vertices cannot be larger than the whole vertex set; is false as required.
The important size bound is in the branch that writes . The original explicit graph description already has length at least , so the output has polynomial length and can be written in polynomial time. If a huge binary numeral system value is supplied, compare it with using its digit length and, when needed, a digit comparison; do not first allocate or print symbols. Merely replacing an unrestricted binary by would not be a valid polynomial-time reduction.
Thus . The unary version is in NP by the same clique complexity certificate verification, and is NP-hard by this polynomial-time many-one reduction and part (e). ThereforeThis conclusion uses the conventional explicit graph encoding; a succinct circuit description of a graph would be a different input representation and a different problem.
The halting problem is an unconditional example:Reduce SAT to it as follows. Given a Boolean formula , construct a Turing machine that ignores its input, enumerates all Boolean valuations of , and halts if it finds a satisfying one. If none satisfies , it enters an infinite loop after the enumeration. ThenThe construction of the machine description takes polynomial time; the potentially exponential running time of the constructed machine is irrelevant to the time needed to compute the polynomial-time reduction. Since SAT is NP-complete, this proves NP-hardness of the halting problem.
Every problem in NP is decidable, by enumerating the finitely many polynomial-length certificates and running the verifier. The halting problem is undecidable, so it is outside NP and therefore cannot be NP-complete.
Past exam of the computer science course of the University of Oxford 2018 Algorithms 2 b Solution 2026-10-31
Construct a set cover problem instance whose universe is the set of edges . For each vertex , supply the set of all edges incident to . A collection covers the universe if and only if every edge has an endpoint in , which is precisely the vertex cover condition.
The correspondence preserves cardinality: a vertex cover of size is a feasible solution of the set cover problem using of these sets, and conversely. If two labelled vertices produce identical sets, one can keep their labels or discard duplicate choices without changing the optimum. The construction has size when incidences are listed, so it is a polynomial-time reduction.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 38 3 Solution Created 2026-10-03 Updated 2026-10-14
For decision problems, the usual meaning of “no harder” is a polynomial-time reduction: if there is a polynomial-time computable map taking each instance of to an instance of such that is a yes-instance exactly when is. A polynomial-time algorithm for would then solve in polynomial time. A problem is NP-hard if every problem in NP admits such a reduction to it.
For a zero-sum game with rational payoff matrix , the row player can calculate its value by linear programming:The minimax theorem identifies this optimum with the game value. Rational linear programming has polynomial-time algorithms, and an optimal rational value can be compared exactly with rational in polynomial time in the binary input length. Thus the decision problem belongs to P. If it were NP-hard, composing the reductions with this algorithm would put every problem in NP in P, contradicting the assumed separation. ThereforeThe finite rational encoding is part of the computational model; arbitrary real inputs without an encoding would not define the same complexity question.
For the set cover reduction to equilibrium support, first take and assume every element belongs to some subset. Suppose rows cover . Let player 1 use the uniform mixed strategy on these rows and let player 2 play column . The row player's payoff is one for every row, so any row mixture is a best response to column . If denotes the probability that a random supported row covers element , then , and player 2's payoff from column isColumn also pays one. It is therefore a best response, giving a Nash equilibrium whose row-player support of a mixed strategy contains exactly rows.
Conversely, suppose an equilibrium has row support of size , and some element is not covered by . For that column , so player 2 can earn . This is the largest possible column payoff, and it is attained exactly at columns corresponding to elements uncovered by . The column player's mixed strategy must consequently put all its probability on these columns, with none on column . Every currently supported row gives player 1 payoff zero. Choose any positive-probability column ; because , there is some row containing . Deviating to gives strictly positive expected payoff, contradicting the best response condition. Thus must be a cover, provingunder the stated union and conditions.
The printed formulation omits both conditions. For , its payoffs contain division by zero. Without the union condition its claimed implication is false: take , , and . No selection covers , but any row mixture supported on two rows, paired with pure column , is a Nash equilibrium. The row player always gets zero, and column is the column player's strictly optimal choice with payoff two. This gives an explicit counterexample to the unrestricted wording.
These restrictions do not weaken the complexity conclusion. The set cover problem remains NP-complete when every element occurs in some subset and : globally uncovered elements and the easy cases can be recognized and replaced by fixed promised yes- or no-instances. A cover by at most subsets can be padded to exactly . The constructed game has polynomial size, so deciding whether a Nash equilibrium of the specified support size exists is NP-hard. Computing a complete description of all equilibria would resolve this question and hence is at least this difficult. In addition, the equilibrium set may be infinite; a complete output must then describe families rather than list individual points. There is a finite representation by feasible pairs of supports and their associated strategy polytopes, but there are exponentially many support pairs to consider. This reduction concerns locating specified supports or describing all equilibria, rather than finding one unrestricted equilibrium.
For the intended finite representation, put . For each , form the mintermA Boolean valuation satisfies exactly when its selected subset is . Therefore the weighted formula utility representationrepresents exactly: at the Boolean valuation for , only that minterm contributes, with weight . This proves completeness and the bound of rules simultaneously. Zero-weight rules may be omitted. The bound counts rules; writing each minterm also requires symbols in Big O notation.
For the computational question, assume rule weights are rational numbers encoded in binary. This makes exact equality of sums a finite computational task. With this conventional encoding, equivalence of weighted formula utility representations is co-NP-complete.
For membership, the complement has a short witness: a Boolean valuation on the variables occurring in either rule base. Evaluate each propositional formula, sum the weights of satisfied rules, and accept the witness if the sums differ. Propositional formula evaluation takes polynomial time. Exact sums of binary rational numbers also have polynomially bounded bit lengths: the product of their denominators has bit length at most the sum of the input denominator lengths. Thus non-equivalence lies in NP, and equivalence lies in co-NP.
For hardness, take a Boolean satisfiability problem instance and constructThe first utility function is one at satisfying Boolean valuations and zero elsewhere, while the second is always zero. ConsequentlyThe unsatisfiable Boolean formula problem is co-NP-complete, as the complement of the NP-complete Boolean satisfiability problem. The construction is a polynomial-time reduction, proving hardness even with the single weight .
Two qualifications matter in the literal wording. First, unrestricted real weights have no specified finite encoding, so a standard bit-complexity classification needs the encoding assumption above. Second, the problem says only that is nonempty. If infinite is allowed while rule bases remain finite, its completeness claim is false. For , take when is infinite and when is finite. A finite rule base mentions only a finite subset of the variables. The Boolean valuations for and agree on all those variables but have different required values. No such rule base represents this . Thus the construction answers the intended finite-set question and identifies the missing hypothesis in the unrestricted statement.
The definition in this part uses a single Boolean valuation, so the relevant Nash equilibria are pure strategy equilibria of a Boolean game. Use its standard convention that the players' control sets form a set partition of the variables.
Membership follows from an existential choice of a strategy profile and a universal check of all unilateral deviations. Assign payoff one to satisfying a player's goal and zero otherwise. A strategy profile is a Nash equilibrium precisely when, for every player and every alternative Boolean valuation of that player's variables,is true: either the goal is already satisfied or no deviation can satisfy it. Thus the requested property isThe strings encoding , and have polynomial length, and evaluating the bracketed propositional formulas takes polynomial time. Invalid encodings of a player index can simply be ignored by the test. This is the existential second level of the polynomial hierarchy, .
For hardness, reduce the canonical complete problem of deciding a two-block quantified Boolean formulaMake a two-player Boolean game: player 1 controls and has goal ; player 2 controls and has goal . Set the query formula to . The construction has size linear in the input formula.
If an assignment satisfies , combine it with any assignment . Player 1 already satisfies its goal, and player 2 cannot satisfy by any unilateral deviation. Thus is a Nash equilibrium satisfying the query.
Conversely, let be a Nash equilibrium satisfying . Player 2 currently has payoff zero. If some alternative made false, that deviation would satisfy player 2's goal and increase its payoff to one. The Nash equilibrium condition therefore implies . This proves the required equivalence and the polynomial-time reduction.
Together, membership and hardness prove -completeness of existential equilibrium checking in a Boolean game. The reduction works with only two players and one constant goal.
Polynomial-time reduction Created 2026-10-03 Updated 2026-11-05
A polynomial-time reduction uses a solver for one computational problem to solve another with polynomial overhead, while preserving the required answer. Efficiently transforming data alone is insufficient: the transformation must come with a correctness argument connecting the two tasks.
For a polynomial-time many-one reduction between decision problems , one function satisfiesA polynomial-time Turing reduction instead permits adaptively chosen queries to a solver for . Writing the queries and processing their answers count toward the reduction's resource bound. These are different reduction conventions and should be named explicitly.
If has a polynomial-time algorithm, either such reduction supplies one for : query lengths and the total number of queries are polynomially bounded, so replacing each solver call preserves a polynomial total running time. Conversely, a reduction from a hard helps establish a lower bound on .
Stephen Cook Created 2026-10-24 Updated 2026-11-05
Stephen Cook is a computer scientist whose 1971 paper established a foundational connection between the class NP and Boolean satisfiability. The Cook-Levin theorem is expressed in modern terminology by saying that Boolean satisfiability is NP-complete.[ref]
The Complexity of Theorem-Proving Procedures by Stephen A. Cook. Section 1, Theorem 1 and construction in its proof
The proof encodes the possible steps of a polynomially bounded Nondeterministic Turing machine as a Boolean formula. A satisfying assignment describes an accepting computation, and the formula has polynomial size. This makes polynomial-time reduction a way to compare apparently different computational tasks: an efficient general solver for the encoded problem would solve every problem in NP. Cook's broader work also connects mathematical logic with proof complexity.[ref]
https://www.cs.toronto.edu/~sacook/. Research publications and Logical Foundations of Proof Complexity
Portrait of Stephen Cook
. orcmid, Flickr photograph, 15 June 2012. Creative Commons Attribution 2.0 Generic., via Wikimedia Commons. Source.