Function problem

In computational complexity theory, a function problem is a problem other than a decision problem, that is, a problem requiring a more complex answer than just YES or NO.

Notable examples include the traveling salesman problem which asks for the route taken by the salesman, and the integer factorization problem, which asks for the list of factors.

Function problems are more awkward to study than decision problems because they don't have an obvious analogue in terms of languages, and because the notion of reduction between problems is more subtle as you have to transform the output as well as the input.

Function problems can be sorted into complexity classes in the same way as decision problems, for example FP is the set of function problems which can be solved by a deterministic Turing machine in polynomial time, and FNP is the set of function problems which can be solved by a non-deterministic Turing machine in polynomial time.

For all function problems there is an analogous decision problem such that the function problem can be solved by polynomial-time Turing reduction to that decision problem. For example, the decision problem analogue to the traveling salesman problem is this:

Given a weighted directed graph and an integer K, is there a Hamilton path with total weight less than or equal to K?

Given a solution to this problem, we can solve the traveling salesman problem as follows. Let <math>n<math> by the number of edges and <math>w_i<math> be the weight of edge <math>i<math>. First rescale and perturb the weights of the edges by assigning to edge <math>i<math> the new weight <math>w'_i = n^2 w_i + i<math>. This doesn't change the shortest Hamilton path, but makes sure that it is unique. Now add the weights of all edges to get a total weight <math>M<math>. Find the weight of the shortest Hamilton path by binary search: is there a Hamilton path with weight <math>< M/2<math>; is there a path with weight <math>< M/4<math> etc. Then having found the weight <math>W<math> of the shortest Hamilton path, determine which edges are in the path by asking for each edge <math>i<math> whether there is a Hamiltonian path with weight <math>W<math> for the graph modified so that edge <math>i<math> has weight <math>W+1<math> (if there is no such path in the modified graph, then edge <math>i<math> must be in the shortest path for the original graph).

This places the traveling salesman problem in the complexity class FPNP (the class of function problems which can be solved in polynomial time on a deterministic Turing machine with an oracle for a problem in NP), and in fact it is complete for that class.


  • Art and Cultures
    • Art (
    • Architecture (
    • Cultures (
    • Music (
    • Musical Instruments (
  • Biographies (
  • Clipart (
  • Geography (
    • Countries of the World (
    • Maps (
    • Flags (
    • Continents (
  • History (
    • Ancient Civilizations (
    • Industrial Revolution (
    • Middle Ages (
    • Prehistory (
    • Renaissance (
    • Timelines (
    • United States (
    • Wars (
    • World History (
  • Human Body (
  • Mathematics (
  • Reference (
  • Science (
    • Animals (
    • Aviation (
    • Dinosaurs (
    • Earth (
    • Inventions (
    • Physical Science (
    • Plants (
    • Scientists (
  • Social Studies (
    • Anthropology (
    • Economics (
    • Government (
    • Religion (
    • Holidays (
  • Space and Astronomy
    • Solar System (
    • Planets (
  • Sports (
  • Timelines (
  • Weather (
  • US States (


  • Home Page (
  • Contact Us (

  • Clip Art (
Personal tools