Welcome! Log In Create A New Profile

Advanced

2006 Q6

Posted by Rey 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Rey
2006 Q6
October 29, 2010 08:36AM
Question 6 (2006)
i)
1) So read all a's, for every a read, push X onto stack 1. If not a is read n < 1 the 2PDA will crash.
2) After all a's are read/ First b is found (n = stack 1), push 3 more X's onto stack 1 (n+3)
3) For each a that is now read, pop an X from stack 1 and push a Y onto stack 2
4) When stack 1 is empty pop 4 Y's from stack 2 ((stack 1) - 3 - 1)
5) Read all your b's, popping a Y from stack 2 till /\ (stack 2 = empty). If you don't read an b or insufficient b's (n-1) the the 2PDA will crash
6) Read /\ from the tape (tape finished). If tape not empty crash.
7) Accept

ii)
Yes. TM = nPDA and nPDA = 2PDA. The above example is accepted by a 2PDA therefore a Turing Machine, therefore a 3PDA (nPDA)

iii)
Yes. 2PDA = nPDA = TM. (This seems a bit short)

iv)
No. As PDA < nPDA = TM. PDA only accept context-free languages, and this is a non-context free language


YES/NO
Re: 2006 Q6
October 30, 2010 08:50PM
Agreed on all above.
Sorry, only registered users may post in this forum.

Click here to login