0% found this document useful (0 votes)
20 views4 pages

ATC RE Theorems

The document discusses regular expressions and finite state machines. It proves that for any regular expression R, there exists a finite state machine that accepts the language L(R) defined by R. It does this by showing how to construct finite state machines for the operators +, ., and * in regular expressions.

Uploaded by

Xdxd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

ATC RE Theorems

The document discusses regular expressions and finite state machines. It proves that for any regular expression R, there exists a finite state machine that accepts the language L(R) defined by R. It does this by showing how to construct finite state machines for the operators +, ., and * in regular expressions.

Uploaded by

Xdxd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

represented by a regular eXpression.

4.2.1 To Builda FSM from Regular Expression


regular expression. Then there exists a finite state machine (FSM)
Theorem: Let R be a
M=(Q, E, 8, 4., F) which accepts L(R).
Or

that there exists a finite automaton to accept the language L(R) corresponding to the
Prove
(06 marks VTUDec-06, Jan-07)
regular expression R
the corresponding machines to
Proof: By definition, ), &and a are regular expressions. So,
shown in figure 4.2 below:
recognize the language for the respective expressions are
qo qo
qo

Figure 4.2: e-NFAs to accept , [ and a


The schematic representation of a regular expression R to accept the language L(R) is shown in
machine M
Figure 4.3. where q is the start state and f is the final state of
L(R)
q M f
Mf

Eioure 4.3: Schematic representation of FA accepting L(R)


L sbe defnition of a regular expression it is clear that if R and S are regular expression, then
regular expressions which clearly uses three and..
R+S and R.S and R* are
construct equivalent ESM
operators 4' *
Let us take each case separately and
Regular Expressions
129
Let M, =(Q,, 2, ò,, 4,. f) be a machine which
..che regular expression R, Let M, = (Q,. ,, o,, q,. f,)accepts
be a
the language L(R,)corresponding
R) Corresponding to the regular expression R,. Then the machine which accepts the language
various
che regular express1ons K, + R, R,. R, and R* are shown below: machines corresponding to
Caee 1: R =R, + R,. We can construct an NFA
which accepts either L(R,) or L(R,) which can
he represented as LR, + R,) as shown in Figure 4.4.
L(R)
Mi fi

q2 M2 f

L(R)
Figure 4.4: To accept the language L(RI + R2)
It is clear from Figure 4.4 that the machine can
either accept L(R,) or L(R,). Here, g, is the start
state of the combined machine and qf is the final state of
combined machine M.
Case 2: R= R,. R,. We can construct an NFA which
accepts L(R,) followed by L(R,) which
can be represented as L(R, . R,) as shown in Figure 4.5.
L(R) L(R,)
q1 Mi f q2

Figure 4.5: To accept the language L(RI . R2)


It is clear from Figure 4.5 that the
machine after accepting L(R,) moves from state q, to f,.
Since there is a [-transition, without any input there will be a
9,- In state 4,, upon accepting L(R,), the machine moves to f,
transition from state f, to state
which is the final state. Thus, q.
which is the start state of machine M, becomes the start
f, which is the final state of machine M,,
state of the combined machine M and
becomes the final state of machine M and accepts the
language L(R,.R,).
Case 3: R = (R,)*, We can construct an NFA
which accepts either L(R,)*) as shown in
Figure 4.6.

M1 fi
L(R)

It is
Figure 4.6: To accept the language L(Rl)'
clear from Figure 4.6 that the machine can either
accept [ or any number of L(R, )s thus
accepting the language L(R,)*. Here, q, is the start state q, is the final state.

Example 4.31: CObtain an finite


Regular Languages & Properties of Regular Languages 163

6.2 Pumping Theorem (Lemma) for Regular Languages


Now, let us State and prove pumping lemma for regular languages"
Theoremn: Let M =(Q, 2, ò, 4, F) be an FA and has n number of states. Let L be the regular
language accepted by M. Let for every string x in L, there exists a constant n such that x > n.
Noy ifthe stringx can be broken into three substrings u, v and w such that
X= uVw

satisfying the following constraints:


v#[i.e., |v|> 1
luv n
then uv'w is in L for i> 0
Proof: Let M = (Q. 2, 8, qo F) be an FA and Let L is the language accepted by DFA and is
regular. Let x = a,a,a,...a. where m > n and each ai is in E. Here, n represent the states of
DFA.
Since we have m input symbols, naturally we should have m+1 states in the sequence qo
q,. q,...4, Where 9, Will be the start state and q, will be the final state as shown below:
aml
dm
q2 (m-1 m)

Since (x| > n, by the pigeon hole principle it is not possible tohave distinct transitions.
Once of the state can have a loop. Let the string x is divided into three substrings as shown
below:

The first group is the string prefix from a,a,...a, i.e., u = a,a,...a,
The second group is the loop string from a,a,2..a,,aj 1.e., v = auz.
The third group is the string suffix from a,, a,,ga 1.e., w= aa..a

am
4) Cm

Prefix (u) Loop(v) Suffix(w)


Observe from above figure that, the prefix string utakes the machine from g, to q, the loop string
vtakes the machine from 4, to q, (Note: q, = q) and suffix string wtakes the machine from 4, to
4, The minimum string that can be accepted by the above FA is uw with i = 0.
But, when i= 1, the accepted by
uvw is accepted by DFA When i= 2, the string uvvw is based on
DEA. So, if i>0, the string goes from q, to q, on input string u, circles from q to 4,
machine
Finite Automata and Formal|
Languagesplr iu
tt

164

input string W. In general, if the string xis


the value of iand then goes to accepting state on
into sub strings uw, then
for all i>0,
ww e L

using the transitions as shown below:


This can be expressed
S(4,- a,a,
.,aa. a,.,......., )
a,a,......a,a), a,,a,g*....... )
..a)
= o( o4,
.... .a_)
m

=d(q. a,a....a)
m
Also, after the string
a,a,.........a
input the string
the machine will be in state q.. Since q, and q. are same, we can
a,.a,g.....
any number of times and the machine will stay in q. only. Finally, if the input string is
.
.am

the machine enters into final state q.

6.3 Applications of Pumping Lemma

You might also like