You are on page 1of 2

ALIGARH COLLEGE OF ENGINEERING & TECHNOLOGY, ALIGARH

B.TECH. CSE/IT SECOND YEAR (2018-2019)


(THEORY OF AUTOMATA & FORMAL LANGUAGES LAB (RCS-453))
(USE JFLAP SOFTWARE ONLY)
(P4) Construct Regular Expressions, NFA and DFA for the Following:
(1)All strings having exactly two 1’s or three 0’s.
(2)The set of all strings in which every pair of adjacent zero’s appears before any pair of adjacent one’s.
(3)The set of all strings not containing {0} as a substring, alphabet={a,b}.
(4)Let∑={a,b}.for each of the following languages over ∑,find a regular expression representing it:
(i)All strings that exactly contain one ‘a’.
(ii)All strings beginning with ab.
(iii)All string that contains either the sub string ‘aaa’ or ‘bbb’.
(5)Give the English description of the language of the following regular expression: (1+ε)(00*1)*0*.
(6)A set of strings of 0’s and 1’s with at most one pair of consecutive 1’s.
(7)Give the English description of the language of the following regular expression :(0*1*)*000(0+1)*.
(8)Construct finite automata equivalent to the following regular expression: 10+ (0+11)0*1.
(9)The set of all strings not containing 101 as a substring.
(10)Obtain an NFA without E-moves, (0+1)*(00+11).
(11)The language of all strings in which every 0 is followed immediately by 11.
(12)The set of all strings over{0,1} containing exactly two 0’s.
(13)The set of all strings over {0,1} that does not end with 01.
(14)Construct transition diagram (finite automata without Ʌ-moves)of the following regular expression:
(a+b)*(a+b)
(15)The set of all strings of 0’s and 1’s which ends with 1 and does not contain substring 00.
(16)The set of all strings of 0’s and 1’s with an equal number of 0’s and 1’s such that no prefix has two
more 0’s than 1’s nor two 1’s than 0’s.
(17)Obtain the NFA without epsilon transition corresponding to the following regular expression:
(0*+1*)*11(1*0*)*.
(18)Obtain the NFA without epsilon transition corresponding to the following regular expression:
00(0*+1*)*11.
(19)The set of all strings of 0’s and 1’s in which the number of 0’s is even.
(20)Draw finite automata recognizing the following language: 1(1+10)*+10(0+01)*.
(21)Find a regular expression corresponding to the language of all strings over the alphabet {0,1}that contains
at least two 0’s.
(22)Find a regular expression for the language of all strings over the alphabet {0,1} that contain even no. of 1’s.
(23)Set of all strings such that the number of 0’s is odd.
(24)Set of all strings that do not contain 1101 as a substring.
(25)Draw NFA-Ɛ transition diagram for the following expressions :(i) ((ab)*|b)a (ii) (0*|1*)*10.
(26)Construct a DFA accepting the following language: (010+00)*(10)*.
(27)Let r1 =(00*1)*1 and r2 =1+0(0+10)*11, Prove that r1=r2.
(28)Let L={01}{0,1}*, construct NFA with Ɛ-moves that accept L2.
(29)The set of all strings not containing 101 as substring.
(30)Describe the language expressed by regular expression (0*1*)*.
(31)Construct a DFA for the regular expression (00*+11*)*.
(32)Write he regular expression for the language containing the strings over {0,1}in which there are least
two occurrences of 1’s between any two occurrences of 0’s.
(33)Describe the language to the given regular expression: (1+01)*(0+01)*.
(34)Construct a DFA for the regular expression (00+001)*1.
(35)Write a regular expression for set of all strings such that number of 0’s is odd.
(36)Design a regular expression that accepts all the strings for input alphabet {a,b}containing exactly two a’s.
(37)For the regular expressions: r1=a*+b* and r2=ab*+ba*+b*a+(a*b)*.
(i)Find a string corresponding to r2 but not to r1 and (ii) Find a string corresponding to both r1 and r2.
(38)Determine whether complement of a nonregular language is also nonregular . Prove your answer.
(39)Simplify the regular expression (r(r+s)*).
(40) If L and M are non regular languages then intersection of L and M is also nonregular.
(41)Let S={ab,bb} and let T={ab,bb,bbbb}.Show that S*=T*.
(42) Simplify the following regular expressions:
(a) r1(r1* r1+r1*)+r1* . (b)(r1+r2+r1r2+r2r1)*, where r1 and r2 are regular expressions.
(43) Prove or disprove the following for regular expressions r,s and t.
(i) (r+s)*=r*+s* . (ii) s(r s+s)*=r r*(r r*s)*.
(44) Construct NFA for (a|b)+ and derive DFA through subset construction algorithm.
(45) Let L1 be a CFL and L2 be regular languages, then prove that L1∩L2 is context free.
(46) Find a regular grammar for the language, L={an bm| n+m is even}.
(47) Show that the following language is regular:-
(i)L={an |n>4}.
(ii)L={v w v| v, w ε{a,}*, |v|=2}.

You might also like