Skip to content
Main menu
  • Main page
  • Discover
  • Unexpected connections
  • Topics
  • Random article
  • Search
Your library
  • Saved articles
  • Recent discoveries
  • Rabbit-hole trails
Topic areas
  • Computer Science
  • Mathematics
  • Physics
  • Engineering
  • Biology
  • Economics
  • Curiosities
WikiholeDeeper into Wikipedia
EnglishEN
  • Saved
  • History

  • Article text and media come live from Wikipedia via the official MediaWiki API and are available under the Creative Commons Attribution-ShareAlike 4.0 License; additional terms may apply. Each article links to its source and revision.
  • WikiHole is an independent project and is not affiliated with the Wikimedia Foundation.
  • How ranking works
  • All topics
  • Reading history
  • Random article
  • MediaWiki API

Computational problem

  • Article
  • Rabbit hole
  • Read
  • View history
Tools
Actions
  • Read
  • View history
General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
3 min
Topic
Computer Science
Quality
Start-class
Views
339 in 14 days
Last edited
17 Jul 2025
Print/export
  • Printable version
In other projects
  • Wikidata item
From Wikipedia, the free encyclopedia
Rabbit hole:
  1. Computational problem

In theoretical computer science, a problem is one that asks for a solution in terms of an algorithm. For example, the problem of factoring

"Given a positive integer n, find a nontrivial prime factor of n."

is a computational problem that has a solution, as there are many known integer factorization algorithms. A computational problem can be viewed as a set of instances or cases together with a, possibly empty, set of solutions for every instance/case. The question then is, whether there exists an algorithm that maps instances to solutions. For example, in the factoring problem, the instances are the integers n, and solutions are prime numbers p that are the nontrivial prime factors of n. An example of a computational problem without a solution is the Halting problem. Computational problems are one of the main objects of study in theoretical computer science.

One is often interested not only in mere existence of an algorithm, but also how efficient the algorithm can be. The field of computational complexity theory addresses such questions by determining the amount of resources (computational complexity) solving a given problem will require, and explain why some problems are intractable or undecidable. Solvable computational problems belong to that define broadly the resources (e.g. time, space/memory, energy, circuit depth) it takes to compute (solve) them with various . For example, the complexity classes

complexity classes
abstract machines
  • P, problems that consume polynomial time for deterministic classical machines
  • BPP, problems that consume polynomial time for probabilistic classical machines (e.g. computers with random number generators)
  • BQP, problems that consume polynomial time for probabilistic quantum machines.

Both instances and solutions are represented by binary strings, namely elements of {0, 1}*.a For example, natural numbers are usually represented as binary strings using binary encoding. This is important since the complexity is expressed as a function of the length of the input representation.
Cite error: There are <ref group=lower-alpha> tags or {{efn}} templates on this page, but the references will not show without a {{reflist|group=lower-alpha}} template or {{notelist}} template (see the help page).

Loading the rest of the article…

Recent changes

Rabbit hole

Where Computational problem leads. Every connection below has a source: a link in this article, a shared Wikipedia category, or CirrusSearch text similarity. Articles already on your trail are left out.

Contents
  • (Top)
  • Types
  • Promise problem
  • See also
  • Notes
  • References
  • Recent changes
  • Rabbit hole
Contents
Contents7 sections
  • (Top)
  • Types
  • Decision problem
  • Search problem
  • Counting problem
  • Optimization problem
  • Function problem
  • Promise problem
  • See also
  • Notes
  • References
  • Recent changes
  • Rabbit hole

Types

Decision problem

A decision problem is a computational problem where the answer for every instance is either yes or no. An example of a decision problem is primality testing:

"Given a positive integer n, determine if n is prime."

A decision problem is typically represented as the set of all instances for which the answer is yes. For example, primality testing can be represented as the infinite set

L = {2, 3, 5, 7, 11, ...}

Search problem

In a search problem, the answers can be arbitrary strings. For example, factoring is a search problem where the instances are (string representations of) positive integers and the solutions are (string representations of) collections of primes.

A search problem is represented as a relation consisting of all the instance-solution pairs, called a search relation. For example, factoring can be represented as the relation

R = {(4, 2), (6, 2), (6, 3), (8, 2), (9, 3), (10, 2), (10, 5)...}

