At QB
At QB
-------------------------------------------------------------------------------------
Theory Questions
5. What is regular expression and regular language? Write a regular expression for:
i) The string over {a,b} with an even number of a’s?
ii) String over {a,b} in the infinite sequence:
aba,a5 ,(aba)a6,a11,aba13,a17,….?
iii) The language of C identifiers
0 0 1
A ^ B ^
D
19. Define NFA. Write recursive definition of extended transition function δ* for NFA-˄.
20. Convert the following NFA to DFA
MCQs
1. Which of the following is true?
a) (01)*0 = 0(10)*
b) (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
c) (0+1)*01(0+1)*+1*0* = (0+1)*
d) All of the mentioned
a) (0+1)*001(0+1)*
b) 1*001(0+1)*
c) (01)*(0+0+1)(01)*
d) None of the mentioned
11. If L1 and L2 are regular languages, which among the following is an exception?
a) L1 U L2
b) L1 – L2
c) L1 ∩ L2
d) All of the mentioned
17. For NFA with ε-moves, which among the following is correct?
a) δ: Q X (∑ U {^}) -> 2Q
b) δ: Q X (∑) -> 2Q
c) δ: Q X (∑*) -> 2Q
d) All of the mentioned
18. The automaton which allows transformation to a new state without consuming any input
symbols:
a) NFA
b) DFA
c) NFA-^
d) All of the mentioned
23. For a machine to surpass all the letters of alphabet excluding vowels, how many number of
states in DFA would be required?
a) 3
b) 2
c) 22
d) 27
24. What is the Regular Expression Matching Zero or More Specific Characters
a) x
b) #
c) *
d) &
a) {q0}
b) {q1} U {q0, q1, q2}
c) {q2, q1}
d) {q3, q1, q2, q0}
29. (0+^) (1+^) represents
a) {0, 1, 01, ^}
b) {0, 1, ^}
c) {0, 1, 01 ,11, 00, 10, ^}
d) {0, 1}
30. A ________ is a sequence of statements which are either givens or deductions from
previous statements, and whose last statement is the conclusion to be proved.
a) Statement
b) Direct proof
c) Indirect proof
d) None of the above
32. Minimum number of states of DFA requires to accept string ends with 10.
a) 3
b) 2
c) 1
d) can’t be represented.
33. Which of the following is correct RE of language having string start with 00
a) 00(0+1)*
b) (0+1)*00
c) (0+1)*00(0+1)*
d) None of the mentioned
34. Which of the following string does not belongs to the language having 0 immediately
followed by 11.
a) 01
b) 1011
c) 0011
d) 011011
35. DFA of which of the following language generates an Invalid or dead state.
a) Starting with 00
b) Exactly two 0
c) Having length 4
d) All of these
36. How many states at minimum need to be formed to design DFA of language containing
substring bb?
a) 2
b) 1
c) 3
d) 4
38. DFA of Which of the following language is having initial state as accepting state
a) even number of 0
b) not end with 10
c) maximum length 6
d) All of these
41. The minimum number of productions required to produce a language consisting of odd
length palindrome strings over ∑={a,b} is
a) 3
b) 4
c) 5
d) 6
45. If a grammar generates more than one derivation tree of at least one string then the grammar
is called as _________
a) Regular Grammar
b) Context Free Grammar
c) Ambiguous Grammar
d) None of these
54. Which of the following type of languages can Turing Machine recognize
a) Regular
b) Context Free
c) Non Context Free
d) All of these