FP (complexity): Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Citation bot
Altered isbn. Upgrade ISBN10 to 13. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Functions and mappings | #UCB_Category 88/160
 
imported>Chrisahn
Formal definition: Added justification for second condition. I hope I didn't miss anything.
 
Line 1: Line 1:
{{Short description|Complexity class}}
{{Short description|Complexity class}}
In [[computational complexity theory]], the [[complexity class]] '''FP''' is the set of [[function problem]]s that can be solved by a [[deterministic Turing machine]] in [[polynomial time]]. It is the function problem version of the [[decision problem]] class '''[[P (complexity)|P]]'''. Roughly speaking, it is the class of functions that can be efficiently computed on classical computers without randomization.
In [[computational complexity theory]], the [[complexity class]] '''FP''' is the set of [[function problem]]s that can be solved by a [[deterministic Turing machine]] in [[polynomial time]] (and for which the function problem also represents a predicate decidable in polynomial time<ref>https://complexityzoo.net/Complexity_Zoo:F#fp Complexity Zoo: FP</ref>). It is the function problem version of the [[decision problem]] class '''[[P (complexity)|P]]'''. Roughly speaking, it is the class of functions that can be efficiently computed on classical computers without randomization.


The difference between '''FP''' and '''P''' is that problems in '''P''' have one-bit, yes/no answers, while problems in '''FP''' can have any output that can be computed in polynomial time. For example, adding two numbers is an '''FP''' problem, while determining if their sum is odd is in '''P'''.<ref>{{cite book | last=Bürgisser | first=Peter | title=Completeness and reduction in algebraic complexity theory | zbl=0948.68082 | series=Algorithms and Computation in Mathematics | volume=7 | location=Berlin | publisher=[[Springer-Verlag]] | year=2000 | isbn=3-540-66752-0 | page=66 }}</ref>
The difference between '''FP''' and '''P''' is that problems in '''P''' have one-bit, yes/no answers, while problems in '''FP''' can have any output that can be computed in polynomial time. For example, adding two numbers is an '''FP''' problem, while determining if their sum is odd is in '''P'''.<ref>{{cite book | last=Bürgisser | first=Peter |authorlink = Peter Bürgisser| title=Completeness and reduction in algebraic complexity theory | zbl=0948.68082 | series=Algorithms and Computation in Mathematics | volume=7 | location=Berlin | publisher=[[Springer-Verlag]] | year=2000 | isbn=3-540-66752-0 | page=66 }}</ref>
So any decision problem in '''P''' can be thought of as a function that outputs 0 or 1, so it’s trivially in '''FP'''. In short: <math>\mathsf P \subseteq \mathsf{FP}</math>.


Polynomial-time function problems are fundamental in defining [[polynomial-time reduction]]s, which are used in turn to define the class of [[NP-complete]] problems.<ref>{{cite book | first=Elaine | last=Rich |author-link=Elaine Rich| title=Automata, computability and complexity: theory and applications | publisher=Prentice Hall | year=2008 | isbn=978-0-13-228806-4 | chapter=28.10 "The problem classes FP and FNP" | pages=689–694 | url=http://www.theoryandapplications.org/ }}</ref>
Polynomial-time function problems are fundamental in defining [[polynomial-time reduction]]s, which are used in turn to define the class of [[NP-complete]] problems.<ref>{{cite book | first=Elaine | last=Rich |author-link=Elaine Rich| title=Automata, computability and complexity: theory and applications | publisher=Prentice Hall | year=2008 | isbn=978-0-13-228806-4 | chapter=28.10 "The problem classes FP and FNP" | pages=689–694 | url=http://www.theoryandapplications.org/ }}</ref>
Line 9: Line 10:
'''FP''' is formally defined as follows:
'''FP''' is formally defined as follows:


:A [[binary relation]] <math>P(x,y)</math> is in '''FP''' if and only if there is a deterministic polynomial time algorithm that, given <math>x</math>, either finds some <math>y</math> such that <math>P(x,y)</math> holds, or signals that no such <math>y</math> exists.
:A [[binary relation]] <math>R</math> is in '''FP''' if and only if  
 
*there is a deterministic polynomial-time algorithm that, given <math>x</math>, either finds some <math>y</math> such that <math>R(x,y)</math> holds, or signals that no such <math>y</math> exists,
 
*and there is a deterministic algorithm that, given <math>x</math> and <math>y</math>, checks whether <math>R(x,y)</math> holds and runs in time polynomial in the size of <math>x</math>.
 
(The latter condition may seem redundant, but it is added to ensure that every FP problem is in FNP, since there may be multiple <math>y</math> values for which <math>R(x,y)</math> holds, and without the second condition the algorithm is not required to be able to check each of these values in polynomial time.)


==Related complexity classes==
==Related complexity classes==


* '''[[FNP (complexity)|FNP]]''' is the set of binary relations for which there is a polynomial time algorithm that, given ''x'' and ''y'', checks whether P(''x'',''y'') holds.  Just as '''P''' and '''FP''' are closely related, '''NP''' is closely related to '''[[FNP (complexity)|FNP]]'''. '''FP''' = '''FNP''' if and only if '''P''' = '''NP'''.   
* '''[[FNP (complexity)|FNP]]''' is the set of binary relations ''R'' for which there is a deterministic algorithm that, given ''x'' and ''y'', checks whether ''R''(''x'',''y'') holds and runs in time polynomial in the size of ''x''.  Just as '''P''' and '''FP''' are closely related, '''NP''' is closely related to '''FNP'''. '''FP''' = '''FNP''' if and only if '''P''' = '''NP'''.   
* Because a machine that uses logarithmic space has at most polynomially many configurations, '''[[FL (complexity)|FL]]''', the set of function problems which can be calculated in logspace, is contained in '''FP'''. It is not known whether '''FL''' = '''FP'''; this is analogous to the problem of determining whether the decision classes [[P (complexity)|P]] and [[L (complexity)|L]] are equal.  
* Because a machine that uses [[logarithmic space]] has at most polynomially many configurations, '''[[FL (complexity)|FL]]''', the set of function problems that can be calculated in logspace, is contained in '''FP'''. It is not known whether '''FL''' = '''FP'''; this is analogous to the problem of determining whether the decision classes [[P (complexity)|P]] and [[L (complexity)|L]] are equal.


==References==
==References==

Latest revision as of 23:33, 2 December 2025

Template:Short description In computational complexity theory, the complexity class FP is the set of function problems that can be solved by a deterministic Turing machine in polynomial time (and for which the function problem also represents a predicate decidable in polynomial time[1]). It is the function problem version of the decision problem class P. Roughly speaking, it is the class of functions that can be efficiently computed on classical computers without randomization.

The difference between FP and P is that problems in P have one-bit, yes/no answers, while problems in FP can have any output that can be computed in polynomial time. For example, adding two numbers is an FP problem, while determining if their sum is odd is in P.[2] So any decision problem in P can be thought of as a function that outputs 0 or 1, so it’s trivially in FP. In short: PFP.

Polynomial-time function problems are fundamental in defining polynomial-time reductions, which are used in turn to define the class of NP-complete problems.[3]

Formal definition

FP is formally defined as follows:

A binary relation R is in FP if and only if
  • there is a deterministic polynomial-time algorithm that, given x, either finds some y such that R(x,y) holds, or signals that no such y exists,
  • and there is a deterministic algorithm that, given x and y, checks whether R(x,y) holds and runs in time polynomial in the size of x.

(The latter condition may seem redundant, but it is added to ensure that every FP problem is in FNP, since there may be multiple y values for which R(x,y) holds, and without the second condition the algorithm is not required to be able to check each of these values in polynomial time.)

Related complexity classes

  • FNP is the set of binary relations R for which there is a deterministic algorithm that, given x and y, checks whether R(x,y) holds and runs in time polynomial in the size of x. Just as P and FP are closely related, NP is closely related to FNP. FP = FNP if and only if P = NP.
  • Because a machine that uses logarithmic space has at most polynomially many configurations, FL, the set of function problems that can be calculated in logspace, is contained in FP. It is not known whether FL = FP; this is analogous to the problem of determining whether the decision classes P and L are equal.

References

<templatestyles src="Reflist/styles.css" />

  1. https://complexityzoo.net/Complexity_Zoo:F#fp Complexity Zoo: FP
  2. Script error: No such module "citation/CS1".
  3. Script error: No such module "citation/CS1".

Script error: No such module "Check for unknown parameters".

External links

Script error: No such module "Navbox".