Kleene's Theorem
Kleene's Theorem
Kleene’s Theorem
Lecture 11
22/10/2014
Convert TG to RE
Do it for this TG
Step 1 & 2:
Create single initial and final states
Step 4: State Elimination & By Pass
Proof of Kleene’s Theorem Part III
REFA
To show: every language that can be defined by a regular
expression can also be defined by a FA.
We will do this by using a recursive definition and a
constructive algorithm.
Recall
every regular expression can be built up from the letters of the
alphabet and ^ and Ø;.
Also, given some existing regular expressions, we can build
new regular expressions by applying the following operations:
1. union (+)
2. concatenation
3. closure (Kleene star)
Recall that we had the following recursive definition for
regular expressions:
Rule 1: If x € ∑ , then x is a regular expression. ^ is a regular
expression. ; Ø is a regular expression.
Rule 2: If r1 and r2 are regular expressions, then r1 + r2 is a
regular expression.
Rule 3: If r1 and r2 are regular expressions, then r1r2 is a regular
expression.
Rule 4: If r1 is a regular expression, then r1* is a regular
expression.
Based on the above recursive definition for regular
expressions, we have the following recursive definition for
FA’s associated with regular expressions:
Rule 1: Example
Union of two FAs: Let FA 1 and FA2 accept languages
defined by r1 and r2 then there is an FA3 which accepts
(r1+r2)
Another Example
Union of two FAs: Let FA 1 and FA2 accept languages
defined by r1 and r2 then there is an FA3 which accepts
(r1+r2)
Suppose we have the machine FA1, which accepts the
language of all words over the alphabet ∑= {a, b} that end
in ‘b’.
and the familiar machine FA2 , which accepts
EVEN-EVEN language .
Task…
If r1 = ((a+b)(a+b))* &
r2 = ((a+b)(a+b))* (a+b)
r3 = r1 + r2
Find FA3 for r3?