Ch2regular Expression
Ch2regular Expression
• Example:-
• Solution:-
Example:-
• Example:-
• Identities of Regular Expression:-
• We can write regular expression for a DFA using
Arden theorem
• Solution:- Assume that R = QP* satisfied 5.1
• Then Q + (QP*)P put the value of R in 5.1
• Q(Ʌ + P*P)
• Now apply I9
• QP* hence 5.1 is satisfied when R = QP*. This means R = QP* is a
solution of 5.1
• Example:-
• Finite Automata and Regular Expression:-
Transition System Containing Ʌ - Moves:-
• Transition Systems can be generalized by Ʌ - moves.
• occur when no input is applied.
• It is possible to convert a transition system with Ʌ -
moves into an equivalent transition system without
Ʌ - moves.
• Solution:-
• Example:-
• Equivalence of Two Finite Automata:-
Example:-
Solution:-
• Pumping Lemma for Regular Sets:-
This lemma gives a necessary condition for an input string to belong to a
regular set. The result is called pumping lemma as it gives a method of
pumping (generating) many input strings from a given string. As pumping
lemma gives a necessary condition, it can be used to show that certain sets are
not regular.
Theorem 5.5 (Pumping Lemma) Let M be a finite automaton with n states. Let L be
the regular set accepted by M. Let wE L and w>= m. If m >=n, then there exists x,y, z
such that w =xyz, y != null and xyizE L for each i >=O.
Application of Pumping Lemma
• This theorem can be used to prove that certain sets
are not regular. The steps needed for proving that a
given set is not regular are
• Step 1 Assume that L is regular. Let n be the number
of states in the corresponding finite automaton.
• Step 2 Choose a string w such that w >= n. Use
pumping lemma to write w=xyz , xy<=n and Iy I > 0.
• Step 3 Find a suitable integer i such that xyiz does not
belongs to L. This contradicts our assumption, Hence L
is not regular.
• Show that L = {0i1i such that i>= I} is not regular.
Solution
• Step 1 Suppose L is regular. Let n be the number of states in the
finite automaton accepting L.
• Step 2 Let w =0n1n. Then w=2n > n. By pumping lemma, we write
• w = xyz with IX}'I ~ n and I y I ::t O.
• Step 3 We want to find i so that x.'/z EO L for getting a
contradiction. The
• string \' can be in any of the following fonns:
• Case 1 y has a's. i.e. y =Ok for some k e: l.
• Case 2 ,'has only l' s. i.e. y = 11 for some I 2: 1.
• Case 3 y has both O·sand l' s, i.e. y = Oklj for some k, j e: L