Computable decision problem versus non-computable function problem

84 Views Asked by At

Consider the function problem find_solution(input) -> output, and the decision problem solution_exists(input) -> yes_or_no. Is there any problem that is computable in its decision problem form, but not computable in its function problem form?

In other words, is there exist problems that you can algorithmically determine whether a solution exists, but you can't algoritmically know what the solution is?

1

There are 1 best solutions below

6
On

Notice that the set of all possible solutions to a problem expressible to a Turing Machine is a list of strings over some alphabet. That list can be ordered -- a common ordering is first by length, and then for those of the same length lexicographically relative to an ordering of the alphabet of the relevant Turing Machine.

What this means is,

define find_solution(input) := 
   if solution_exists(input)
      then
         for s in ordered list of solution strings
            if s is a solution for input
               return("The solution is " + string(s) )
      else
        return("No solution exists.")

For inputs where a solution exists, we cannot a priori place a bound on the running time of the for loop over all possible solution strings. But, knowing that there is a solution in that list, we will eventually find it.