Question: Would someone mind checking the solutions I got for this problem? I feel like I did it right but the question posed indicates that only
Would someone mind checking the solutions I got for this problem? I feel like I did it right but the question posed indicates that only PDA should accept the string abbaab, yet I alway compute it so that both end up accepting it. Please let me know where I messed up if I did it wrong. For the PDA shown in Fig. 1 and Fig. 2, which one would accept the language {L=x{a, b}* | Na(x)=Nb(x)} by empty stack? Use the execution of the stringabbaabto justify your answer.For the PDA shown in Fig. 1 and Fig. 2, which one would accept the language {L=x{a, b}* | Na(x)=Nb(x)} by empty stack? Use the execution of the stringabbaabto justify your answer.


For the PDA shown in Fig. 1 and Fig. 2, which one would accept the language L (x E a, by INa (x)V(x) by empty stack? Use the execution of the string abbaak to justify your answer. (10 points) Fig. 1 Fig. 2 Sol. For the PDA in Figure 1, we have For the PDA in Figure 2, we have (0, abbaab, X) (0, abbaah, X) (o, bbaah, a)X) (0, Baab, X) (0, aab, bx) (o, bbaah, a)X) (o, b, ax (o, b, ax) (o, A, X 1, A,A 2,A,A puska) push(a) ,aa, b pop pop pop 0 Start puskb) a,X pop b, b pushkb) pushapuskb) nop pop nop pop Fig. 1 axaa a,b push a push(a) pop Start nop pop b,Xb,b b, a push(b) push(b) pop Fig. 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