which consist of all pairs of numbers (n, p), where p is a prime factor of n.

Counting problem

A counting problem asks for the number of solutions to a given search problem. For example, a counting problem associated with factoring is

"Given a positive integer n, count the number of nontrivial prime factors of n."

A counting problem can be represented by a function f from {0, 1}* to the nonnegative integers. For a search relation R, the counting problem associated to R is the function

fR(x) = |{y: R(x, y) }|.

Optimization problem

An optimization problem asks for finding a "best possible" solution among the set of all possible solutions to a search problem. One example is the maximum independent set problem:

"Given a graph G, find an independent set of G of maximum size."

Optimization problems are represented by their objective function and their constraints.

Function problem

In a function problem a single output (of a total function) is expected for every input, but the output is more complex than that of a decision problem, that is, it isn't just "yes" or "no". One of the most famous examples is the traveling salesman problem:

"Given a list of cities and the distances between each pair of cities, find the shortest possible route that visits each city exactly once and returns to the origin city."

It is an NP-hard problem in combinatorial optimization, important in operations research and theoretical computer science.

Promise problem

Main article: Promise problem

In computational complexity theory, it is usually implicitly assumed that any string in {0, 1}* represents an instance of the computational problem in question. However, sometimes not all strings {0, 1}* represent valid instances, and one specifies a proper subset of {0, 1}* as the set of "valid instances". Computational problems of this type are called promise problems.

The following is an example of a (decision) promise problem:

"Given a graph G, determine if every independent set in G has size at most 5, or G has an independent set of size at least 10."

Here, the valid instances are those graphs whose maximum independent set size is either at most 5 or at least 10.

Decision promise problems are usually represented as pairs of disjoint subsets (Lyes, Lno) of {0, 1}*. The valid instances are those in Lyes ∪ Lno. Lyes and Lno represent the instances whose answer is yes and no, respectively.

Promise problems play an important role in several areas of computational complexity, including hardness of approximation, property testing, and interactive proof systems.

See also

  • Lateral computing, alternative approaches to solving problems computationally
  • Model of computation
  • Transcomputational problem

Notes

  1. aSee regular expressions for the notation used

References

  • Even, Shimon; Selman, Alan L.; Yacobi, Yacov (1984), "The complexity of promise problems with applications to public-key cryptography", Information and Control, 61 (2): 159–173, doi:10.1016/S0019-9958(84)80056-X.
  • Goldreich, Oded (2008), Computational Complexity: A Conceptual Perspective, Cambridge University Press, ISBN 978-0-521-88473-0.
  • Goldreich, Oded; Wigderson, Avi (2008), "IV.20 Computational Complexity", in Gowers, Timothy; Barrow-Green, June; Leader, Imre (eds.), The Princeton Companion to Mathematics, Princeton University Press, pp. 575–604, ISBN 978-0-691-11880-2.
Study aids for Computational problem

Terminology

problem
In theoretical computer science, a problem is one that asks for a solution in terms of an algorithm.
factoring
For example, the problem of factoring
search relation
A search problem is represented as a relation consisting of all the instance-solution pairs, called a search relation.

Terms the article defines in bold, quoted in context.

Categories:
  • Computational problems
  • Theoretical computer science

879 words · 1 references · revision 1300923757 · CC BY-SA 4.0

General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
3 min
Topic
Computer Science
Quality
Start-class
Views
339 in 14 days
Last edited
17 Jul 2025

Key concepts

  • Computational complexity theory3
  • Theoretical computer science2
  • Algorithm1
  • Integer factorization1
  • Set (mathematics)1
  • Factoring problem1
  • Halting problem1
  • Computational complexity1
  • Undecidable problem1
  • Complexity class1

The articles this one links to most, weighted towards the introduction.

Print/export
  • Printable version
In other projects
  • Wikidata item
Created
1 Apr 2006
History
151 edits
85 contributors
No edits in the last 30 days
Last edited
17 Jul 2025

