Professional Documents
Culture Documents
TOC (CS-501) Question Bank AND MCQ
TOC (CS-501) Question Bank AND MCQ
a) 4
b) 5
c) 6
d) Unlimited
Answer: b
a) Σ x Q -> Σ
b) Q x Q -> Σ
c) Σ x Σ -> Q
d) Q x Σ -> Q
Answer: d
a) 3
b) 4
c) 2
d) Can’t be represented.
Answer: b
a) 0
b) 1
c) 2
Answer: a
a) 1
b) 2
c) 3
Answer: d
6. Regular expression for all strings starts with ab and ends with ba is.
a) aba*b*ba
b) ab(ab)*ba
c) ab (a+b)*ba
Answer: c
7. Which of the following are the examples of finite state machine system?
b) Combinational Locks
c) Digital Watches
d) Both a & b
Answer: d
d) Both a & b
Answer: d
9. The finite automata is called NFA when there exists____________ for a specific input from current
state to next state
a) Single path
b) Multiple paths
d) None
Answer: b
10.Transition function of NFA machine is given by.
a) Σ x Q -> Σ
b) Q x Σ -> Σ
c) Q x Σ -> Q
d) Q x Σ -> 2 power Q
Answer: d
a) Σ x Q -> Σ
b) Q x Σ -> Σ
d) Q x Σ U {ε} -> Q
Answer: c
a) ε-reachable state
b) Initial state
c) Final state
d) All
Answer: a
13. How many strings of length less than 4 contains the language described by the regular expression
(x+y)*y (a+ab)*?
a) 7
b) 10
c) 12
d) 11
Answer: c
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)*
Answer: d
a) Union
b) Intersection
c) Kleen star
Answer: d
a) 0 U 1
b) 0 / 1
c) 0 + 1
Answer: d
a) *, . , +
b) . , * , +
c) . , + , *
d) +, a, *
Answer: a
a) ϵ
b) Φ
c) 0
d) 1
Answer: a
19. The language described by the regular expression (0+1)*0(0+1)*0(0+1)* over the alphabet {0 1} is
the set of
(C) All strings that begin and end with either 0’s or 1’s
Answer: b
20.W is any string whose length is n in {0, 1}* and L is the set of all sub-strings of W. The minimum
number of states in a non-deterministic finite automaton that accepts L is
a) n
b) 2n
c) n + 1
d) n - 1
Answer: c
21. Consider the language L = {W I W ∈ {0, 1}*, where 0’s and 1’s in W are divisible by 3 and 5
respectively. The minimum state deterministic finite automaton accepting the language L has
a) 15
b) 10
c) 5
d) 8
Answer: a
22. Let n be the length of a character string. How many substrings (of all lengths inclusive) can be
formed from n?
a) n(n-1)/2
b) n²
c) (n (n+1)/2) + 1
d) n
Answer: c
23. Consider the four regular expressions given below; a. (00)*( ε+0) b. (00)* c. 0* d. 0(00)* The
equivalent regular expression out of the four is
a) b and c
b) c and d
c) a and b
d) a and c
Answer: d
24. L1 = Φ and L2 = {a} are the two languages. Out of the following four options the one that represents
L1L2* U L1* is
a) Φ
b) a*
c) {ε}
d) {ε, a}
Answer: c
25.We have the language L = {ab, aa, baa} and the four strings given below: I) abaabaaabaa
II) aaaabaaaa III) baaaaabaaaab IV) baaaaabaa The strings present in L* are
a) I, II and IV
b) I, II and III
d) I, III and IV
Answer: a
Question Bank