4

An algorithm is a “unambiguous specification of how to solve a class of problems... calculation, data processing and automated reasoning tasks” Are the class of problems an algorithm can solve more abstractly considered decision problems? Is the ultimate reason for a calculation, data processing or automated reasoning to solve a higher decision problem?

Thank you and forgive my ignorance.

2 Answers2

4

There is a class of problems called decision problems that have an yes/no answer. These problems can be further be classified in decidable, where we have a way to solve them, or undecidable, for which there cannot be or has not been yet discovered a way to solve them.

However, there is another set of problems where we are not interested in a yes/no answer, but rather in a more specific solution. For example, there are optimisation problems, where we are searching for the best value according to some parameters, or counting problems, where we are interested in counting the number of instances where certain property occurs.

To sum it up, decision problems are a specific class of problems, a subset of which can be solved by algorithms. However, algorithms can be used to solve problems in other classes.

Now, given an algorithm for a specific problem, one can solve multiple problems equivalent to the original one (there are ways of "translating" a problem in the terms of another one, and having a solution to one problem means having a solution for all such problems).

Paul92
  • 528
  • 3
  • 6
2

First, note that a decision problem has a very specific meaning in the context of algorithms: a decision problem is essentially a question to which the answer is either YES or NO.

An algorithm does not necessarily have to solve a decision problem. We may for instance design a (simple) algorithm to find an element of maximum value from an list. However, in complexity theory, it turns out that a decision problem is often a very convenient form to reason with. The complexity classes P and NP for example are both classes of decision problems.

Because decision problems are useful, we often 'reformulate' a problem as a decision problem. We could for instance ask whether the maximum element in a list has at least the value $M$. This is a decision problem version of our earlier problem and algorithms that solve this decision problem could (usually) be used to solve the original problem.

Discrete lizard
  • 8,392
  • 3
  • 25
  • 53