Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

MCQ (TOC)

1. Finite state machine is ___________tuple machine.

a) 4

b) 5

c) 6

d) Unlimited

Answer: b

2. Transition function of DFA machine maps.

a) Σ x Q -> Σ

b) Q x Q -> Σ

c) Σ x Σ -> Q

d) Q x Σ -> Q

Answer: d

3. Number of states requires accepting string ends with 101.

a) 3

b) 4

c) 2

d) Can’t be represented.

Answer: b

4. A finite automaton needs minimum _______ number of stacks.

a) 0

b) 1

c) 2

d) None of the mentioned

Answer: a

5. Φ in minimal finite automata needs _____________ no. of final states

a) 1

b) 2
c) 3

d) None of the mentioned

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

d) All of the mentioned

Answer: c

7. Which of the following are the examples of finite state machine system?

a) Control Mechanism of an elevator, Traffic Lights

b) Combinational Locks

c) Digital Watches

d) Both a & b

Answer: d

8.Two finite states are equivalent if ?

a) Both are final states

b) Both are non-final states

c) Both have same number of states as well as transitions

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

c) Only two 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

11. Transition function of ε-NFA machine is given by.

a) Σ x Q -> Σ

b) Q x Σ -> Σ

c) Q x Σ U {ε} -> 2 power Q

d) Q x Σ U {ε} -> Q

Answer: c

12. ε-closure of state is combination of self state and ________________

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

14.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

Answer: d

15.Regular expressions are closed under

a) Union

b) Intersection

c) Kleen star

d) All of the mentioned

Answer: d

16.Regular expression {0,1} is equivalent to

a) 0 U 1

b) 0 / 1

c) 0 + 1

d) All of the mentioned

Answer: d

17.Precedence of regular expression in decreasing order is

a) *, . , +

b) . , * , +

c) . , + , *

d) +, a, *

Answer: a

18.Regular expression Φ* is equivalent to

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

(A) All strings containing at least two 1’s

(B) All strings containing at least two 0’s

(C) All strings that begin and end with either 0’s or 1’s

(D) All strings containing the substring 00

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

c) II, III and IV

d) I, III and IV

Answer: a
Question Bank

1. Convert the NFA into DFA

2.Convert the NFA with null moves to DFA

3. Convert the following NDFA machine into DFA.

4. Convert the NFA with null moves to NFA

5. Construct DFA for the expressiona+b*


6. Construct DFA for the expression a*b*
7. Construct DFA for the expression 01(0+1)*
n m
8. Construct DFA for the Expression a b , Where n, m>0 & n<m.
9. What do you mean by FA. Differentiate between DFA and NFA
10. Explain Regular Expression Closure Properties.

You might also like