Вы находитесь на странице: 1из 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 or disprove 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)Design a regular expression that accepts all the strings for input alphabet {a,b}containing exactly two a’s.
(36)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.
(37)Determine whether complement of a nonregular language is also nonregular . Prove your answer.
(38)Simplify the regular expression (r(r+s)*).
(39) If L and M are non regular languages then intersection of L and M is also nonregular.
(40)Let S={ab,bb} and let T={ab,bb,bbbb}.Show that S*=T*.
(41) Simplify the following regular expressions:
(a) r1(r1* r1+r1*)+r1* . (b)(r1+r2+r1r2+r2r1)*, where r1 and r2 are regular expressions.
(42) 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)*.
(43) Construct NFA for (a|b)+ and derive DFA through subset construction algorithm.
(44) Let L1 be a CFL and L2 be regular languages, then prove that L1∩L2 is context free.
(45) Find a regular grammar for the language, L={an bm| n+m is even}.
(46) Show that the following language is regular:-(i)L={an |n>4}. (ii)L={v w v| v, w ε{a,b}*, |v|=2}.
(47)The language of all strings in which both the numbers of 0’s and 1’s are even.
(48)The language of all strings that begin or end with 00 or 11.
(49)Represent the following using regular expressions:
(i)∑={a,b,c} the language such that “ any number of a’s followed by any number of c’s”.
(i)If L(r)={0,2,201,21,011,211,0111,-----} the what is r?
(iii)If L(r)={00,010,0110,01110,------}the what is r ?
(iv)Language s defined over , ∑={a,b}has to have the strings beginning with ‘a’ and not have two
consecutive a’s.Write the regular expression for the same.
(50)Let ∑={0,1}, construct regular expressions for the following each statement:
(i)L={wε∑* | w has at least one pair of consecutive 0’s}.
(ii)L={wε∑* | w has no pair of consecutive 0’s}.
(iii)L={wε∑* | w is a string with either 1 preceding a 0 or 0 preceding 1}.
(iv)L={wε∑* | w consists of an even number of 0’s followed by odd number of 1’s}.
(51)Prove the formula (00*1)*1=1+0(0+10)*11.
(52)Write a regular expression for e-mail address.
(53)Write a regular expression for identifiers in C language.
(54)At most one pair of consecutive 0’s or one pair of consecutive 1’s
(55)Without any double letter, ∑={0,1}.
(56)Construct finite automata equivalent to the following regular expression:
r=[00+11+(01+10)(00+11)*(01+10]*
(57)L={an bm |n,m>=1, nm>=3}
(58)Obtain a regular expression for strings of a’s and b’s containing not more than three a’s.
(59)L={an bm |n>=4, m<=3}.
(60)Obtain a regular expression to identify an integer.
(61)Discuss the application of regular expression for finding the patterns in text.
(62)Language containing all the words over {0,1} such that some two 0’s are separated by a string whose
length is 4i, i>=0.
(63)All strings of 0’s and 1’s beginning with 1 or 0 and not having two consecutive 0’s.
(64)Set of all stings with at least one 0,1 and 2.
(65)Write regular expressions for ∑={a,b,c}
(i)All strings containing not more than three a’s.
(ii)All strings which contain at least one occurrence of each symbol in ∑.
(iii)All strings which contain no runs of a’s of length greater than two.
(iv)All strings in which all runs of a’s have lengths that are multiples of three.
(66)Determine all strings in L((a+b)*b(a+ab)*) of length less than four.
(67)The set of all strings over{0,1}such that every block of four consecutive symbol contain at least two 0’s.
(68)Construct the minimized DFA for the regular expression ,r=(0+1)*(0+1)10.
(69)Draw an NFA for the regular expression , r=ab*|ab.
(70)Prove (111*)*=(11+111)*.
(71)Describe the language denoted by the regular expression, r=(0+1)*1*(0+1)*.
(72) Find the shortest string that is not in the language represented by the regular expression a*(ab)*b*.
(73) Find a regular expression corresponding to the language L defined recursively as follows:
Basis Clause: ɅεL and aε L .
Inductive Clause: If xε L , then aabx εL and bbxε L .
External Clause: Nothing is in L unless it can be obtained from the above two clauses.
(74) Find a regular expression corresponding to the language L defined recursively as follows:
Basis Clause:ɅεL
Inductive Clause: If xε L , then aabxε L and xbb εL .
External Clause: Nothing is in L unless it can be obtained from the above two clauses.
(75) The language of all 0’s and 1’s having 1 at odd position.
(76) Describe as simply as possible in English the language corresponding to the r.e.=((a+b) 3)*( Ʌ+ a + b ) .

Вам также может понравиться