Finite Automata and Regular Expression

This set of MCQs helps students to learn about finite automata and regular expression, which are used for the designing of lexical analysis of a compiler. and for recognizing the pattern using regular expressions, also for the designing of the combination and sequential circuits using Mealy and Moore Machines

Start Quiz

A language L from a grammar G = { VN, Σ, P, S} is?

Set of symbols over VN Set of symbols over Σ Set of symbols over P Set of symbols over S

Maximum number of states of a DFA converted from an NFA with nstates is?

n n2 2n None of the mentioned

What is the transitional function of a DFA?

Q X Σ→Q Q X Σ→2Q Q X Σ→2n Q X Σ→Qn

What is the transitional function of an NFA?

Q X Σ→Q Q X Σ→2Q Q X Σ→2n Q X Σ→Qn

What are the basic limitations of finite state machine?

It cannot remember arbitrarily large amount of information In cannot remember state transitions In cannot remember grammar for a language It cannot remember language generated from a grammar

Which of the following statement is true for Dead State?

It cannot be reached anytime There is no necessity of the state If control enters no way to come out from the state If control enters FA deads

Which of the following statement is true for Moore Machine?

Output depends on present state Output depends on present input Output depends on present state and present input Output depends on present state and past input

Which of the following statement is true for Mealy Machine?

Output depends on present state Output depends on present input Output depends on present state and present input Output depends on present state and past input

Which is true for in accessible state?

It cannot be reached anytime There is no necessity of the state If control enters no way to come out from the state If control enters FA deads

What is another name for Lexical Analyser?

Linear Phase Linear Analysis Scanning All of the mentioned

Lexical Analyser’s Output is given to Syntax Analysis.

True False

Which phase of the compiler is Lexical Analyser?

First Second Third None of the mentioned

In Mealy Machine O/P is associated with ____________.

Present state

Next state

Input

None of the mentioned

In a compiler the module that checks every character of the source text is called __________.

The code generator

The code optimizer

The lexical analyzer

The syntax analyzer

The context free grammar is ambiguous if ______________.

The grammar contains non-terminals

Produces more than one parse tree

Production has two non-terminals side by side

None of the mentioned

Quiz/Test Summary
Title: Finite Automata and Regular Expression
Questions: 15
Contributed by:
Steve