MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the operations are eligible in PDA?
A
Push
B
Delete
C
Insert
D
Pop
Explanation: 

Detailed explanation-1: -Which of the operations are eligible in PDA? Explanation: Push and pop are the operations we perform to operate a stack. A stack follows the LIFO principle, which states its rule as: Last In First Out.

Detailed explanation-2: -A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations pop, push, and nop. PDAs always start with one designated symbol on the stack. A state transition depends on the input symbol and the top of the stack. The machine then performs a stack operation and enters the next state.

Detailed explanation-3: -So a stack supports two basic operations: push and pop. Some stacks also provide additional operations: size (the number of data elements currently on the stack) and peek (look at the top element without removing it).

Detailed explanation-4: -In Pushdown automata the stack head always scans the top symbol of the stack. It performs two basic operations. Push Operations: Push operations add a new symbol from the stack symbol ‘’ at the top of the stack. Pop Operations: Pop operations remove the top symbol from the stack.

Detailed explanation-5: -Explanation: All regular languages can be accepted by a non deterministic finite automata and all context free languages can be accepted by a non deterministic push down automata.

There is 1 question to complete.