Beruflich Dokumente
Kultur Dokumente
______________________________________________________________________________
INSTRUCTIONS: Attempt all the 25 questions. Each question carry two marks.
3. Which of the following Regular expression generates the same language as the one recognized by this NFA
S0 0 S1 S3 1 S4
0
0
0
S2
4. How many distinct string are there in the language of the regular expression?
0 1 0 1 0 1 0 1
(a) 31 (b) 64 (c) 81 (d) 32
5. What is the number of states the minium NFA has for a(bc)*d
(a) 3 (b) 4 (c) 5 (d) 2
6. The language of the regular expression (abab)* is equivalent to which of the following regular expression.
(I) aba baba b +λ
*
(II) ab abab *ab +λ
(III) a ba *b +λ (IV) ab *
(a) I, II, III (b) I, II (c) II, III, IV (d) All of these
L= 011, 001111 0 n 12 n | n 1, 2 is
(a) 9 (b) 10 (c) 7 (d) 8
H.O.: 28-A/11, Jia Sarai, Near-IIT, New Delhi-16 , Ph : 011-26851008, 26861009 www.careerendeavour.com
B.O.: 16, 3rd Floor, Mall road, G.T.B. Nagar (Metro Gate No. 3), Delhi-110 009, Ph: 011-65462244, 9540292991
2
9. An NFA has 10 states out of which 3 are final states maximum number of final states in its equivalent DFA is:
(a) 895 (b) 894 (c) 896 (d) 897
b a
Dead
a,b
(a) a mb n | m 0, n 0 (b) a mb n | m 0, n 1
(c) a mb n | m 1, n 0 (d) a mb n | m 1, n 1
11. Infinite languages are
(a) All regular languages (b) All non-regular languages
(c) Some are regular olanguages (d) None of these
a
b
A b B b C
a a a a a a
D b E b F
b
Which of the following is TRUE for above FA
(a) M3 = M1 – M2 (b) M3 = M2– M1 (c) M3 = M1 M2 (d) M3 = M1 M2
13. The regular exp for the set strings that consists of alternating 0’s and 1’s
* * * * * * * *
(a) 01 10 0 10 1 01 (b) 01 10 1 01 0 10
*
(c) 1 01 0 (d) both (a) and (c)
H.O.: 28-A/11, Jia Sarai, Near-IIT, New Delhi-16 , Ph : 011-26851008, 26861009 www.careerendeavour.com
B.O.: 16, 3rd Floor, Mall road, G.T.B. Nagar (Metro Gate No. 3), Delhi-110 009, Ph: 011-65462244, 9540292991
3
14. The grammar with the productions
S aA / bB , B b, A
belongs to
(a) Regular grammar (b) Context free grammar
(c) Regular and context free grammar (d) Context sensitive grammar
17. Consider a DFA having n states out of which it has f final states. The above DFA accepts the language L
then the DFA accepting L has how many final states.
(a) f (b) n (c) n–f (d) f–n
18. If the mealy Machine has p states and its is defined over with q then the maximum number of states
in its equivalent moore machine is:
(a) p–q (b) pq (c) p+q (d) p/q
19. Let L1 = set of all strings whose nth symbol from begining is 1.
L2 = set of all string whose nth symbol from the last.
The number of states in DFA accepting the language L1 and L2 is:
n n 1 n
(a) n2 2 (b) n 2 2 n (c) 2n 2 (d) 2 n 2
*
(II) a b b a ab *
(III) All linear grammers are regular grammar.
(IV) The DFA accepting the language
*
L a, b | mod 50 15 has 35 final states.
(a) I, II, III (b) I, II, IV (c) I, II, III, IV (d) None of these
H.O.: 28-A/11, Jia Sarai, Near-IIT, New Delhi-16 , Ph : 011-26851008, 26861009 www.careerendeavour.com
B.O.: 16, 3rd Floor, Mall road, G.T.B. Nagar (Metro Gate No. 3), Delhi-110 009, Ph: 011-65462244, 9540292991
4
q1 b q2
a a
a b
q0 b q6 q3
b
b a
a a
q5 q4
b
a b
q0 q1 , R q1 , L
q1 q0 , L q3 , R
q2 q1 , L q2 , R
The languages accepted by above 2-way DFA is
23. The number of state of a minimum state DFA which accept the set of all strings over a, b, c having
substring abc that occurs an even number of times
(a) 3 (b) 4 (c) 5 (d) 6
(a) abc n
| n 1 (b) a n b n c n | n 1
(c) a n b n c m | m, n 1 (d) a mb n c p | m 1, p 1, n 1
H.O.: 28-A/11, Jia Sarai, Near-IIT, New Delhi-16 , Ph : 011-26851008, 26861009 www.careerendeavour.com
B.O.: 16, 3rd Floor, Mall road, G.T.B. Nagar (Metro Gate No. 3), Delhi-110 009, Ph: 011-65462244, 9540292991
5
[ANSWER KEY]
H.O.: 28-A/11, Jia Sarai, Near-IIT, New Delhi-16 , Ph : 011-26851008, 26861009 www.careerendeavour.com
B.O.: 16, 3rd Floor, Mall road, G.T.B. Nagar (Metro Gate No. 3), Delhi-110 009, Ph: 011-65462244, 9540292991