Assessment 203105305-2

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

Chapter 2 :Finite Automata

Sample – Multiple Choice Question

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

2. The correct representation of language for regular expression r = a+b

a) L = {a,b}
b) L = {a+b}
c) L = {a}
d) L = {b}

3. If r = ф then which one of the following is true

a) r* = €
b) r* = ф
c) r+ = €
d) None of the above

4. If r = ( 0 + €)* then which of the following is true


a) r = 0*
b) r = €
c) Cannot say
d) none of the above

5. if r = (a+b)* then which of the following is true


a) (a* + b*)*
b) (a*. b*)*
c) (b* + a*)*
d) All of the above
6. L1= {xϵ ∑*|x contains even no’s of 0’s}
L2= {xϵ ∑*|x contains odd no’s of 1’s}
No of final states in Language L1 U L2?
a) 1
b) 2
c) 3
d) 4
7. The maximum sum of in degree and out degree over a state in a DFA can be
determined as:∑= {a, b, c, d}
a) 4+4
b) 4+16
c) 4+0
d) Depends on language

8. The sum of minimum and maximum number of final states for a DFA n states is
equal to:
a) n+1
b) n
c) n-1
d) n+2
9. Which of the following options is correct?
Statement 1: Initial State of NFA is Initial State of DFA.
Statement 2: The final state of DFA will be every combination of final state of
NFA.
a) Statement 1 is true and Statement 2 is true
b) Statement 1 is true and Statement 2 is false
c) Statement 1 can be true and Statement 2 is true
d) Statement 1 is false and Statement 2 is also false

10. Given Language: L= { ab U aba }*


If X is the minimum number of states for a DFA and Y is the number of states to
construct the NFA,|X-Y|=?
a) 2
b) 3
c) 4
d) 1
11. If NFA of 6 states excluding the initial state is converted into DFA, maximum
possible number of states for the DFA is ?
a) 64
b) 32
c) 128
d) 127
12. NFA, in its name has ’non-deterministic’ because of :
a) The result is undetermined
b) The choice of path in not deterministic
c) The state to be transited next is not deterministic
d) All of the above
13. Given Language L= {xϵ {a, b}*|x contains aba as its substring}
Find the difference of transitions made in constructing a DFA and an equivalent
NFA?
a) 2
b) 3
c) 4
d) Cannot be determined
14. Number of states require to accept string ends with 101.
a) 3
b) 4
c) 2
d) Can’t be represented

15. 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
16. A language is regular if and only if
a) accepted by DFA
b) accepted by PDA
c) accepted by LBA
d) accepted by Turing machine
17. Regular grammar is
a) context free grammar
b) non context free grammar
c) english grammar
d) none of the mentioned
18. Let the class of language accepted by finite state machine be L1 and the class of
languages represented by regular expressions be L2 then
a) L1<L2
b) L1>=L2
c) L1 U L2
d) L1=L2
Which of the following is true?
a) Every subset of a regular set is regular
b) Every finite subset of non-regular set is regular
c) The union of two non regular set is not regular
d) Infinite union of finite set is regular

19. Regular expressions are closed under


a) Union
b) Intersection
c) Kleen star
d) All of the mentioned

20. Which of the following statement is false?


a) In derivation tree, the label of each leaf node is terminal
b) In derivation tree, the label of all nodes except leaf nodes is a variable
c) In derivation tree, if the root of a sub tree is X then it is called –tree
d) None of the mentioned
Answer d) None of the mentioned
21. Given an arbitrary non-deterministic finite automaton (NFA) with N states, the
maximum number of states in an equivalent minimized DFA is at least.
(a) N^2
(b) 2^N
(c) 2N
(d) N!

Sample – Fill in the Blanks

1. Regular expression is a combination of ____________ .

2. If r = (a + b)* then the language generated by r over alphabet ∑ = {a, b} is called


_________________.
3. Finite state machine is ___________tuple machine.

4. Finite automata needs minimum _______ number of stacks.

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

6. The finite automata is called NFA when there exists____________ for a specific
input from current state to next state

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

8. L={ε, a, aa, aaa, aaaa,........} is represented by ______________

9. The generators of languages are ________________ .

10. No. of states in minimal DFA which accepts string starting with “a” and ending
with “a”.

11. No. of states in minimal DFA which accepts string starting with “a” and ending
with “b”.

12. No. of states in minimal DFA which accepts string starting with “101”.

Sample – Short Questions

1. Every DFA has an equivalent Regular expression. (True/False)

2. What are different regular operator?

3. Write the precedence of regular operator

4. Define DFA.

Keywords: - only one state

5. Define NDFA.

Keywords: - multiple state

6. Define Language in Theory of Automata.

Keywords: - Certain rules

7. What are the steps to be followed in order to construct a DFA?


Answer: - Recognize, Minimum string, DFA design

8. No of states are there in ending with “b” machine?

Answer: - DFA construction

Sample – Long Questions

1. Define Regular expression with its different types.

2. Construct the regular expression that generates all the string of a’s and b’s
where

a. Each string start with a.

b. Each string end with b.

c. Contain a substring ab.

d. The third symbol from left side is a.

3. Give Applications of Finite Automata.


4. Obtain a DFA to accept strings of a’s and b’s starting with the string ab
5. Define NFA. With example explain the extended transition function
6. Obtain DFAs to accept strings of a’s and b’s having exactly one a
7. Prove Theorem of Equivalence between DFA and Regular Expression.
8. What is left linear and right linear grammar?
9. Explain pumping lemma for regular languages.
10. Convert following DFA into LLG and RLG

11. Use Pumping Lemma to show that following language is not regular. L =
{ wwR / w ε {0,1}* }
12. Prove that the language L = {0n: n is a prime number} is not regular.
13. Minimize the following DFAs

You might also like