# Polynomial-time counting reduction

In the computational complexity theory of counting problems, a polynomial-time counting reduction is a type of reduction (a transformation from one problem to another) used to define the notion of completeness for the complexity class ♯P.[1] These reductions may also be called polynomial many-one counting reductions or weakly parsimonious reductions; they are analogous to many-one reductions for decision problems and they generalize the parsimonious reductions.[2]

## Definition

A polynomial-time counting reduction is usually used to transform instances of a known-hard problem ${\displaystyle X}$ into instances of another problem ${\displaystyle Y}$ that is to be proven hard. It consists of two functions ${\displaystyle f}$ and ${\displaystyle g}$, both of which must be computable in polynomial time. The function ${\displaystyle f}$ transforms inputs for ${\displaystyle X}$ into inputs for ${\displaystyle Y}$, and the function ${\displaystyle g}$ transforms outputs for ${\displaystyle Y}$ into outputs for ${\displaystyle X}$.[1][2]

These two functions must preserve the correctness of the output. That is, suppose that one transforms an input ${\displaystyle x}$ for problem ${\displaystyle X}$ to an input ${\displaystyle y=f(x)}$ for problem ${\displaystyle Y}$, and then one solves ${\displaystyle y}$ to produce an output ${\displaystyle z}$. It must be the case that the transformed output ${\displaystyle g(z)}$ is the correct output for the original input ${\displaystyle x}$. That is, if the input-output relations of ${\displaystyle X}$ and ${\displaystyle Y}$ are expressed as functions, then their function composition must obey the identity ${\displaystyle X=g\circ Y\circ f}$. Alternatively, expressed in terms of algorithms, one possible algorithm for solving ${\displaystyle X}$ would be to apply ${\displaystyle f}$ to transform the problem into an instance of ${\displaystyle Y}$, solve that instance, and then apply ${\displaystyle g}$ to transform the output of ${\displaystyle Y}$ into the correct answer for ${\displaystyle X}$.[1][2]

## Relation to other kinds of reduction

As a special case, a parsimonious reduction is a polynomial-time transformation ${\displaystyle f}$ on the inputs to problems that preserves the exact values of the outputs. Such a reduction can be viewed as a polynomial-time counting reduction, by using the identity function as the function ${\displaystyle g}$.[1][2]

## Applications in complexity theory

A functional problem (specified by its inputs and desired outputs) belongs to the complexity class ♯P if there exists a non-deterministic Turing machine that runs in polynomial time, for which the output to the problem is the number of accepting paths of the Turing machine. Intuitively, such problems count the number of solutions to problems in the complexity class NP. A functional problem ${\displaystyle Y}$ is said to be ♯P-hard if there exists a polynomial-time counting reduction from every problem ${\displaystyle X}$ in ♯P to ${\displaystyle Y}$. If, in addition, ${\displaystyle Y}$ itself belongs to ♯P, then ${\displaystyle Y}$ is said to be ♯P-complete.[1][2] (Sometimes, as in Valiant's original paper proving the completeness of the permanent of 0–1 matrices, a weaker notion of reduction, Turing reduction, is instead used for defining ♯P-completeness.[3])

The usual method of proving a problem ${\displaystyle Y}$ in ♯P to be ♯P-complete is to start with a single known ♯P-complete problem ${\displaystyle X}$ and find a polynomial-time counting reduction from ${\displaystyle X}$ to ${\displaystyle Y}$. If this reduction exists, then there exists a reduction from any other problem in ♯P to ${\displaystyle Y}$, obtained by composing a reduction from the other problem to ${\displaystyle X}$ with the reduction from ${\displaystyle X}$ to ${\displaystyle Y}$.[1][2]

## References

1. Gomes, Carla P.; Sabharwal, Ashish; Selman, Bart (2009), "Chapter 20. Model Counting", in Biere, Armin; Heule, Marijn; van Maaren, Hans; Walsh, Toby, Handbook of Satisfiability (PDF), Frontiers in Artificial Intelligence and Applications, 185, IOS Press, pp. 633–654, ISBN 9781586039295. See in particular pp. 634–635.
2. Creignou, Nadia; Khanna, Sanjeev; Sudan, Madhu (2001), "2.2.2 Parsimonious reductions and ♯P-completeness", Complexity classifications of Boolean constraint satisfaction problems, SIAM Monographs on Discrete Mathematics and Applications, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, pp. 12–13, doi:10.1137/1.9780898718546, ISBN 0-89871-479-6, MR 1827376
3. ^ Valiant, L. G. (1979), "The complexity of computing the permanent", Theoretical Computer Science, 8 (2): 189–201, doi:10.1016/0304-3975(79)90044-6, MR 0526203