Counting complexity Created 2026-09-28 Updated 2026-11-05
Counting complexity studies the computational resources needed to count solutions. For a polynomial time decidable binary relation and a polynomial , a standard counting function isThe complexity class consists of these functions, equivalently the numbers of accepting computations of Nondeterministic Turing machines running in polynomial time. The witness encoding matters: counting computation paths and counting distinct outputs can give different answers.
For the propositional formula , the satisfying Boolean valuations are , and , so the answer is three. The associated decision problem asks only whether that count is positive. For a zero-one matrix, the permanent of a matrix counts perfect matchings in a bipartite graph. Testing whether any such perfect matching exists admits a polynomial-time algorithm, while counting them is -complete under polynomial-time Turing reductions.[ref]
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 .
Polynomial-time Turing reduction 2026-11-05
A polynomial-time Turing reduction from a decision problem to a decision problem is a deterministic algorithm deciding membership in in polynomial time when allowed to query whether strings belong to . An oracle Turing machine models each query answer as a single oracle operation, while writing the query and using the answer still costs time. Queries may depend on earlier answers.
For example, the complement of reduces to by asking one membership question and reversing its answer. This is a Turing reduction, regardless of whether there is a simple many-one reduction with the same effect. A polynomial-time many-one reduction instead computes one transformed instance whose answer is used unchanged.
If reduces to this way and has a polynomial-time algorithm, then does too: substitute that algorithm at each oracle call. Polynomially many queries of polynomial length keep the total cost polynomial. Completeness claims must specify which reduction is intended because adaptive access is more permissive.