source of slides: introduction to automata theory, languages, and computation by john e. hopcroft,...
TRANSCRIPT
![Page 1: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/1.jpg)
Source of Slides: Introduction to Automata Theory, Languages, and ComputationBy John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman
AndIntroduction to Languages and The Theory of Computation by J. C. Martin
![Page 2: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/2.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 2
DecidabilityDecidability
Basic Mathematical Definitions
Countable Set:A set is countable if there is a one-to-one correspondence between the set and N, the natural numbers. It can be enumerated.
Numbers: N = natural numbers = {1, 2, 3, …} Z = integers = {…, -2, -1, 0, 1, 2, …} Q = rational numbers ( expressed in ratios, 1/5, 3/7, 2/9 etc.) R = real numbers ( floating point, 1.5, 2.5674 etc. ) C = complex numbers (2+5i, 27- 3i etc. )
{ a, b, c, d, e, ……… }
1 2 3 4 5
N, Z and Q are countable.R and C are uncountable.
N, Z and Q are countable.R and C are uncountable.
![Page 3: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/3.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 3
DecidabilityDecidability
1/1 1/2 1/3 1/4 1/5 1/6 …
2/1 2/2 2/3 2/4 2/5 2/6 …
3/1 3/2 3/3 3/4 3/5 3/6 …
4/1 4/2 4/3 4/4 4/5 4/6 …
5/1 …
…….
Rational Numbers, Q are countable
![Page 4: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/4.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 4
DecidabilityDecidability
s1 = (0, 0, 0, 0, 0, 0, 0, ...)
s2 = (1, 1, 1, 1, 1, 1, 1, ...)
s3 = (0, 1, 0, 1, 0, 1, 0, ...)
s4 = (1, 0, 1, 0, 1, 0, 1, ...)
s5 = (1, 1, 0, 1, 0, 1, 1, ...)
s6 = (0, 0, 1, 1, 0, 1, 1, ...)
s7 = (1, 0, 0, 0, 1, 0, 0, ...)
……….
Uncountable Set:Cantor’s Diagonalization
s0 = (1, 0, 1, 1, 1, 0, 1, ...)
![Page 5: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/5.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 5
DecidabilityDecidability
R is uncountable
Proof: o Suppose RR is countableo List RR according to the bijection f:
n f(n) _
1 3.14159…
2 5.55555…
3 0.12345…
4 0.50000…
…
![Page 6: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/6.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 6
DecidabilityDecidability
R is uncountable
Proof: o Suppose RR is countableo List RR according to the bijection f:
set x = 0.a1a2a3a4…
where digit ai ≠ ith digit after decimal point of f(i) (not 0, 9)
e.g. x = 0.2312…
x cannot be in the list!
n f(n) _
1 3.14159…
2 5.55555…
3 0.12345…
4 0.50000…
…
![Page 7: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/7.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 7
Turing MachineTuring Machine
Decidability
Turing decidability
L is Turing decidable (or just decidable) if there exists a Turing machine M that accepts all strings in L and rejects all strings not in L. Note that by rejection we mean that the machine halts after a finite number of steps and announces that the input string is not acceptable. Acceptance, as usual, also requires a decision after a finite number of steps.
![Page 8: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/8.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 8
Decidability
Turing Recognizability
L is Turing recognizable if there is a Turing machine M that recognizes L, that is, M should accept all strings in L and M should not accept any strings not in L. This is not the same as decidability because recognizability does not require that M actually reject strings not in L. M may reject some strings not in L but it is also possible that M will simply "remain undecided" on some strings not in L; for such strings, M's computation never halts.
DecidabilityDecidability
![Page 9: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/9.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 9
DecidabilityDecidability
• Recursion and Recursive Functions• Enumerable Sets• Recursively Enumerable Languages• Resursive Languages• Non-Recursively Enumerable
Languages
![Page 10: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/10.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 10
DecidabilityDecidability
regular languages
context free languages
all languagesdecidable
RE
decidable RE all languages
![Page 11: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/11.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 11
DecidabilityDecidability
A language is recursively enumerableif some Turing machine accepts it.
![Page 12: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/12.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 12
DecidabilityDecidability
A language is recursive if some Turing machine accepts it and halts on any input string.
ORA language is recursive if there is a membership algorithm for it.
![Page 13: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/13.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 13
DecidabilityDecidability
A language is recursively enumerableif and only if there is an enumeration procedure for it.
If a language L is recursive then there is an enumeration procedure for it
![Page 14: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/14.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 14
DecidabilityDecidability
![Page 15: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/15.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 15
DecidabilityDecidability
![Page 16: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/16.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 16
DecidabilityDecidability
Theorem: S is an infinite countable set, the powerset 2s of S is uncountable
Since S is countable, we can write S = { s1 , s2 , s3 , s4 , …….. } where S consists of s1 , s2 , s3 , s4 , ….. elements and the powerset 2s is of the form:
{ {s1}, {s2 }, … {s1 , s2 }, ….. {s1 , s2 , s3 , s4 } … }
![Page 17: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/17.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 17
DecidabilityDecidability
String Encoding:
![Page 18: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/18.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 18
DecidabilityDecidability
![Page 19: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/19.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 19
DecidabilityDecidability
![Page 20: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/20.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 20
DecidabilityDecidability
![Page 21: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/21.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 21
DecidabilityDecidability
Coding Turing Machines
![Page 22: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/22.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 22
DecidabilityDecidability
Transition Rules are: Coding
Code for M
![Page 23: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/23.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 23
DecidabilityDecidability
Diagonalization Language:
![Page 24: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/24.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 24
DecidabilityDecidability
Theorem: Ld is not a recursively enumerable language. That is there is no Turing Machine that accepts Ld
![Page 25: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/25.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 25
DecidabilityDecidability
![Page 26: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/26.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 26
DecidabilityDecidability
Fig. 10
![Page 27: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/27.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 27
DecidabilityDecidability
![Page 28: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/28.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 28
DecidabilityDecidability
![Page 29: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/29.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 29
DecidabilityDecidability
![Page 30: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/30.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 30
DecidabilityDecidability
Decidable Languages about DFA
![Page 31: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/31.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 31
DecidabilityDecidability
![Page 32: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/32.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 32
DecidabilityDecidability
![Page 33: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/33.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 33
DecidabilityDecidability
Halting and Acceptance Problems:Acceptance Problem:
Does a Turing machine accept an input string?
ATM is recursively enumerable.
![Page 34: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/34.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 34
DecidabilityDecidability
![Page 35: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/35.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 35
DecidabilityDecidability
![Page 36: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/36.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 36
DecidabilityDecidability
![Page 37: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/37.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 37
END
![Page 38: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/38.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 38
DecidabilityDecidability
![Page 39: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/39.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 39
DecidabilityDecidability
![Page 40: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/40.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 40
DecidabilityDecidability
![Page 41: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/41.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 41
DecidabilityDecidability
![Page 42: Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction](https://reader036.vdocuments.site/reader036/viewer/2022062312/5514d81b550346b0478b5312/html5/thumbnails/42.jpg)
Dept. of Computer Science & IT, FUUAST Theory of Computation 42
DecidabilityDecidability