Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

# Paper turingmachine exercises

338 views

Published on

Exercises - how to build paper Turing machines that can do this or that.

Published in: Education, Technology, Business
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

### Paper turingmachine exercises

1. 1. Symbols on the tape Add 1 (in unary)       A if  write  move jumpTo A if  write  move jumpTo F Paper Turing Machine ( Andrea Valente Program www.create.aau.dk/av of the Turing Machine av@create.aau.dk )
2. 2. Input is 2 in unary: II   A   A   A A if  write    move jumpTo A FINISH if  write  Output is 3 in unary: IIItime move jumpTo F
3. 3. Subtract 1 (in unary) Fold Go Eraseif  write  if  write  move move jumpTo Go jumpTo Fif  write  move jumpTo Erase TASK Test this machine on the input 3 (in unary)
4. 4. Invert and       Inv if write  move jumpTo Inv if  write move jumpTo Inv if  write  move jumpTo FConsider: input = 1101 in binary, output = 0010
5. 5. Is a unary number even?Input = 3 ---> output = No, not even Input = 2 ---> output = Yes, it is even!    A A    B B    A A   Y B F N TASK Design and test a TM for this F problem.
6. 6. Check if this property is true: “the second symbol is  ”   A ...  Y  FINISH
7. 7. Addition in unaryDesign a Turing Machine that can add 2 unary numbers.Test it: on input 2 and 1, the output should be 3.    A ...   FINISH
8. 8. Palindromes | semordnilaPDesign a TM that decides if the tape contains a palindrom sequence.Test it on input  .     A ...    Y FINISH
9. 9. if write if write if write if write move move move move jumpTo jumpTo jumpTo jumpToif write if write if write if write move move move move jumpTo jumpTo jumpTo jumpToif write if write if write if write move move move move jumpTo jumpTo jumpTo jumpToif write if write if write if write move move move move jumpTo jumpTo jumpTo jumpToif write if write if write if write move move move move jumpTo jumpTo jumpTo jumpToif write if write if write if write move move move move jumpTo jumpTo jumpTo jumpTo
10. 10.  