We have already discussed finite automata. But finite automata can be used to accept only regular languages. A ID is a triple (q, w, α), where: δ( q0, a, Z ) = { ( q0, AZ ) } A. Deterministic finite automata(DFA) and Non-deterministic finite automata(NFA) Solution : Every NFA can be converted into DFA. So, there expressive power is same. As discussed above, every NPDA can’t be converted to DPDA. So, the power of NPDA and DPDA is not same. Hence option (B) is correct.
Pushdown Automata is a finite automata with extra memory called stack which helps Pushdown automata to recognize Context Free Languages.
A Pushdown Automata (PDA) can be defined as :
Instantaneous Description (ID)
Instantaneous Description (ID) is an informal notation of how a PDA “computes” a input string and make a decision that string is accepted or rejected.
1. q is the current state.
2. w is the remaining input.
3.α is the stack contents, top at the left.
Turnstile notation
⊢ sign is called a “turnstile notation” and represents
one move.
⊢* sign represents a sequence of moves.
Eg- (p, b, T) ⊢ (q, w, α)
This implies that while taking a transition from state p to state q, the input symbol ‘b’ is consumed, and the top of the stack ‘T’ is replaced by a new string ‘α’
Example : Define the pushdown automata for language {anbn | n > 0}
Solution : M = where Q = { q0, q1 } and Σ = { a, b } and Γ = { A, Z } and δ is given by :
δ( q0, a, A) = { ( q0, AA ) }
δ( q0, b, A) = { ( q1, ∈) }
δ( q1, b, A) = { ( q1, ∈) }
δ( q1, ∈, Z) = { ( q1, ∈) }
Let us see how this automata works for aaabbb.
Explanation : Initially, the state of automata is q0 and symbol on stack is Z and the input is aaabbb as shown in row 1. On reading ‘a’ (shown in bold in row 2), the state will remain q0 and it will push symbol A on stack. On next ‘a’ (shown in row 3), it will push another symbol A on stack. After reading 3 a’s, the stack will be AAAZ with A on the top. After reading ‘b’ (as shown in row 5), it will pop A and move to state q1 and stack will be AAZ. When all b’s are read, the state will be q1 and stack will be Z. In row 8, on input symbol ‘∈’ and Z on stack, it will pop Z and stack will be empty. This type of acceptance is known as acceptance by empty stack.
Note :
Question : Which of the following pairs have DIFFERENT expressive power?
B. Deterministic push down automata(DPDA)and Non-deterministic push down automata(NPDA)
C. Deterministic single-tape Turing machine and Non-deterministic single-tape Turing machine
D. Single-tape Turing machine and multi-tape Turing machine
This article has been contributed by Sonal Tuteja.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
DSA Self Paced Course
View Details



