Section 9.1: Solutions in book for all but 11a. The solution for 7a is not quite correct. The machine needs to ensure that there are no more characters on the input after reading in the final b---the books solutions does not do this. 11a. Give a Turning machine to compute the function f(x)=3x where x is a positive integer representated in unary. Conceptually this is an easy machine to design. When the machine starts there will be x 1's on the tape. We simply need to copy this set of ones twice to the end of the original set. There are many ways to do this, here is one. Our machine will have an alphabet that contains {1,2,3,4} and operates in three stages. First starting with an initial string of one 1^x (i.e. the unary representation of x), the machine will alter the tape so that it contains 2^x 3^x. Next the tape will be changed so that it contains 2^x 3^x 4^x. Finally we will change all of the symbols in this string back to 1 resulting in the string 1^(3x) as desired. The reason that we introduce the intermediate symbols 2,3, and 4 is for book keeping purposes during the copying operations. I will describe the machine transitions necessary to create 2^x 3^x from 1^x. The rest of the machine is similar and is left for you. Starting with a tape containing 1^x, the machine first turns the first 1 into a 2 and then moves right until a blank. This blank is turned into a 3 and then the machine moves right until a 2 is reached. This process of changing the first 1 into a 2 and then writing a 3 in place of the first blank continues until all of the 1's have been turned into 2's. The transitions needed for this are, These transitions replace the first 1 with a 2 and then move right until a blank, replacing the blank with 3 and then entering state 2. delta(q0,1)=(q1,2,R) delta(q1,1)=(q1,1,R) delta(q1,2)=(q1,2,R) delta(q1,blank)=(q2,3,L) These transition move backward. If we encounter a 2 before encountering a 1 then we know we are finished and we move to state q4. Otherwise if we encounter a 1 then we move to state 3. delta(q2,3)=(q2,3,L) delta(q2,2)=(q4,2,L) delta(q2,1)=(q3,1,L) We have encountered a 1 and continue moving left until we reach a 2. At this point we move one step to the right which contains a 1 and start the process over again by moving to q0. delta(q3,1)=(q3,1,L) delta(q3,2)=(q0,2,R)