1 / 9

Turing Machines – More Examples

Turing Machines – More Examples. Lecture 24 Section 3.1 Wed, Oct 17, 2007. Turing Machine as Language Processor. Design a Turing machine that will shift the input string one space to the right, leaving a blank in the leftmost cell. Strategy. Strategy:

baba
Download Presentation

Turing Machines – More Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Turing Machines – More Examples Lecture 24 Section 3.1 Wed, Oct 17, 2007

  2. Turing Machine as Language Processor • Design a Turing machine that will shift the input string one space to the right, leaving a blank in the leftmost cell.

  3. Strategy • Strategy: • Read the first symbol and write a blank. • Move right. • Read the second symbol and write the first symbol. • Move right. • Read the third symbol and write the second symbol.

  4. Strategy • Move right. • Continue in this way until a blank is read. • Write the last symbol.

  5. 0  0, R _  0, R 0  _, R _ L _ R q0 acc 0  1, R 1  0, R _ R 1  _, R _  1, L 1  1, R The Turing Machine

  6. Another Language Processor • Design a Turing Machine that will duplicate the input string. • Replace w with w#w.

  7. Turing Machine as Calculator • Design a Turing Machine that will add 1 to the input. • For example, if the input is 100111, the output will be 101000. • Design a Turing Machine that will subtract 1 from the input.

  8. Turing Machine as an Enumerator • Design a Turing Machine that will print on its tape all binary strings. • Design a Turing Machine that will print all binary strings that contain an even number of 0s and an odd number of 1s.

  9. Turing Machine as an Enumerator • Design a Turing Machine that will print all binary strings all of whose prefixes contain at least as many 0s as 1s (balanced parentheses).

More Related