A polynomial-time counting reduction is usually used to transform instances of a known-hard problem into instances of another problem that is to be proven hard. It consists of two functions and, both of which must be computable in polynomial time. The function transforms inputs for into inputs for, and the function transforms outputs for into outputs for. These two functions must preserve the correctness of the output. That is, suppose that one transforms an input for problem to an input for problem, and then one solves to produce an output. It must be the case that the transformed output is the correct output for the original input. That is, if the input-output relations of and are expressed as functions, then their function composition must obey the identity. Alternatively, expressed in terms of algorithms, one possible algorithm for solving would be to apply to transform the problem into an instance of, solve that instance, and then apply to transform the output of into the correct answer for.
Relation to other kinds of reduction
As a special case, a parsimonious reduction is a polynomial-time transformation 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.
A functional problem 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 is said to be ♯P-hard if there exists a polynomial-time counting reduction from every problem in ♯P to. If, in addition, itself belongs to ♯P, then is said to be ♯P-complete. The usual method of proving a problem in ♯P to be ♯P-complete is to start with a single known ♯P-complete problem and find a polynomial-time counting reduction from to. If this reduction exists, then there exists a reduction from any other problem in ♯P to, obtained by composing a reduction from the other problem to with the reduction from to.