computation theory PDA
This exercise re-visits the different acceptance criteria of PDAs. First, we define two languages:
• L1 = {wE {0, 1}* : (the number of 1s in w) > (the number of Os in w)}
= {W E {0,1}* : (the number of Os in w) > (the number of 1s in w)}
Recall the two notions of PDA language acceptance from lectures:
Let P= (Q,E, I, 8, 9o, Zo, F) be PDA. The language accepted by P by final states is
L(P) ={WES°: (00,4, 20) & (9. 6, a) for some g E F, a EP)
The language accepted by P by empty(ing its) stack is
(N(P) = fINES°: (90.1, 20) E (9.6,0) for some g E Q).
1. Design a PDA which accepts L by final states, but accepts L2 by empty stack. That is, design a
PDA P such that L(P) = Li and N(P) = La. You do not need to prove that your PDA accepts
those languages, but you should provide some reasonable justification. (This might also help you
double-checking that your claim is actually true.)
2. Provide the trace(s) (i.e., sequence of configurations/IDs) of your PDA:
on the input 0101 and 10100, for each of those in both variants, i.e., accepting by stack and
accepting by final state. So four traces in total. Make clear at the end whether the trace ends
in acceptance or not. Important: If there exisists an accepting trace, i.e., the word
lies in the respective language, then you have to provide an accepting trace.
Please put each configuration/ID into an individual line. (That should simplify marking.)