COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Basic limitations of Finite State Machine
A
It cannot remember arbitrarily large amount of information
B
It cannot remember state transitions
C
It cannot remember grammar for a language
D
It cannot remember language generated from a grammar
Explanation: 

Detailed explanation-1: -What are the basic limitations of finite state machine? Explanation: Because it does to store its previous state of the transition. Explanation: Palindromes cannot be recognized by FSM.

Detailed explanation-2: -Memory in finite automata is present in the form of states Q only and according to automata principal: any automata can have only finite set of states. hence finite automata has finite memory, this is the reason automata for regular language is called finite automata.

Detailed explanation-3: -The transition function defines the movement of an automaton from one state to another by treating the current state and current input symbol as an ordered pair. For each pair of “current state” and “current input symbol” (the function input), the transition function produces as output the next state in the automaton.

Detailed explanation-4: -Palindromes can’t be recognized by any Finite State Automata because: FSA cannot remember arbitrarily large amount of information. FSA cannot deterministically fix the midpoint. Even if the mid-Point is known an FSA cannot find whether the second half of the string matches the first half.

Detailed explanation-5: -The correct choice is (a) It can’t remember arbitrary large amount of information. The explanation: Because there is no memory associated with automata.

There is 1 question to complete.