Turing Machines

(チューリング機械)

12th lecture, July 5, 2019

Language Theory and Compilers

http://www.sw.it.aoyama.ac.jp/2019/Compiler/lecture12.html

Martin J. Dürst

AGU

© 2005-19 Martin J. Dürst 青山学院大学

Today's Schedule

 

Summary of Previous Lecture

 

Example Solution for bison Homework

(paper only)

 

Remaining Schedule

 

Final Exam

 

Formal Language Hierarchy

(Chomsky hierarchy)

Grammar Type Language (family) Automaton
phrase structure grammar (psg) 0 phrase structure language Turing machine
context-sensitive grammar (csg) 1 context-sensitive language linear bounded automaton
context-free grammar (cfg) 2 context-free language pushdown automaton
regular grammar (rg) 3 regular language finite state automaton

 

Historic Background

 

Automata Commonalities

 

Automata Differences

 

How a Turing Machine Works

 

Turing Machine Example: State Transition Table

Current state Current tape symbol New tape symbol Movement direction Shortcut Next state
→1 0 1 R 0/1;R 2
→1 1 0 L 1/0;L 1
→1 _ 1 R _/1;R 2
2 0 0 R 0/0;R 2
2 1 1 R 1/1;R 2
2 _ _ L _/_;L 3*

 

Explanations for Example

 

Turing Machine Definition

6-tuple:

 

Using Turing Machines for Input Recognition

 

Techniques and Tricks for Programming

 

Extensions

It can be shown that all these extensions (and many more) can be simulated on a plain Turing machine.

 

Universal Turing Machine

 

Wolfram's 2,3 Turing Machine

Current state Current tape symbol New tape symbol Movement direction Shortcut Next state
→1 a b L a/b;L 1
→1 b a L b/a;L 1
→1 _ b R _/b;R 2
2 b a R b/a;R 2
2 a _ R a/_;R 1
2 _ a L _/a;L 1

See proof of universality and other details

 

Computability is Everywhere

It turns out that there are many other mechanisms that can simulate an (universal) Turing machine:

All these mechanisms can simulate each other, and have the same power.

All these mechanisms are very simple, but simulation is very slow.

 

Church-Turing Thesis

It is unclear whether this applies to Physics in general.

 

Turing Completeness

 

Other Contributions

 

Bibliography

 

Homework

Deadline: July 11, 2019 (Thursday), 19:00

Where to submit: Box in front of room O-529 (building O, 5th floor)

Format: A4 single page (using both sides is okay; NO cover page, staple in top left corner if more than one page is necessary), easily readable handwriting (NO printouts), name (kanji and kana) and student number at the top right

For the Turing machine given by the following state transition table (this Turing machine always starts on the rightmost non-blank symbol):

Current state Current tape symbol New tape symbol Movement direction Next state
→1 0 1 L 1
→1 1 0 R 2
→1 _ _ L 3*
2 0 0 R 2
2 1 1 R 2
2 _ _ L 3*
  1. Draw the state transition diagram for this machine
  2. Show in detail how this machine processes the input ..._1101000_...
  3. Explain what kind of calculation this machine does if the tape contains only a single contiguous sequence of '0'es and '1'es (surrounded by blanks), and the leftmost non-blank symbol is a '1'

  

Glossary

rote learning
暗記
commonalities
共通点
nondeterminism
非決定性
universal turing machine
万能チューリング機械
mechanism
機構、仕組み
lambda calculus
ラムダ計算
partial recursive function
部分再帰関数
unary numbers
一進法 (1, 11, 111, 1111,...)
Entscheidungsproblem
ヒルベルトの決定問題
Turing complete(ness)
チューリング完全 (性)
computable number
計算可能数
halting problem
停止性問題