Let and be finite alphabets and let be a symbol outside both and . Let be a total function from to . We say is computable if there exists a Turing machine which given an input , always halts with on its tape. Let denote the language . Which of the following statements is true:
View worked solution
Answer: A
To determine the correct statement, we need to analyze the relationship between the computability of the total function and the decidability (recursiveness) of the language .
1. If is computable, then is recursive (decidable)
If is computable, there exists a Turing machine that, when given any input , always halts with on its tape.
We can construct a decider for as follows:
- Given an input string , first check if it is of the form where and . If not, reject.
- Run on to compute . Since is a total computable function, is guaranteed to halt and produce .
- Compare the computed with .
- If they are identical, accept; otherwise, reject.
Since always halts, the decider always halts and correctly decides . Thus, is recursive.
2. If is recursive, then is computable
If is recursive, there exists a Turing machine (decider) that halts on all inputs and decides .
We can construct a Turing machine to compute for any input as follows:
- Given input , systematically generate all strings in lexicographical order ().
- For each generated string , run the decider on the input .
- Since is a decider, it always halts and returns either accept or reject.
- Because is a total function, there is exactly one unique string such that . Thus, is guaranteed to accept for exactly one .
- As soon as accepts , halt the process and output on the tape.
Since the correct is guaranteed to be found in finite steps, always halts and correctly computes . Thus, is computable.
Conclusion
Since both directions hold, is computable if and only if is recursive.
Therefore, the correct option is A.
Free practice · Your answers on this page are not saved.
