MCQ Computer Science

Compilers Questions and Answers – Transformation from NFA to DFA

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Transformation from NFA to DFA ”.

 

  1. Can a DFA simulate NDFA

a) No

b) Yes

c) Sometimes

d) Depends on NDFA

Answer

 

Answer: b

Explanation: Yes it can be done through power set construction.

2. Find the wrong statement?

a) The language accepted by finite automata are the languages denoted by regular expression

b) Every DFA has a regular expression denoting its language

c) For a regular expression r, there does not exists NDFA with L® ant transit that accept

d) None of the mentioned

Answer

 

Answer: c

Explanation: The vice versa is true.

3. Regular expression a/b denotes the set

a) {a}

b) {€,a,b}

c) {a,b}

d) {ab}

Answer

 

Answer: c

Explanation: Either a is the output or b hence it’s {a, b}.

4. The behaviour of a NFA can be stimulated by DFA

a) Always

b) Sometimes

c) Never

d) Depends on NFA

Answer

 

Answer: a

Explanation: It can be done through power set construction.

5. For any DFA state {qi,qj…qm} If some qj is a final state in the NFA Then {qi,qj…qm}, is a final state in the DFA.True or False

a) True

b) False

Answer

 

Answer: a

Explanation: It the the standard procedure to convert NFA to DFA.

6. The relation between NFA-accepted languages and DFA accepted languages is

a) >

b) <

c) =

d) <=

Answer

 

Answer: c

Explanation: The no of languages accepted by NFA and DFA is equal.

7. In regular expressions, the operator ‘*’ stands for

a) Concatenation

b) Selection

c) Iteration

d) Addition

Answer

 

Answer: c

Explanation: It indicates iterations which can vary from zero to any number.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button