In
computational complexity theory
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. A computational problem ...
and
computability theory
Computability theory, also known as recursion theory, is a branch of mathematical logic, computer science, and the theory of computation that originated in the 1930s with the study of computable functions and Turing degrees. The field has since ex ...
, a search problem is a
computational problem
In theoretical computer science, a computational 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 computati ...
of finding
an ''admissible'' answer for a given input value, provided that such an answer exists. In fact, a search problem is specified by a
binary relation
In mathematics, a binary relation associates some elements of one Set (mathematics), set called the ''domain'' with some elements of another set called the ''codomain''. Precisely, a binary relation over sets X and Y is a set of ordered pairs ...
where if and only if "'' is an admissible answer given ''".
Search problems frequently occur in
graph theory
In mathematics and computer science, graph theory is the study of ''graph (discrete mathematics), graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of ''Vertex (graph ...
and
combinatorial 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. Typical combina ...
, e.g. searching for
matchings, optional
cliques, and
stable sets in a given undirected graph.
An
algorithm
In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
is said to solve a search problem if, for every input value ,
it returns an admissible answer for when such an answer exists; otherwise, it returns any appropriate output, e.g. "not found" for with no such answer.
Definition
PlanetMath
PlanetMath is a free content, free, collaborative, mathematics online encyclopedia. Intended to be comprehensive, the project is currently hosted by the University of Waterloo. The site is owned by a US-based nonprofit corporation, "PlanetMath.org ...
defines the problem as follows:
If
is a binary relation such that
and
is a
Turing machine
A Turing machine is a mathematical model of computation describing an abstract machine that manipulates symbols on a strip of tape according to a table of rules. Despite the model's simplicity, it is capable of implementing any computer algori ...
, then
calculates
if:
* If
is such that there is some
such that
then
accepts
with output
such that
. (there may be multiple
, and
need only find one of them)
* If
is such that there is no
such that
then
rejects
.
:Note that the graph of a
partial function
In mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to . The subset , that is, the '' domain'' of viewed as a function, is called the domain of definition or natural domain ...
is a binary relation, and if
calculates a partial function then there is at most one possible output.
:A
can be viewed as a ''search problem'', and a Turing machine which calculates
is also said to solve it. Every search problem has a corresponding
decision problem
In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question on a set of input values. An example of a decision problem is deciding whether a given natura ...
, namely
:This definition can be generalized to ''n''-ary relations by any suitable encoding which allows multiple strings to be compressed into one string (for instance by listing them consecutively with a
delimiter
A delimiter is a sequence of one or more Character (computing), characters for specifying the boundary between separate, independent regions in plain text, Expression (mathematics), mathematical expressions or other Data stream, data streams. An ...
).
See also
*
Unbounded search operator
*
Decision problem
In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question on a set of input values. An example of a decision problem is deciding whether a given natura ...
*
Optimization problem
In mathematics, engineering, computer science and economics
Economics () is a behavioral science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goo ...
*
Counting problem (complexity)
In computational complexity theory and computability theory, a counting problem is a type of computational problem. If ''R'' is a search problem then
:c_R(x)=\vert\\vert \,
is the corresponding counting function and
:\#R=\
denotes the corre ...
*
Function problem
*
Search games
Notes
References
{{PlanetMath attribution, id=3425, title=search problem
Computational problems