Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, ,...

66
Prof. Busch - LSU 1 Busch Complexity Lectures: Turing Machines

Transcript of Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, ,...

Page 1: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 1

Busch Complexity Lectures:

Turing Machines

Page 2: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 2

The Language Hierarchy

*aRegular Languages

Context-Free Languages nnba Rww

nnn cba ww?

**ba

?

Page 3: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 3

*aRegular Languages

Context-Free Languages nnba Rww

nnn cba ww

**ba

Languages accepted by Turing Machines

Page 4: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 4

A Turing Machine

...... ...... Tape

Read-Write head Control Unit

Page 5: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 5

The Tape

...... ......

Read-Write head

No boundaries -- infinite length

The head moves Left or Right

Page 6: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 6

...... ......

Read-Write head

The head at each transition (time step): 1. Reads a symbol 2. Writes a symbol 3. Moves Left or Right

Page 7: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 7

...... ......

Example: Time 0

...... ...... Time 1

1. Reads 2. Writes

a a cb

a b k c

ak

3. Moves Left

Page 8: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 8

...... ...... Time 1

a b k c

...... ...... Time 2 a k cf

1. Reads 2. Writes

bf

3. Moves Right

Page 9: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 9

The Input String

...... ...... ◊ ◊ ◊ ◊

Blank symbol

head

◊a b ca

Head starts at the leftmost position of the input string

Input string

Page 10: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 10

States & Transitions

1q 2qLba ,→

Read Write Move Left

1q 2qRba ,→

Move Right

Page 11: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 11

Example:

1q 2qRba ,→

...... ...... ◊ ◊ ◊ ◊◊a b caTime 1

1qcurrent state

Page 12: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 12

...... ...... ◊ ◊ ◊ ◊◊a b caTime 1

1q 2qRba ,→

...... ...... ◊ ◊ ◊ ◊◊a b cbTime 2

1q

2q

Page 13: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 13

...... ...... ◊ ◊ ◊ ◊◊a b caTime 1

1q 2qLba ,→

...... ...... ◊ ◊ ◊ ◊◊a b cbTime 2

1q

2q

Example:

Page 14: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 14

...... ...... ◊ ◊ ◊ ◊◊a b caTime 1

1q 2qRg,→◊

...... ...... ◊ ◊ ◊ ◊ga b cbTime 2

1q

2q

Example:

Page 15: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 15

Determinism

1q

2qRba ,→

Allowed Not Allowed

3qLdb ,→

1q

2qRba ,→

3qLda ,→

No lambda transitions allowed

Turing Machines are deterministic

Page 16: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 16

Partial Transition Function

1q

2qRba ,→

3qLdb ,→

...... ...... ◊ ◊ ◊ ◊◊a b ca

1q

Example:

No transition for input symbol c

Allowed:

Page 17: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 17

Halting

The machine halts in a state if there is no transition to follow

Page 18: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 18

Halting Example 1:

...... ...... ◊ ◊ ◊ ◊◊a b ca

1q

1q No transition from

HALT!!! 1q

Page 19: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 19

Halting Example 2:

...... ...... ◊ ◊ ◊ ◊◊a b ca

1q

1q

2qRba ,→

3qLdb ,→

No possible transition from and symbol

HALT!!! 1q c

Page 20: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 20

Accepting States

1q 2q Allowed

1q 2q Not Allowed

• Accepting states have no outgoing transitions • The machine halts and accepts

Page 21: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 21

Acceptance

Accept Input If machine halts in an accept state

Reject Input

If machine halts in a non-accept state or If machine enters an infinite loop

string

string

Page 22: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 22

Observation:

In order to accept an input string, it is not necessary to scan all the symbols in the string

Page 23: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 23

Turing Machine Example

Accepts the language: *a

0q

Raa ,→

L,◊→◊1q

