Universal Turing Machines & Computer Programs Overview

6 universal turing machines and computer programs n.w
1 / 14
Embed
Share

Gain insights into universal Turing machines, undecidable problems, and universal computations. Learn about Python execution, universal programs, and the rule 110 automaton - all essential components in the realm of computational theory.

  • Turing Machines
  • Undecidable Problems
  • Python Execution
  • Universal Computation
  • Rule 110 Automaton

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. 6. Universal Turing machines and computer programs Lecture slides for What Can Be Computed?

  2. Big picture so far First big idea of the course: there exist undecidable/uncomputable problems Second big idea of the course: there exist universal computers computers that can simulate any other computer or program

  3. Some important experiments: Different ways of doing the same computation (make sure you can explain each one): >>> simulateTM(rf( containsGAGA.tm ), TTGAGATT ) >>> containsGAGA( TTGAGATT ) Now we introduce yet another way of doing the same computation: >>> universal(rf( containsGAGA.py ), TTGAGATT ) Try it for yourself. What do you think this does? How do you think it works? What is the difference between the above three methods of doing the same computation?

  4. The Python exec function executes strings of Python

  5. We can use exec to write a universal program that executes other Python programs universal Python Examples (what do these output?):

  6. Universal Turing machines exist too High-level argument: Any Python program can be converted to a Turing machine (see previous chapter) We just saw the universal Python program universal.py Therefore, universal.py can be converted into an equivalent Turing machine, which is universal by definition See the textbook for additional details, since for complete correctness our universal Turing machine should receive only one parameter Universal Turing machines can be constructed explicitly Alan Turing gave a suitable construction in his 1936 paper Minsky published a 7-state, 4-symbol universal Turing machine in the 1960s

  7. Universal computation occurs in the real world

  8. The rule 110 automaton is a famous example of universal computation resulting from extremely simple rules See rule110.py for details

  9. Using a universal program, we can alter the effects of other programs in real time

  10. Test your understanding. What do the following produce? >>> alterGAGAtoTATA(utils.ESS(rf('repeatCAorGA.py'), 'CA')) >>> alterGAGAtoTATA(utils.ESS(rf('repeatCAorGA.py'), 'GA'))

  11. The ignore input trick will be important in later chapters

  12. Test your understanding. What does the following sequence of statements produce? >>> x = rf('containsGAGA.py') >>> utils.writeFile('progString.txt', x) >>> utils.writeFile('inString.txt', 'GGGGAAACTT') >>> ignoreInput('GAGAGA')

  13. Some decision problems are recognizable but undecidable Recognizablemeans there s a program that Always terminates with the right answer ( yes ) on positive instances Is never wrong on negative instances May enter an infinite loop on negative instances Example: YesOnString and CrashOnString are recognizable but undecidable

  14. YesOnString is recognizable. Heres a program that recognizes it: Test your understanding: why does this program not also decide YesOnString?

More Related Content