Turing Machines

(チューリング機械)

12rd lecture, July 6, 2018

Language Theory and Compilers

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

Martin J. Dürst

AGU

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

Today's Schedule

 

Summary of Previous Lecture

 

Homework: A Calculator for Dates and Time Periods

Please ask questions now!

Additional hint:

Order is important when making YYSTYPE a struct that can represent dates, numbers of days, and integers:

  1. typedef ...
  2. #define YYSTYPE ...
  3. #include "calc.tab.h"

 

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:

 

Techniques and Tricks for Programming

 

Extensions

It can be shown that all these extensions can be simulated on a plain Turing machine

 

Universal Turing Machine

 

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 16, 2017 (Monday), 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:

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. Guess and 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 where the leftmost non-blank symbol is a '1'

(this Turing machine always starts on the rightmost non-blank symbol)

  

Glossary

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