ArticleslgStudy

computer science

Decision problem

Decision problem is a computer 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 Decision problem rather than just read about it. In short: 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 natural number is prime.

Decision problem — main illustration
Decision problem — illustration

Key takeaways

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

Reference excerpt

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 natural number is prime. Another example is the problem, "given two numbers x and y, does x evenly divide y?" A decision procedure for a decision problem is an algorithmic method that answers the yes-no question on all inputs, and a decision problem is called decidable if there is a decision procedure for it. For example, the decision problem "given two numbers x and y, does x evenly divide y?" is decidable since there is a decision procedure called long division that gives the steps for determining whether x evenly divides y and the correct answer, YES or NO, accordingly. Some of the most important problems in mathematics are undecidable, e.g. the halting problem. The field of computational complexity theory 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. On the other hand, the field of recursion theory categorizes undecidable decision problems by Turing degree, which is a measure of the noncomputability inherent in any solution.

Definition A decision problem is the formal language of all inputs for which the output (the answer to the yes-no question on a given input) is YES.

These inputs can be natural numbers, but can also be values of some other kind, like binary strings or strings over some other alphabet. For example, if every input can be encoded by the alphabet {0,1}, then a decision problem is a subset L⊆{0,1}∗. For another example, using an encoding such as Gödel numbering, any string can be encoded as a natural number, via which a decision problem can be defined as a subset of the natural numbers. Therefore, the decision procedure of a decision problem is to compute the characteristic function of a subset of the natural numbers.

Examples A classic example of a decidable decision problem is the set of prime numbers. It is possible to effectively decide whether a given natural number is prime by testing every possible nontrivial factor. Although much more efficient procedures of primality testing are known, the existence of any effective procedure is enough to establish decidability.

Decidability

A decision problem is decidable or effectively solvable if the set of inputs for which the answer is YES is a recursive set. A decision problem is partially decidable, semidecidable, solvable, or provable if the set of inputs for which the answer is YES is a recursively enumerable set. Problems that are not decidable are undecidable, which means it is not possible to create an algorithm (efficient or not) that solves them. The halting problem is an important undecidable decision problem; for more examples, see list of undecidable problems.

Complete problems

Decision problems can be ordered according to many-one reducibility and related to feasible reductions such as polynomial-time reductions. A decision problem P is said to be complete for a set of decision problems S if P is a member of S and every problem in S can be reduced to P. Complete decision problems are used in computational complexity theory to characterize complexity classes of decision problems. For example, the Boolean satisfiability problem is complete for the class NP of decision problems under polynomial-time reducibility.

Function problems

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?". A function problem consists of a partial function f; the informal "problem" is to compute the values of f on the inputs for which it is defined. Every function problem can be turned into a decision problem; the decision problem is just the graph of the associated function. (The graph of a function f is the set of pairs (x,y) such that f(x) = y.) If this decision problem were effectively solvable then the function problem would be as well. This reduction does not respect computational complexity, however. For example, it is possible for the graph of a function to be decidable in polynomial time (in which case running time is computed as a function of the pair (x,y)) when the function is not computable in polynomial time (in which case running time is computed as a function of x alone). The function f(x) = 2x has this property. Every decision problem can be converted into the function problem of computing the characteristic function of the set associated to the decision problem. If this function is computable then the associated decision problem is decidable. However, this reduction is more liberal than the standard reduction used in computational complexity (sometimes called polynomial-time many-one reduction); for example, the complexity of the characteristic functions of an NP-complete problem and its co-NP-complete complement is exactly the same even though the underlying decision problems may not be considered equivalent in some typical models of computation.

Optimization problems

… excerpt ends here. Continue reading the full article.

Illustrations

Decision problem: A decision problem has only two possible outputs (YES or NO) on any input.
A decision problem has only two possible outputs (YES or NO) on any input.

Worked examples

Example 1 — a first encounter with Decision problem

Start with the simplest possible case. Write down what Decision problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 Decision problem 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 Decision problem 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 Decision problem

In research
Decision problem appears in computer 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 Decision problem 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
Decision problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computability theory, Computational problems, so understanding it makes those chapters shorter.
In everyday life
Look for Decision problem 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 “Decision problem” →

How to study Decision problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Decision problem 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 Decision problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Decision problem in simple terms?

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 natural number is prime.

Why does Decision problem matter?

Because it connects several computer 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 Decision problem?

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 Decision problem.

Tags

  • Computability theory
  • Computational problems

Keep exploring