0% found this document useful (0 votes)
2 views

Unit 2

Kleene's Theorem consists of two parts: Part 1 states that any regular language can be accepted by a Finite Automaton (FA), while Part 2 asserts that any language accepted by an FA is regular. The proof for Part 1 is established through induction, demonstrating that regular languages can be constructed using union, concatenation, and Kleene star operations. Part 2 is proven by showing that the set of strings accepted by an FA is regular, utilizing lemmas about paths in the automaton.

Uploaded by

iameverywhere792
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)
2 views

Unit 2

Kleene's Theorem consists of two parts: Part 1 states that any regular language can be accepted by a Finite Automaton (FA), while Part 2 asserts that any language accepted by an FA is regular. The proof for Part 1 is established through induction, demonstrating that regular languages can be constructed using union, concatenation, and Kleene star operations. Part 2 is proven by showing that the set of strings accepted by an FA is regular, utilizing lemmas about paths in the automaton.

Uploaded by

iameverywhere792
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/ 20

Unit2 : Kleene’s Theorem

•Part I & II statements and proofs,


•minimum state of FA for a regular language,
•minimizing number of states in Finite Automata.
• In this unit we are going to learn Kleene's
theorem. It states that any regular language is
accepted by an FA and conversely that any
language accepted by an FA is regular.
• Kleene's theorem is proving the following two
parts:
1. Kleene’s Theorem, Part 1
Any regular language can be accepted by a Finite
Automaton.
2. Kleene’s Theorem, Part 2
The Language accepted by Finite Automaton is
regular
1. Kleene’s Theorem, Part 1 :
Any regular language can be accepted by a Finite
Automaton.

Proof:
• This is going to be proven by (general) induction
following the recursive definition of regular
language.
• The Inductive proofs includes the 2 steps as
– Basis Step
– Inductive Step
Basis Step:
As shown below the languages Φ , {} and { a } for
any symbol a in Σ are accepted by an FA.
Inductive Step:
• We are going to show that for any languages L1 and
L2 if they are accepted by FAs, then L1. L2 , L1UL2 and
L1* are accepted by FAs.
• Since any regular language is obtained from {} and {a}
for any symbol a in by using union, concatenation and
Kleene star operations, that together with the Basis Step
would prove the theorem.
• Suppose that L1 and L2 are accepted by
FAs M1 = < Q1 , ∑ , q1,0 , δ1 , A1 > and
M2 = < Q2 , ∑, q2,0 , δ2 , A2 > , respectively.
We assume that Q1 ∩ Q2 = Φ without loss of
generality since states can be renamed if necessary.
• Then L1. L2 , L1UL2 and L1* are
accepted by the FAs
L1 U L2 is Mu = < Qu , Σ , qu,0 , δu , Au > ,

L1. L2 is Mc = < Qc , Σ , qc,0 , δc , Ac >

L1* is Mk = < Qk , Σ , qk,0 , δk , Ak > ,

which are given below.


L1 U L2 is represented as ,
Mu = < Qu , Σ , qu,0 , δu , Au >
where
Qu = Q1 ∪ Q2 ∪ { qu,0 } ,
where qu,0 is a state which is neither in Q1 nor in
Q2 .
δu = δ1 ∪ δ2 ∪ { (qu,0, ∅ , { q1,0 , q2,0 } ) } ,
that is δu(qu,0, ∅ ) = { q1,0 , q2,0 } .

Note that δu (qu,0, a ) = ∅ for all a in Σ.


Au = A 1 ∪ A2
L1. L2 is represented as ,
Mc = < Qc , Σ , qc,0 , δc , Ac > :
where,
Qc = Q 1 ∪ Q2
qc,0 = q1,0
δc = δ1 ∪ δ2 ∪ { (qc,0, ∅ , { q2,0 } ) } | q ∈ A1,
Ac = A 2
L1* is represented as ,
Mk = < Qk , Σ , qk,0 , δk , Ak > :
where,
Qk = Q1 ∪ { qk,0 } ,
where qk,0 is a state which is not in Q1 .
δk =δ1 ∪ { (qk,0, ∅ , { q1,0 } ) } { (q, ∅ , { qk,0 } ) |q∈ A1 }
Ak = { qk,0 }
These NFA-s are illustrated below.
It can be proven, though we omit proofs, that these NFA- s , Mu, Mc and Mk , in
fact accept L1UL2 ,L1. L2 and L1* respectively.
End of Proof
Examples of Mu , Mc and Mk:

• Example 1: An NFA- that accepts the language


represented by the
regular expression (aa + b)* can be constructed
as follows using the operations given above.
• Example 2: An NFA- that accepts the language
represented by the
regular expression ((a + b)a*)* can be
constructed as follows using the operations given
above.
Example 1: An NFA- null that accepts the language
represented by the regular expression (aa + b)* can be
constructed as follows using the operations given above.
Solution:
First construct NFA-null transition for a, b and aa
Continued with example1
Then construct NFA-null for subexpressions of given RE using union and kleen *
Example 2: An NFA- that accepts the language represented by the
regular expression ((a + b)a*)* can be constructed as follows using
the operations given above.
Solution:
First construct NFA-null transition for a, b , a* and a+b
Continued with example1 :
Then construct NFA-null for subexpressions of given RE using concatination and kleen *
.
2 Kleene’s Theorem, Part 2
The Language accepted by Finite Automaton is regular
• The converse of the part 1 of Kleene Theorem also holds
true. It states that any language accepted by a finite
automaton is regular.
• Before proceeding to a proof outline for the converse, let
us study a method to compute the set of strings accepted
by a finite automaton.
• Given a finite automaton, first relabel its states with the
integers 1 through n, where n is the number of states of the
finite automaton.
• Next denote by L(p, q, k) the set of strings representing
paths from state p to state q that go through only states
numbered no higher than k.
• Note that paths may go through arcs and vertices any
number of times.
• Then the following lemmas hold.
Lemma 1:
L(p, q, k+1) = L(p, q, k) L(p, k+1, k)L(k+1, k+1, k)*L(k+1, q, k) .

What this lemma says is that the set of strings


representing paths from p to q passing through states
labeled with k+1 or lower numbers consists of the
following two sets:
1. L(p, q, k) : The set of strings representing paths from p
to q passing through states labeled with k or lower
numbers.
2. L(p, k+1, k)L(k+1, k+1, k)*L(k+1, q, k) : The set of strings
going first from p to k+1, then from k+1 to k+1 any
number of times, then from k+1 to q, all without passing
through states labeled higher than k.
See the figure below for the illustration of above.
Lemma 2: L(p, q, 0) is regular.
Proof: L(p, q, 0) is the set of strings representing paths from p
to q without passing any states in between. Hence if p and q are
different, then it consists of single symbols representing arcs
from p to q. If p = q, then is in it as well as the strings
representing any loops at p (they are all single symbols). Since
the number of symbols is finite and since any finite language is
regular, L(p, q, 0) is regular.
>From Lemmas 1 and 2 by induction the following lemma
holds.

Lemma 3: L(p, q, k) is regular for any states p and q and any


natural number k.
Since the language accepted by a finite automaton is the union
of L(q0, q, n) over all accepting states q, where n is the number
of states of the finite automaton, we have the following
converse of the part 1 of Kleene Theorem.

You might also like