Vous êtes sur la page 1sur 3

Decision problem In computability theory and computational complexity theory, a decision problem is a question in some formal system with

a yes-or-no answer, depending on the values of some input parameters. For example, the problem "given two numbers x and y, does x evenly divide y?" is a decision problem. The answer can be either 'yes' or 'no', and depends upon the values of x and y. Decision problems typically appear in mathematical questions of decidability, that is, the question of the existence of an effective method to determine the existence of some object or its membership in a set; many of the important problems in mathematics are undecidable. Decision problems are closely related to function problems, which can have answers that are more complex than a simple 'yes' or 'no'. A corresponding function problem is "given two numbers x and y, what is x divided by y?". They are also related to optimization problems, which are concerned with finding the best answer to a particular problem. A method for solving a decision problem given in the form of an algorithm is called a decision procedure for that problem. A decision procedure for the decision problem "given two numbers x and y, does x evenly divide y?" would give the steps for determining whether x evenly divides y, given x and y. One such algorithm is long division, taught to many school children. If the remainder is zero the answer produced is 'yes', otherwise it is 'no'. A decision problem which can be solved by an algorithm, such as this example, is called decidable. The field of computational complexity categorizes decidable decision problems by how difficult they are to solve. "Difficult", in this sense, is described in terms of the computational resources needed by the most efficient algorithm for a certain problem. The field of recursion theory, meanwhile, categorizes undecidable decision problems by Turing degree, which is a measure of the noncomputability inherent in any solution. Research in computability theory has typically focused on decision problems. As explained in the section Equivalence with function problemsbelow, there is no loss of generality. A decision problem is any arbitrary yes-or-no question on an infinite set of inputs. Because of this, it is traditional to define the decision problem equivalently as: the set of inputs for which the problem returns yes. These inputs can be natural numbers, but may also be values of some other kind, such as strings over the binary alphabet {0,1} or over some other finite set of symbols. The subset of strings for which the problem returns "yes" is a formal language, and often decision problems are defined in this way as formal languages. Alternatively, using an encoding such as Gdel numberings, any string can be encoded as a natural number, via which a decision problem can be defined as a subset of the natural numbers.

Function problem In computational complexity theory, a function problem is a computational problem where 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. Notable examples include thetravelling 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 anon-deterministic Turing machine in polynomial time. For all function problems in which the solution is polynomially bounded, 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 travelling salesman problem is this: Given a weighted directed graph and an integer K, is there a Hamilton path (or Hamilton cycle if the salesman must return home) with total weight less than or equal to K? Given a solution to this problem, we can solve the travelling salesman problem as follows. Let be the number of edges and be the weight of edge . First rescale and perturb the weights of the edges by assigning to edge the new weight . 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 . Find the weight of the shortest Hamilton path by binary search: is there a Hamilton path with weight ; is there a path with weight etc. Then having found the weight of the shortest Hamilton path, determine which edges are in the path by asking for each edge whether there is a Hamiltonian path with weight for the graph

modified so that edge has weight (if there is no such path in the modified graph, then edge must be in the shortest path for the original graph). This places the travelling 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.

Vous aimerez peut-être aussi