RAJALAKSHMI ENGINEERING COLLEGE - PowerPoint PPT Presentation

1 / 242
About This Presentation
Title:

RAJALAKSHMI ENGINEERING COLLEGE

Description:

RAJALAKSHMI ENGINEERING COLLEGE UNIT- I AUTOMATA Finite Automata States Open Closed Sensors Front Someone on the Front pad Rear Someone ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 243
Provided by: technicals76
Category:

less

Transcript and Presenter's Notes

Title: RAJALAKSHMI ENGINEERING COLLEGE


1
RAJALAKSHMI ENGINEERING COLLEGE
THEORY OF COMPUTATION
2
UNIT- I
  • AUTOMATA

3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
(No Transcript)
13
(No Transcript)
14
(No Transcript)
15
Finite Automata
16
(No Transcript)
17
  • States
  • Open
  • Closed
  • Sensors
  • Front Someone on the Front pad
  • Rear Someone on the Rear pad
  • Both Someone on both the pads
  • Neither No one on either pad

18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
(No Transcript)
32
(No Transcript)
33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
(No Transcript)
40
(No Transcript)
41
UNIT - II
  • REGULAR EXPRESSIONS
  • AND
  • LANGUAGES

42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
45
(No Transcript)
46
(No Transcript)
47
(No Transcript)
48
(No Transcript)
49
(No Transcript)
50
(No Transcript)
51
(No Transcript)
52
(No Transcript)
53
(No Transcript)
54
(No Transcript)
55
(No Transcript)
56
(No Transcript)
57
(No Transcript)
58
(No Transcript)
59
(No Transcript)
60
(No Transcript)
61
(No Transcript)
62
(No Transcript)
63
(No Transcript)
64
(No Transcript)
65
(No Transcript)
66
(No Transcript)
67
(No Transcript)
68
(No Transcript)
69
(No Transcript)
70
(No Transcript)
71
(No Transcript)
72
(No Transcript)
73
(No Transcript)
74
(No Transcript)
75
(No Transcript)
76
(No Transcript)
77
(No Transcript)
78
(No Transcript)
79
(No Transcript)
80
Questions about Regular Languages
81
Question contd
82
Singleton Languages are Regular
83
Finite Languages are regular
84
(No Transcript)
85
(No Transcript)
86
(No Transcript)
87
(No Transcript)
88
(No Transcript)
89
Closure Properties for Regular Languages
90
Myhill-Nerode Theorem
91
(No Transcript)
92
(No Transcript)
93
(No Transcript)
94
UNIT III
  • CONTEXT-FREE GRAMMAR
  • AND
  • LANGUAGES

95
Context Free Grammars
96
Cont
97
Cont
98
Defining CFG
99
Notational conventions For CFGs
100
OTHER CFG EXAMPLES
101
Languages of CFG
102
Languages of CFG
103
Regular Languages and CFL
104
Translating FAs into CFG
105
Formalizing the Translation
106
Closure Properties of CFL
107
Proving CFLs closed under Union
108
IDEA
109
Formal Construction of Gu
110
Derivations
111
Sentential Form
112
Left Most and Right Most Derivation
113
Right-Linear Grammars
114
Ambiguous Grammars
115
Ambiguous Grammars
116
Pushdown Automata
  • Recall our study of regular languages.
  • They were defined in terms of regular expressions
    (syntax).
  • We then showed that FAs provide the computational
    power
  • needed to process them.
  • We would like to mimic this line of development
    for CFLs.
  • We have a syntactic definition of CFLs in terms
    of CFGs.
  • What kind of computing power is needed to
    process (i.e.
  • recognize) CFLs?
  • Do FAs suffice?

117
Cont
118
Cont
119
Example PDA for0n1nn0
120
Formal Definition
121
Instantaneous Description
122
Language accepted by PDA
123
Language accepted by PDA
124
Language accepted by PDA
125
Equivalence of CFGs and PDAs
126
Cont
127
Deterministic PDA
128
UNIT - IV
  • PROPERTIES
  • OF
  • CONTEXT-FREE LANGUAGES

129
Chomsky Normal Form
130
Defining CNF
131
What is the Big Deal about CNF?
132
Cont
133
Converting CFGs into CNF
134
Eliminating e-Productions
135
Cont
136
Cont
137
Nullability
138
Generating an e-Production-free CFGs
139
Converting CFGs into CNF
140
Eliminating Unit Productions
141
Cont
142
U(G,A) and New Productions
143
Example
144
Cont
145
Formal Construction
146
Eliminating Terminal Productions
147
Example
148
Formal Construction
149
Pumping Lemma For CFLs
150
Cont
151
Derivation Trees
152
Defining Derivation Tree
153
Example
154
Derivation Trees and CNF
155
(No Transcript)
156
Pumping Lemma for CFL
157
Proving Languages Non Context Free using Pumping
Lemma
158
Prove that L aNbNcNN 0 is Not a CFL
159
Proof Cont
160
Turing Machines
161
A Finite Automaton
162
A Pushdown Automaton
163
A Turing Machine
164
Cont..
165
Differences
166
Example
167
Cont
168
Cont
169
Cont
170
Formal Definition
171
Cont..
172
Cont
173
Cont
174
Configurations
175
Cont
176
More Configuration
177
Accepting a Language
178
Enumerable Languages
179
UNIT V
  • UNDECIDABILITY