Input alphabet },{ ba=Σ

Page 24: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 24

◊ ◊ ◊ ◊aaTime 0

0q

a

0q

Raa ,→

L,◊→◊1q

Page 25: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 25

◊ ◊ ◊ ◊aaTime 1

0q

a

0q

Raa ,→

L,◊→◊1q

Page 26: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 26

◊ ◊ ◊ ◊aaTime 2

0q

a

0q

Raa ,→

L,◊→◊1q

Page 27: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 27

◊ ◊ ◊ ◊aaTime 3

0q

a

0q

Raa ,→

L,◊→◊1q

Page 28: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 28

◊ ◊ ◊ ◊aaTime 4

1q

a

0q

Raa ,→

L,◊→◊1q

Halt & Accept

Page 29: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 29

Rejection Example

0q

Raa ,→

L,◊→◊1q

◊ ◊ ◊ ◊baTime 0

0q

a

Page 30: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 30

0q

Raa ,→

L,◊→◊1q

◊ ◊ ◊ ◊baTime 1

0q

a

No possible Transition Halt & Reject

Page 31: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 31

Accepts the language: *a

0q

but for input alphabet }{a=ΣA simpler machine for same language

Page 32: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 32

◊ ◊ ◊ ◊aaTime 0

0q

a

0q

Halt & Accept

Not necessary to scan input

Page 33: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 33

Infinite Loop Example

0q

Raa ,→

L,◊→◊1q

Lbb ,→

A Turing machine for language *)(* baba ++

Page 34: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 34

◊ ◊ ◊ ◊baTime 0

0q

a

0q

Raa ,→

L,◊→◊1q

Lbb ,→

Page 35: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 35

◊ ◊ ◊ ◊baTime 1

0q

a

0q

Raa ,→

L,◊→◊1q

Lbb ,→

Page 36: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 36

◊ ◊ ◊ ◊baTime 2

0q

a

0q

Raa ,→

L,◊→◊1q

Lbb ,→

Page 37: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 37

◊ ◊ ◊ ◊baTime 2

0q

a

◊ ◊ ◊ ◊baTime 3

0q

a

◊ ◊ ◊ ◊baTime 4

0q

a

◊ ◊ ◊ ◊baTime 5

0qa

Infinite loop

Page 38: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 38

Because of the infinite loop:

• The accepting state cannot be reached

• The machine never halts • The input string is rejected

Page 39: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 39

Another Turing Machine Example

Turing machine for the language }{ nnba

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

1≥n

Page 40: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 40

Match a’s with b’s: Repeat: replace leftmost a with x find leftmost b and replace it with y Until there are no more a’s or b’s If there is a remaining a or b reject

Basic Idea:

Page 41: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 41

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊ba

0q

a bTime 0 ◊

Page 42: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 42

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊bx

1q

a b ◊Time 1

Page 43: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 43

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊bx

1q

a b ◊Time 2

Page 44: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 44

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

2q

a b ◊Time 3

Page 45: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 45

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

2q

a b ◊Time 4

Page 46: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 46

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

0q

a b ◊Time 5

Page 47: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 47

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

1q

x b ◊Time 6

Page 48: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 48

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

1q

x b ◊Time 7

Page 49: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 49

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx x y

2q

◊Time 8

Page 50: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 50

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx x y

2q

◊Time 9

Page 51: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 51

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

0q

x y ◊Time 10

Page 52: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 52

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

3q

x y ◊Time 11

Page 53: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 53

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

3q

x y ◊Time 12

Page 54: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 54

0q 1q 2q3qRxa ,→

Raa ,→Ryy ,→

Lyb ,→

Laa ,→Lyy ,→

Rxx ,→

Ryy ,→

Ryy ,→4q

L,◊→◊

◊ ◊yx

4q

x y ◊

Halt & Accept

Time 13

Page 55: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 55

If we modify the machine for the language }{ nnba

we can easily construct a machine for the language }{ nnn cba

Observation:

Page 56: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 56

Formal Definitions for

Turing Machines

Page 57: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 57

Transition Function

1q 2qRba ,→

),,(),( 21 Rbqaq =δ

Page 58: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 58

1q 2qLdc ,→

),,(),( 21 Ldqcq =δ

Transition Function

Page 59: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 59

Turing Machine:

),,,,,,( 0 FqQM ◊ΓΣ= δ

States

Input alphabet

Tape alphabet

Transition function

Initial state

blank

Accept states

Page 60: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 60

Configuration

◊ ◊ ◊ba

1q

a

Instantaneous description:

c◊

baqca 1

Page 61: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 61

◊ ◊yx

2q

a bTime 4

◊ ◊yx

0q

a bTime 5

◊ ◊

A Move: aybqxxaybq 02 ≻

(yields in one mode)

Page 62: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 62

◊ ◊yx

2q

a bTime 4

◊ ◊yx

0q

a bTime 5

◊ ◊

bqxxyybqxxaybqxxaybq 1102 ≻≻≻

◊ ◊yx

1q

x bTime 6

◊ ◊yx

1q

x bTime 7

◊ ◊

A computation

Page 63: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 63

bqxxyybqxxaybqxxaybq 1102 ≻≻≻

bqxxyxaybq 12∗≻Equivalent notation:

Page 64: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 64

Initial configuration: wq0

◊ ◊ba

0q

a b ◊

wInput string

Page 65: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 65

The Accepted Language

For any Turing Machine M

}:{)( 210 xqxwqwML f∗

= ≻

Initial state Accept state

Page 66: Busch Complexity Lectures Turing Machines · 2017-01-16 · Turing Machine: M =(Q,Σ,Γ,δ,q 0, , F) States Input alphabet Tape alphabet Transition function Initial state blank Accept

Prof. Busch - LSU 66

If a language is accepted by a Turing machine then we say that is:

• Turing Acceptable • Recursively Enumerable

ML

L

• Turing Recognizable

Other names used: