










































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











































Operands: ε, Φ, and any a belonging to Σ Operators: (^) + (Union) (^). (Concatenation) (^) * (Closure) Notation: For all Regular Expressions R, constructed from above, L(R) will denote the Language R defined
Concatenation: if R, S are Regular expressions R.S is a regular expression where, L(R.S) = L(R).L(S) Recall for languages L 1 , L 2 L 1 .L 2 = {w = xy | x L 1 , y L 2 } Examples: (^) R = ε + 1 L(R) = {ε,1} (^) S = ε + 0 + 1 L(S) = {ε,0,1} (^) T = RS or R.S L(T) = {ε,0,1,10,11}
(^)
Language Powers: L 0 = {ε} L 1 = L L 2 = L.L or LL L 3 = L.L.L or LLL . . . Here Lk = { w | w = x 1 x 2 x 3 …xk, and }
i x L i
If R is an RE R+^ is an RE Where, L(R+) = L(R) U L(R^1 ) U L(R^2 ) …… = L(R) U L(R)^1 U L(R)^2 …… Easy facts: R+ (^) = R. R* = R. R R = ε + R+ (R) = R*
Homework: Read your book from page no 97 to 103 and try exercises on 103.
Formal Recursive definition of Regular Expressions 1.Any terminal symbol (i.e. an element of Σ), ε, Φ are RE 2.Union of two regular expressions R1 and R2 written as R1+R2 is also an RE 3.Concatenation of two regular expressions R1 and R written as R1.R2 is also an RE 4.Iteration (or closure) of a regular expression R written as R* is also an RE 5.If R is a regular expression then (R) is also an RE 6.Regular expressions over Σ are precisely those obtained recursively by applying rules 1-5 once or several times.
Compact description of a regular language Start with some “non-terminal” symbol, S. Expand that symbol, using some substitution rules. ...keep applying rules until all non-terminals are expanded to terminals. The string of terminals is in the sentence.
Strings in and out of the example Regular Language: In the language? “ba!”, “baa!”, “baaaaa!”, “aaaaaa” Not in the language? “ba”, “b!”, “ab!”, “bbaaa!”, “alibaba!” Finite-state Automata a Regular Expression
Accepted Language Strings Finite-State Automata Regular Expressions Recognize the Regular Language Generate the Regular Language
Recall the definition: Languages generated by R.E. are called Regular Languages Have you seen? ε-NFA to NFA (Assumed to be done) NFA to DFA (Assumed to be done) DFA to R.E. R.E. to ε-NFA
Kleene’s Theorem: (RE ε-NFA) For any regular language L(R) defined by regular expression R, there exists an ε-NFA N such that L(R) = L(N) Proof: We use principle of Induction on total no of operators in R P = c has 0 operators; #P= Q = (a+b)* has 2 operators; #Q= R = (a+b)*c has 3 operators; #R=
Basis: For #R = 0 Clearly R = ε, Φ, or some a belonging to Σ N(ε): N(Φ): N(a): Induction Hypothesis: Assume induction hypothesis for any regular expression R, where #R ≤ n, there exists an ε-NFA N, such that L(R)=L(N)