Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing...
Transcript of Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing...
![Page 1: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/1.jpg)
1
Chapter 3: The Church-Turing Thesis
![Page 2: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/2.jpg)
2
Turing Machine (TM)
. . .
Control
Bi-direction Read/Write
Turing machine is a much more powerful model, proposed by Alan Turing in 1936.
![Page 3: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/3.jpg)
3
Church/Turing Thesis
Anything that an algorithm can compute can be computed by a Turing machine and vice-versa.
![Page 4: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/4.jpg)
4
Turing Machine (cont’d)
• The differences between finite automata and Turing machines – A Turing machine can both write on the tape
and read from it, – The read-write head can move both to the left
and to the right, – The tape is infinite, – The special states for rejecting and accepting
take effects immediately.
![Page 5: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/5.jpg)
5
Turing Machine Definition A deterministic Turing machine is a 7-tuple: (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are finite sets, and 1.Q: set of states 2.Σ: input alphabet not containing the blank symbol ⊔ 3.Γ: tape alphabet, including Σ and the blank symbol 4.δ: Q x Γ Q x Γ x {L, R} is the transition function 5.q0: q0 ∊ Q is the start state, 6.qaccept: qaccept ∊ Q is the accept state 7.qreject: qreject ∊ Q is the reject state
![Page 6: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/6.jpg)
6
Non-Deterministic Turing Machine
A non-deterministic Turing machine is a 7-tuple: (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are finite sets, and 1. Q: set of states 2. Σ: input alphabet not containing the blank symbol
⊔ 3. Γ: tape alphabet, including Σ and the blank symbol 4. δ: Q x Γ P(Q x Γ x {L, R}) is the transition
function 5. q0: q0 ∊ Q is the start state, 6. qaccept: qaccept ∊ Q is the accept state 7. qreject: qreject ∊ Q is the reject state
![Page 7: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/7.jpg)
7
TM for {0n1n | n > 0} M= “on input string w: 1. Look for 0’s from the left end of the tape. Only blank cells are
allowed to pass. 2. If 0 found, change it to x and move right, else reject 3. Scan (to the right) passing 0’s and y’s until reach 1 4. If 1 found, change it to y and move left, else reject. 5. Move left passing y’s and 0’s 6. If x found move right 7. If 0 found, loop back to step 2. 8. If 0 not found, scan to the right passing y’s and accept;
otherwise reject.”
![Page 8: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/8.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 8
Example of TM for {0n1n | n > 0} The slides #8-#53 are taken from Dr. Rakesh Verma’s COSC 3340
![Page 9: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/9.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 9
JFLAP SIMULATION
![Page 10: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/10.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 10
JFLAP SIMULATION
![Page 11: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/11.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 11
JFLAP SIMULATION
![Page 12: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/12.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 12
JFLAP SIMULATION
![Page 13: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/13.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 13
JFLAP SIMULATION
![Page 14: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/14.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 14
JFLAP SIMULATION
![Page 15: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/15.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 15
JFLAP SIMULATION
![Page 16: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/16.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 16
JFLAP SIMULATION
![Page 17: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/17.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 17
JFLAP SIMULATION
![Page 18: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/18.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 18
JFLAP SIMULATION
![Page 19: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/19.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 19
JFLAP SIMULATION
![Page 20: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/20.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 20
JFLAP SIMULATION
![Page 21: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/21.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 21
JFLAP SIMULATION
![Page 22: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/22.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 22
JFLAP SIMULATION
![Page 23: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/23.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 23
JFLAP SIMULATION
![Page 24: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/24.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 24
JFLAP SIMULATION
![Page 25: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/25.jpg)
Lecture 16 UofH - COSC 3340 - Dr. Verma 25
JFLAP SIMULATION
![Page 26: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/26.jpg)
26
TM for {0n1n2n | n > 0}
M = “on input string w: 1. Look for 0’s from the left end of the tape. Only blank cells
are allowed to pass. 2. If 0 found, change it to x and move right, else reject 3. Scan to the right passing 0’s and y’s until reach 1 4. If 1 found, change it to y and move right, else reject. 5. Scan to the right passing 1’s and z’s until reach 2 6. If 2 found, change it to z and move left, else reject. 7. Scan to the left passing z’s, 1’s, y’s, and 0’s, 8. If x found move right 9. If 0 found, loop back to step 2. 10. If 0 not found, scan to the right passing only y’s and z’s
and accept. Otherwise reject.
![Page 27: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/27.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 27
Example of TM for {0n1n2n | n > 0} contd.
![Page 28: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/28.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 28
JFLAP SIMULATION
![Page 29: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/29.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 29
JFLAP SIMULATION
![Page 30: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/30.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 30
JFLAP SIMULATION
![Page 31: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/31.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 31
JFLAP SIMULATION
![Page 32: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/32.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 32
JFLAP SIMULATION
![Page 33: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/33.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 33
JFLAP SIMULATION
![Page 34: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/34.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 34
JFLAP SIMULATION
![Page 35: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/35.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 35
JFLAP SIMULATION
![Page 36: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/36.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 36
JFLAP SIMULATION
![Page 37: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/37.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 37
JFLAP SIMULATION
![Page 38: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/38.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 38
JFLAP SIMULATION
![Page 39: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/39.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 39
JFLAP SIMULATION
![Page 40: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/40.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 40
JFLAP SIMULATION
![Page 41: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/41.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 41
JFLAP SIMULATION
![Page 42: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/42.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 42
JFLAP SIMULATION
![Page 43: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/43.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 43
JFLAP SIMULATION
![Page 44: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/44.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 44
JFLAP SIMULATION
![Page 45: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/45.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 45
JFLAP SIMULATION
![Page 46: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/46.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 46
JFLAP SIMULATION
![Page 47: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/47.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 47
JFLAP SIMULATION
![Page 48: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/48.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 48
JFLAP SIMULATION
![Page 49: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/49.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 49
JFLAP SIMULATION
![Page 50: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/50.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 50
JFLAP SIMULATION
![Page 51: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/51.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 51
JFLAP SIMULATION
![Page 52: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/52.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 52
JFLAP SIMULATION
![Page 53: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/53.jpg)
Lecture 17 UofH - COSC 3340 - Dr. Verma 53
Different way of making {0n1n2n | n ≥ 0}
![Page 54: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/54.jpg)
54
TM for {w#w| w∊{0, 1}* } M = “ On input string w: 1.Check whether the string contains exactly one #. If no, reject; 2.Check whether the string contains only 0’s and 1’s besides the #. If there are other symbols, reject; 3.Zig-zag across the tape to corresponding positions on either side of the # symbol to check whether these positions contain the same symbol. If they do not, reject; 4.Cross off symbols as they are checked to keep track of which symbols correspond; 5.When all symbols to the left of the # have been crossed off, check for any remaining symbols to the right of the #. If any symbols remain, reject; otherwise, accept.”
![Page 55: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/55.jpg)
55
Configurations • A TM configuration is a setting of three items: current
state, current tape contents, and the current head location, i.e. uqv, where u and v are substrings and q is a state.
• Configuration C1 yields configuration C2 if the Turing machine can legally go from C1 to C2 in a single step. – Suppose that a, b, and c in Γ, u and v in Γ* and states qi and qj.
uaqibv and uqjacv are two configurations. • uaqibv yields uqjacv if δ(qi, b) = (qj, c, L).
– handles the case where the TM moves leftward.
• For a rightward move, uaqibv yields uacqjv if δ(qi, b) = (qj, c, R).
![Page 56: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/56.jpg)
Configurations (cont’d)
56
q7
1 0 1 1 0 1 1 1 1 ⊔ ⊔ …
A Turing machine with configuration 1011q701111
![Page 57: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/57.jpg)
57
Configurations: Special Cases • Special Cases occur when the head is at the
left-hand end or the right-hand end of the configurations. – For the left-hand end, the configurations qibv yields
qjcv if the transition is left-moving: δ(qi, b) = (qj, c, L). – For the right-hand end, the configuration uaqi is
equivalent to uaqi⊔ because we assume that blanks follow the part of the tape represented in the configuration. Thus we can handle this case as before, with the head no longer at the right-hand end.
![Page 58: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/58.jpg)
58
Configurations (cont’d) • The start configuration of M on input w is the
configuration q0w, which indicates that the machine is in the start state q0 with its head at the leftmost position on the tape.
• In an accepting configuration, the state of the configuration is qaccept.
• In a rejecting configuration, the state of the configuration is qreject.
• Accepting and rejecting configurations are halting configurations and do not yield further configurations.
![Page 59: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/59.jpg)
59
L(M): the language of TM M
• A TM M accepts input w if a sequence of configurations C1,C2,…,Ck exists, where 1. C1 is the start configuration of M on input w, 2. Each Ci yields Ci+1, and 3. Ck is an accepting configuration.
• The collection of strings that M accepts is the language of M, denoted L(M).
![Page 60: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/60.jpg)
60
Turing decidable/recognizable • Turing-recognizable
– A language is Turing-recognizable if some Turing machine recognizes it.
– i.e., TM M recognizes language L if L = {w | M accepts w}.
– Note: 3 outcomes possible, either TM accepts, rejects, or loops on a string.
![Page 61: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/61.jpg)
Turing decidable/recognizable (cont’d)
• Turing-decidable: – A language is Turing-decidable if some Turing
machine decides it. – TM M decides L if
(i) w ∈ L, M accepts it. (ii) w ∉ L, M rejects it.
Note: Every decidable language is Turing-recognizable
but certain Turing-recognizable language are not decidable.
61
![Page 62: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/62.jpg)
TM for {02n | n ≥0}
• TM M= “on input string w: 1. Sweep left to right across the tape, crossing off
every other 0, 2. If in step 1, the tape contained a single 0, accept, 3. If in step 1, the tape contained more than a single 0
and the number of 0s was odd, reject, 4. Return the head to the left-hand end of the tape, 5. Go to step 1.”
62
![Page 63: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/63.jpg)
63 The figures are taken from the book Introduction to Theory of Computation, Michael Sipser, page 172.
![Page 64: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/64.jpg)
64
The figures are taken from the book Introduction to Theory of Computation, Michael Sipser, page 173.
![Page 65: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/65.jpg)
65
Variants of TM models • Variants of TM model (not more powerful
than basic TM model) – Multitape Turing machine
• Like ordinary TM but with several tapes. • Every multitape Turing machine has an equivalent
single-tape Turing machine
![Page 66: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/66.jpg)
Variants of TM models (cont’d)
66
This figure is taken from the book Introduction to Theory of Computation, Michael Sipser, page 177.
![Page 67: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/67.jpg)
Variants of TM models (cont’d) – Nondeterministic Turing machine
• Every nondeterministic Turing machine has a deterministic Turing machine
67
This figure is taken from the book Introduction to Theory of Computation, Michael Sipser, page 179.
![Page 68: Chapter 3: The Church-Turing Thesishucs.dynu.net/liu/CC/Chapter3.pdfChapter 3: The Church-Turing Thesis 2 Turing Machine (TM) . . . Control Bi-direction Read/Write Turing machine is](https://reader030.fdocuments.net/reader030/viewer/2022041000/5ea06f8319827c605e085782/html5/thumbnails/68.jpg)
Acknowledgements and Reference
• Thanks Dr. Rakesh Verma in University of Houston for his permission to using his slides for his course COSC 3340 (those with footnote indicted).
• http://www2.cs.uh.edu/~rmverma/3340/3340.html
68