180
Enumerable Languages
181
Enumerable Languages
182
Example
183
Example
184
Example
185
Element Distinctness
186
Element Distinctness
187
Element Distinctness
188
Element Distinctness
189
Element Distinctness
190
Variants
191
Multitape Turing Machine
192
Equivalence
193
Simulation
194
Simulation
195
Non Deterministic Turing Machine
196
Decidability
197
Example
198
Theorem
199
Theorem
200
Theorem
201
Theorem
202
Halting Problem
203
Cont..
204
Cont..
205
Turing Machines are countable
206
Cont..
207
Post Correspondence Problem
208
Cont
209
Cont...
210
Cont
211
Cont
212
Cont
213
(No Transcript)
214
NP-complete Problem
215
(No Transcript)
216
(No Transcript)
217
Decision Problems To keep things simple, we
will mainly concern ourselves with decision
problems. These problems only require a single
bit output yes'' and no''. How would you
solve the following decision problems? Is
this directed graph acyclic? Is there a
spanning tree of this undirected graph with
total weight less than w? Does this
bipartite graph have a perfect (all nodes
matched) matching? Does the pattern p
appear as a substring in text t?
218
(No Transcript)
219
P P is the set of decision problems that can be
solved in worst-case polynomial time If
the input is of size n, the running time must be
O(nk). Note that k can depend on the
problem class, but not the particular instance.
All the decision problems mentioned above are
in P.
220
Nice Puzzle The class NP (meaning
non-deterministic polynomial time) is the set of
problems that might appear in a puzzle magazine
Nice puzzle.'' What makes these problems
special is that they might be hard to solve, but
a short answer can always be printed in the back,
and it is easy to see that the answer is correct
once you see it. Example... Does matrix A have
an LU decomposition? No guarantee if answer is
no''.
221
(No Transcript)
222
NP Technically speaking A problem is in
NP if it has a short accepting certificate.
An accepting certificate is something that we can
use to quickly show that the answer is yes''
(if it is yes). Quickly means in polynomial
time. Short means polynomial size. This
means that all problems in P are in NP (since we
don't even need a certificate to quickly show the
answer is yes''). But other problems in NP
may not be in P. Given an integer x, is it
composite? How do we know this is in NP?
223
Good Guessing Another way of thinking of NP is
it is the set of problems that can solved
efficiently by a really good guesser. The
guesser essentially picks the accepting
certificate out of the air (Non-deterministic
Polynomial time). It can then convince itself
that it is correct using a polynomial time
algorithm. (Like a right-brain, left-brain sort
of thing.) Clearly this isn't a practically
useful characterization how could we build such
a machine?
224
Exponential Upperbound Another useful property
of the class NP is that all NP problems can be
solved in exponential time (EXP). This is
because we can always list out all short
certificates in exponential time and check all
O(2nk) of them. Thus, P is in NP, and NP is in
EXP. Although we know that P is not equal to EXP,
it is possible that NP P, or EXP, or neither.
Frustrating!
225
NP-hardness As we will see, some problems are
at least as hard to solve as any problem in NP.
We call such problems NP-hard. How might we
argue that problem X is at least as hard (to
within a polynomial factor) as problem Y? If X
is at least as hard as Y, how would we expect an
algorithm that is able to solve X to behave?
226
(No Transcript)
227
(No Transcript)
228
(No Transcript)
229
(No Transcript)
230
co-NP
NP
P
One of the central (and widely and intensively
studied 30 years) problems of (theoretical)
computer science is to prove that (a) P?NP
(b) NP ? co-NP. ?All evidence indicates that
these conjectures are true. ? Disproving any of
these two conjectures would not only be
considered truly spectacular, but would also come
as a tremendous surprise (with a variety of
far-reaching counterintuitive consequences). NP-c
omplete Collection Z of problems is NP-complete
if (a) it is NP and (b) if polynomial-time
algorithm existed for solving problems in Z, then
PNP.
231
(No Transcript)
232
(No Transcript)
233
(No Transcript)
234
(No Transcript)
235
(No Transcript)
236
NP-Complete Problems
237
(No Transcript)
238
(No Transcript)
239
(No Transcript)
240
(No Transcript)
241
(No Transcript)
242
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com