ArticleslgStudy

science

TFNP

TFNP is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand TFNP rather than just read about it. In short: In computational complexity theory, the complexity class TFNP is the class of total function problems that can be solved in nondeterministic polynomial time. That is, it is the class of function problems that are guaranteed to have an answer, and this answer can be checked in polynomial time, or equivalently it is the subset of FNP where a solution is guaranteed to exist.

TFNP — main illustration
TFNP — illustration

Key takeaways

  • TFNP belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect TFNP to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of TFNP from memory before moving on to harder problems.

Reference excerpt

In computational complexity theory, the complexity class TFNP is the class of total function problems that can be solved in nondeterministic polynomial time. That is, it is the class of function problems that are guaranteed to have an answer, and this answer can be checked in polynomial time, or equivalently it is the subset of FNP where a solution is guaranteed to exist. The abbreviation TFNP stands for "Total Function Nondeterministic Polynomial". TFNP contains many natural problems that are of interest to computer scientists. These problems include integer factorization, finding a Nash equilibrium of a game, and searching for local optima. TFNP is widely conjectured to contain problems that are computationally intractable, and several such problems have been shown to be hard under cryptographic assumptions. However, there are no known unconditional intractability results or results showing TFNP-hardness of TFNP problems. In fact, TFNP is believed not to have any complete problems.

Formal definition The class TFNP is formally defined as follows.

A binary relation P(x,y) is in TFNP if and only if there is a deterministic polynomial time algorithm that can determine whether P(x,y) holds given both x and y, and for every x, there exists a y that is at most polynomially longer than x such that P(x,y) holds. It was first defined by Megiddo and Papadimitriou in 1989, although TFNP problems and subclasses of TFNP had been defined and studied earlier.

Examples

Pigeonhole principle problem Input: A (polynomially computable) mapping f that maps a set of n + 1 items to a set of n items. Question: Find two items a and b such that f(a) = f(b). Let x be a mapping, and y a 2-tuple of items in its domain. The binary relation in question P(x,y) has the meaning "the images of both entries of y under x are equal", which, since the mapping is polynomially computable, is polynomially decidable. Moreover, such tuple y must exist for any mapping because of the pigeonhole principle.

Connections to other complexity classes

F(NP ∩ coNP) The complexity class 𝖥(𝖭𝖯∩𝖼𝗈𝖭𝖯) can be defined in two different ways, and those ways are not known to be equivalent. One way applies F to the machine model for 𝖭𝖯∩𝖼𝗈𝖭𝖯. It is known that with this definition, 𝖥(𝖭𝖯∩𝖼𝗈𝖭𝖯) coincides with TFNP. To see this, first notice that the inclusion 𝖳𝖥𝖭𝖯⊆𝖥(𝖭𝖯∩𝖼𝗈𝖭𝖯) follows easily from the definitions of the classes. All "yes" answers to problems in TFNP can be easily verified by definition, and since problems in TFNP are total, there are no "no" answers, so it is vacuously true that "no" answers can be easily verified. For the reverse inclusion, let R be a binary relation in 𝖥(𝖭𝖯∩𝖼𝗈𝖭𝖯). Decompose R into R1∪R2 such that (x,0y)∈R1 precisely when (x,y)∈R and y is a "yes" answer, and let R2 be ⁠(x,1y)⁠ such ⁠(x,y)∈R⁠ and y is a "no" answer. Then the binary relation R1∪R2 is in TFNP. The other definition uses that 𝖭𝖯∩𝖼𝗈𝖭𝖯 is known to be a well-behaved class of decision problems, and applies F to that class. With this definition, if 𝖭𝖯∩𝖼𝗈𝖭𝖯=𝖯 then 𝖥(𝖭𝖯∩𝖼𝗈𝖭𝖯)=𝖥𝖯.

Connection to NP

NP is one of the most widely studied complexity classes. The conjecture that there are intractable problems in NP is widely accepted and often used as the most basic hardness assumption. Therefore, it is only natural to ask how TFNP is related to NP. It is not difficult to see that solutions to problems in NP can imply solutions to problems in TFNP. However, there are no TFNP problems which are known to be NP-hard. Intuition for this fact comes from the fact that problems in TFNP are total. For a problem to be NP-hard, there must exist a reduction from some NP-complete problem to the problem of interest. A typical reduction from problem A to problem B is performed by creating and analyzing a map that sends "yes" instances of A to "yes" instances of B and "no" instances of A to "no" instances of B. However, TFNP problems are total, so there are no "no" instances for this type of reduction, causing common techniques to be difficult to apply. Beyond this rough intuition, there are several concrete results that suggest that it might be difficult or even impossible to prove NP-hardness for TFNP problems. For example, if any TFNP problem is NP-complete, then NP = coNP, which is generally conjectured to be false, but is still a major open problem in complexity theory. This lack of connections with NP is a major motivation behind the study of TFNP as its own independent class.

Notable subclasses The structure of TFNP is often studied through the study of its subclasses. These subclasses are defined by the mathematical theorem by which solutions to the problems are guaranteed. One appeal of studying subclasses of TFNP is that although TFNP is believed not to have any complete problems, these subclasses are defined by a certain complete problem, making them easier to reason about.

PLS

PLS (standing for "Polynomial Local Search") is a class of problems designed to model the process of searching for a local optimum for a function. In particular, it is the class of total function problems that are polynomial-time reducible to the following problem

Given input circuits S and C each with n input and output bits, find x such that ⁠C(S(x))≤C(X)⁠. It contains the class CLS.

PPA

PPA (standing for "Polynomial time Parity Argument") is the class of problems whose solution is guaranteed by the handshaking lemma: any undirected graph with an odd degree vertex must have another odd degree vertex. It contains the subclass PPAD. Notable PPA-complete problems include LONELY: given a circuit that defines a partial matching on {0,1}n such that 0→ is unmatched, find another unmatched vertex.

PPP

PPP (standing for "Polynomial time Pigeonhole Principle") is the class of problems whose solution is guaranteed by the Pigeonhole principle. More precisely, it is the class of problems that can be reduced in polynomial time to the Pigeon problem, defined as follows

Given circuit C with n input and output bits, find x such that ⁠C(x)=0⁠ or x ≠ y such that ⁠C(x)=C(y)⁠. PPP contains the classes PPAD and PWPP. Notable problems in this class include the short integer solution problem.

PPAD

PPAD (standing for "Polynomial time Parity Argument, Directed") is a restriction of PPA to problems whose solutions are guaranteed by a directed version of the handshake lemma. It is often defined as the set of problems that are polynomial-time reducible to End-of-a-Line:

… excerpt ends here. Continue reading the full article.

Illustrations

TFNP: Diagram of inclusions between subclasses of TFNP. An arrow from class A to class B indicates A is a subset of B. All inclusions are believed to be strict, although none have been unconditionally proved to be strict.
Diagram of inclusions between subclasses of TFNP. An arrow from class A to class B indicates A is a subset of B. All inclusions are believed to be strict, although none have been unconditionally proved to be strict.

Worked examples

Example 1 — a first encounter with TFNP

Start with the simplest possible case. Write down what TFNP claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to TFNP before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about TFNP ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of TFNP

In research
TFNP appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses TFNP in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
TFNP is common in secondary-school and first-year university syllabi. It links to neighbouring topics Binary relations, Complexity classes, so understanding it makes those chapters shorter.
In everyday life
Look for TFNP outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “TFNP” →

How to study TFNP in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what TFNP means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain TFNP out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is TFNP in simple terms?

In computational complexity theory, the complexity class TFNP is the class of total function problems that can be solved in nondeterministic polynomial time. That is, it is the class of function problems that are guaranteed to have an answer, and this answer can be checked in polynomial time, or eq…

Why does TFNP matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study TFNP?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on TFNP.

Tags

  • Binary relations
  • Complexity classes

Keep exploring