Function problem
In computational complexity theory, a function problem is a computational problem where a single output (of a total function) is expected for every input, but the output is more complex than that of a decision problem. For function problems, the output is not simply 'yes' or 'no'.
Formal definition
A functional problem [math]\displaystyle{ P }[/math] is defined by a relation [math]\displaystyle{ R }[/math] over strings of an arbitrary alphabet [math]\displaystyle{ \Sigma }[/math]:
- [math]\displaystyle{ R \subseteq \Sigma^* \times \Sigma^*. }[/math]
An algorithm solves [math]\displaystyle{ P }[/math] if for every input [math]\displaystyle{ x }[/math] such that there exists a [math]\displaystyle{ y }[/math] satisfying [math]\displaystyle{ (x, y) \in R }[/math], the algorithm produces one such [math]\displaystyle{ y }[/math], and if there are no such [math]\displaystyle{ y }[/math], it rejects.
A promise function problem is allowed to do anything (thus may not terminate) if no such [math]\displaystyle{ y }[/math] exists.
Examples
A well-known function problem is given by the Functional Boolean Satisfiability Problem, FSAT for short. The problem, which is closely related to the SAT decision problem, can be formulated as follows:
- Given a boolean formula [math]\displaystyle{ \varphi }[/math] with variables [math]\displaystyle{ x_1, \ldots, x_n }[/math], find an assignment [math]\displaystyle{ x_i \rightarrow \{ \text{TRUE}, \text{FALSE} \} }[/math] such that [math]\displaystyle{ \varphi }[/math] evaluates to [math]\displaystyle{ \text{TRUE} }[/math] or decide that no such assignment exists.
In this case the relation [math]\displaystyle{ R }[/math] is given by tuples of suitably encoded boolean formulas and satisfying assignments. While a SAT algorithm, fed with a formula [math]\displaystyle{ \varphi }[/math], only needs to return "unsatisfiable" or "satisfiable", an FSAT algorithm needs to return some satisfying assignment in the latter case.
Other notable examples include the travelling salesman problem, which asks for the route taken by the salesman, and the integer factorization problem, which asks for the list of factors.
Relationship to other complexity classes
Consider an arbitrary decision problem [math]\displaystyle{ L }[/math] in the class NP. By the definition of NP, each problem instance [math]\displaystyle{ x }[/math] that is answered 'yes' has a polynomial-size certificate [math]\displaystyle{ y }[/math] which serves as a proof for the 'yes' answer. Thus, the set of these tuples [math]\displaystyle{ (x,y) }[/math] forms a relation, representing the function problem "given [math]\displaystyle{ x }[/math] in [math]\displaystyle{ L }[/math], find a certificate [math]\displaystyle{ y }[/math] for [math]\displaystyle{ x }[/math]". This function problem is called the function variant of [math]\displaystyle{ L }[/math]; it belongs to the class FNP.
FNP can be thought of as the function class analogue of NP, in that solutions of FNP problems can be efficiently (i.e., in polynomial time in terms of the length of the input) verified, but not necessarily efficiently found. In contrast, the class FP, which can be thought of as the function class analogue of P, consists of function problems whose solutions can be found in polynomial time.
Self-reducibility
Observe that the problem FSAT introduced above can be solved using only polynomially many calls to a subroutine which decides the SAT problem: An algorithm can first ask whether the formula [math]\displaystyle{ \varphi }[/math] is satisfiable. After that the algorithm can fix variable [math]\displaystyle{ x_1 }[/math] to TRUE and ask again. If the resulting formula is still satisfiable the algorithm keeps [math]\displaystyle{ x_1 }[/math] fixed to TRUE and continues to fix [math]\displaystyle{ x_2 }[/math], otherwise it decides that [math]\displaystyle{ x_1 }[/math] has to be FALSE and continues. Thus, FSAT is solvable in polynomial time using an oracle deciding SAT. In general, a problem in NP is called self-reducible if its function variant can be solved in polynomial time using an oracle deciding the original problem. Every NP-complete problem is self-reducible. It is conjectured[by whom?] that the integer factorization problem is not self-reducible, because deciding whether an integer is prime is in P (easy),[1] while the integer factorization problem is believed to be hard for a classical computer. There are several (slightly different) notions of self-reducibility.[2][3][4]
Reductions and complete problems
Function problems can be reduced much like decision problems: Given function problems [math]\displaystyle{ \Pi_R }[/math] and [math]\displaystyle{ \Pi_S }[/math] we say that [math]\displaystyle{ \Pi_R }[/math] reduces to [math]\displaystyle{ \Pi_S }[/math] if there exists polynomially-time computable functions [math]\displaystyle{ f }[/math] and [math]\displaystyle{ g }[/math] such that for all instances [math]\displaystyle{ x }[/math] of [math]\displaystyle{ R }[/math] and possible solutions [math]\displaystyle{ y }[/math] of [math]\displaystyle{ S }[/math], it holds that
- If [math]\displaystyle{ x }[/math] has an [math]\displaystyle{ R }[/math]-solution, then [math]\displaystyle{ f(x) }[/math] has an [math]\displaystyle{ S }[/math]-solution.
- [math]\displaystyle{ (f(x), y) \in S \implies (x, g(x,y)) \in R. }[/math]
It is therefore possible to define FNP-complete problems analogous to the NP-complete problem:
A problem [math]\displaystyle{ \Pi_R }[/math] is FNP-complete if every problem in FNP can be reduced to [math]\displaystyle{ \Pi_R }[/math]. The complexity class of FNP-complete problems is denoted by FNP-C or FNPC. Hence the problem FSAT is also an FNP-complete problem, and it holds that [math]\displaystyle{ \mathbf{P} = \mathbf{NP} }[/math] if and only if [math]\displaystyle{ \mathbf{FP} = \mathbf{FNP} }[/math].
Total function problems
The relation [math]\displaystyle{ R(x, y) }[/math] used to define function problems has the drawback of being incomplete: Not every input [math]\displaystyle{ x }[/math] has a counterpart [math]\displaystyle{ y }[/math] such that [math]\displaystyle{ (x, y) \in R }[/math]. Therefore the question of computability of proofs is not separated from the question of their existence. To overcome this problem it is convenient to consider the restriction of function problems to total relations yielding the class TFNP as a subclass of FNP. This class contains problems such as the computation of pure Nash equilibria in certain strategic games where a solution is guaranteed to exist. In addition, if TFNP contains any FNP-complete problem it follows that [math]\displaystyle{ \mathbf{NP} = \textbf{co-NP} }[/math].
See also
References
- ↑ Agrawal, Manindra; Kayal, Neeraj; Saxena, Nitin (2004). "PRIMES is in P". Annals of Mathematics 160 (2): 781–793. doi:10.4007/annals.2004.160.781. http://www.cse.iitk.ac.in/users/manindra/algebra/primality_v6.pdf.
- ↑ Ko, K. (1983). "On self-reducibility and weak P-selectivity". Journal of Computer and System Sciences 26 (2): 209–221.
- ↑ Schnorr, C. (1976). "Optimal algorithms for self-reducible problems". In S. Michaelson and R. Milner, editors, Proceedings of the 3rd International Colloquium on Automata, Languages, and Programming: 322–337.
- ↑ Selman, A. (1988). "Natural self-reducible sets". SIAM Journal on Computing 17 (5): 989–996.
- Raymond Greenlaw, H. James Hoover, Fundamentals of the theory of computation: principles and practice, Morgan Kaufmann, 1998, ISBN:1-55860-474-X, p. 45-51
- Elaine Rich, Automata, computability and complexity: theory and applications, Prentice Hall, 2008, ISBN:0-13-228806-0, section 28.10 "The problem classes FP and FNP", pp. 689–694
![]() | Original source: https://en.wikipedia.org/wiki/Function problem.
Read more |