A language is said to be regular if it can be represented by using Finite Automata or if a Regular Expression can be generated for it. This definition leads us to the general definition that; For every Regular Expression corresponding to the language, a Finite Automata can be generated.
For certain expressions like:- (a+b), ab, (a+b)*; It's fairly easier to make the Finite Automata by just intuition as shown below. The problem arises when we are provided with a longer Regular Expression. This brings about the need for a systematic approach towardsFinite Automata generation, which Kleene has put forward inKleene's Theorem.
For anyRegular Expressionr that represents Language L(r), there is a Finite Automata that accepts same language.
Regular ExpressionTo understand Kleene's Theorem-I, Let's take into account the basic definition of Regular Expression where we observe that \phi, \epsilon and a single input symbol "a" can be included in a Regular Language and the corresponding operations that can be performed by the combination of these are: Say, r1and r2be two regular expressions. Then,
- r1+ r2is a regular expression too, whose corresponding language is L(r1) U L(r2)
- r1. r2is a regular expression too, whose corresponding language is L(r1).L(r2)
- r1* is a regular expression too, whose corresponding language is L(r1)*
Observations From Kleene Theorem
We can further use this definition in association with Null Transitions to give rise to a FA by the combination of two or smaller Finite Automata (each corresponding to a Regular Expression). Let S accept L = {a} and T accept L = {b}, then R can be represented as a combination of S and T using the provided operations:
Union Operation
R = S + T
Union Operation
Observations:
- In the case of union operation, we can have a new start state, from which, the null transition proceeds to the starting state of both the Finite State Machines.
- The final states of both the Finite Automata are converted to intermediate states. The final state is unified into one which can be traversed by null transitions.
Concatenation Operation
R = S.T
Concatenation Operation
Observations:
- In the case of a concatenation operation we can have the same starting state as that of S, the only change occurs in the end state of S, which is converted to an intermediate state followed by a Null Transition.
- The Null transition is followed by the starting state of T, and the final state of T is used as the end state of R.
Exponential Operation
R = S*
Exponential Operation
Observations:
- A new starting state is added, and S has been put as an intermediate state so that the self-looping condition could be incorporated.
- Starting and Ending states have been defined separately so that the self-looping condition is not disturbed.
Now that we are aware of the general operations. Let's see how Kleene's Theorem-I can be used to generate a FA for the given Regular Expression.
Example:Make a Finite Automata for the expression(ab+a)*
Kleene AlgorithmWe see that using Kleene's Theorem - Gives a systematic approach towards the generation of Finite Automata for the provided Regular Expression.
Explore
Automata _ Introduction
Regular Expression and Finite Automata
CFG
PDA (Pushdown Automata)
Introduction of Pushdown Automata
5 min read
Pushdown Automata Acceptance by Final State
4 min read
Construct Pushdown Automata for given languages
4 min read
Construct Pushdown Automata for all length palindrome
6 min read
Detailed Study of PushDown Automata
3 min read
NPDA for accepting the language L = {anbm cn | m,n>=1}
2 min read
NPDA for accepting the language L = {an bn cm | m,n>=1}
2 min read
NPDA for accepting the language L = {anbn | n>=1}
2 min read
NPDA for accepting the language L = {amb2m| m>=1}
2 min read
NPDA for accepting the language L = {am bn cp dq | m+n=p+q ; m,n,p,q>=1}
2 min read
Construct Pushdown automata for L = {0n1m2m3n | m,n ⥠0}
3 min read
Construct Pushdown automata for L = {0n1m2n+m | m, n ⥠0}
2 min read
NPDA for accepting the language L = {ambncm+n | m,n ⥠1}
2 min read
NPDA for accepting the language L = {amb(m+n)cn| m,n ⥠1}
3 min read
NPDA for accepting the language L = {a2mb3m|m>=1}
2 min read
NPDA for accepting the language L = {amb2m+1 | m ⥠1}
2 min read
NPDA for accepting the language L = {aibjckdl | i==k or j==l,i>=1,j>=1}
3 min read
Construct Pushdown automata for L = {a2mc4ndnbm | m,n ⥠0}
3 min read
NPDA for L = {0i1j2k | i==j or j==k ; i , j , k >= 1}
2 min read
NPDA for accepting the language L = {anb2n| n>=1} U {anbn| n>=1}
2 min read
NPDA for the language L ={wÐ{a,b}* | w contains equal no. of a's and b's}
3 min read
Turing Machine
Decidability
TOC Interview preparation
TOC Quiz and PYQ's in TOC