151 revisions in total · 85 contributors

  1. 17 Jul 2025, 04:19 UTCAnonymous contributorNo edit summary−13diff
  2. 16 Sept 2024, 22:51 UTCFifthFivemReverted 1 edit by 212.34.19.143 (talk) to last revision by Omnissiahs hierophant+4diff
  3. 16 Sept 2024, 22:50 UTCAnonymous contributorrevertedNo edit summary−4diff
  4. 18 Aug 2024, 20:20 UTCOmnissiahs hierophantNo need for parenthesis−2diff
  5. 30 Jul 2024, 11:47 UTCGraeme Bartlettmefficent fix+1diff
  6. 14 Jul 2024, 07:41 UTCAndrejBauerLink to integer factorization page.+3diff
  7. 14 Jul 2024, 07:39 UTCAndrejBauerThe introduction erroneously claims that all computational problems must have algorithmic solutions. The Halting oracle is a counter-example.+406diff
  8. 3 Dec 2023, 06:01 UTCOAbotmOpen access bot: doi updated in citation with #oabot.−4diff

View full revision history

Created
1 Apr 2006
History
151 edits
85 contributors
No edits in the last 30 days
Last edited
17 Jul 2025

Go deeper: linked from this article

  • Linked from the introduction

    Theoretical computer science

    Subfield of computer science and mathematics

    Theoretical computer science is a subfield of computer science and mathematics that focuses on the abstract and mathematical foundations of computation.

    15 min readGo deeper
  • Linked from the introduction

    Set (mathematics)

    Collection of mathematical objects

    In mathematics, a set is a collection of different things; the things are called elements or members of the set and are typically mathematical objects: numbers, symbols, points in space, lines, other geometric shapes, variables, functions, or even other sets.

    18 min readGo deeper
  • Linked from the introduction

    Complexity class

    Set of problems in computational complexity theory

    In computational complexity theory, a complexity class is a set of computational problems "of related resource-based complexity". The two most commonly analyzed resources are time and memory.

    28 min readGo deeper
  • Linked from the introduction

    Halting problem

    Problem in computer science

    In computability theory, the halting problem is the decision problem of, given an arbitrary computer program and an input, determining whether said program will eventually finish running and halt, or will continue to run forever.

    20 min readGo deeper
  • Linked from the introduction

    Algorithm

    Sequence of operations for a task

    In mathematics and computer science, an algorithm is a finite sequence of mathematically rigorous instructions, typically used to solve a class of specific problems or to perform a computation.

    25 min readGo deeper
  • Linked from the introduction

    Computational complexity theory

    Inherent difficulty of computational problems

    In theoretical computer science and mathematics, computational complexity theory focuses on classifying computational problems according to their resource usage, and explores the relationships between these classifications.

    19 min readGo deeper
  • Linked from the introduction

    Integer factorization

    Decomposition of a number into a product

    In mathematics, integer factorization is the decomposition of a positive integer into a product of integers.

    10 min readGo deeper
  • Linked from the introduction

    Natural number

    Number used for counting

    In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. The terms positive integers, non-negative integers, whole numbers, and counting numbers are also used.

    18 min readGo deeper
  • Listed under See also

    Model of computation

    Mathematical model describing how an output of a function is computed given an input

    In computer science, and more specifically in computability theory and computational complexity theory, a model of computation is a model that describes how an output of a mathematical function is computed given an input.

    1 min readGo deeper
  • Linked from the introduction

    BQP

    Computational complexity class of problems

    In computational complexity theory, bounded-error quantum polynomial time (BQP) is the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of at most 1/3 for all instances.

    8 min readGo deeper
  • Linked from the introduction

    Undecidable problem

    Yes-or-no question that cannot ever be solved by a computer

    In computability theory and computational complexity theory, an undecidable problem is a decision problem for which it is proved to be impossible to construct an algorithm that always leads to a correct yes-or-no answer.

    5 min readGo deeper
  • Linked from the introduction

    Abstract machine

    Theoretical model

    In computer science, an abstract machine is a theoretical model that allows for a detailed and precise analysis of how a computer system functions.

    9 min readGo deeper
  • Linked from the introduction

    Computational complexity

    Amount of resources to perform an algorithm

    In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it.

    8 min readGo deeper

Adjacent: shared categories and similar text

  • Shares category “Theoretical computer science”

    Combinatorial optimization

    Subfield of mathematical optimization

    Combinatorial optimization is a subfield of mathematical optimization that consists of finding an optimal object from a finite set of objects, where the set of feasible solutions is discrete or can be reduced to a discrete set.

    7 min readGo deeper