COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A PDA chooses the next move based on
A
Current state
B
Next input symbol
C
Both (a) and (b)
D
None of these
Explanation: 

Detailed explanation-1: -Explanation: A PDA is a finite machine which has an additional stack storage. Its transitions are based not only on input and the correct state but also on the stack.

Detailed explanation-2: -Usually denotes the stack alphabet.-In case of a pushdown automaton, the transition function depends on, (i) the current state, (ii) the currently read input symbol (can be ), and (iii) the currently read stack symbol at the top of the stack (again it can be ).

Detailed explanation-3: -PDA is more powerful than (A) Turing machine (B) Multi tape Turing machine (C) Finite automata (D) All of these Answer : C Explanation: A PDA is more powerful than FA. Any language which can be acceptable by FA can also be acceptable by PDA. PDA also accepts a class of language which even cannot be accepted by FA.

Detailed explanation-4: -7. Which of the following can be accepted by a DPDA? Explanation: Theorem: The language pal of palindromes over the alphabet 0, 1 cannot be accepted by any finite automaton, and it is therefore not regular. Explanation:The possible change in the stack contents is a change in the number of A’s on the stack.

There is 1 question to complete.