Theory of Computation
Homework 1 Due: 2012/10/02
Problem 1 Read Examples 2.1, 2.2, and 2.3 in the textbook. No answers required.
Problem 2 Recall that if L is decided by some Turing machine, then L is called recursive. Show that any finite set S of natural numbers is recursive.
Ans:
Let L = {n0, n1, . . . , nk}. We can write an algorithm to decide L. To check whether the input number x is in L, check: Is x = n0? Is x = n1? . . . Is x = nk? Note that n0, . . . , nk are part of the program, not inputs. If one of the checks is true, answer “yes”; otherwise, answer “no”.