Welcome! Log In Create A New Profile


Oct 2006 Exam Question 2.

Posted by ian.coetzer 
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
Oct 2006 Exam Question 2.
November 02, 2009 01:34AM
Okay, my attempt at the deterministic PDA, please take a look and let me know if you agree with this solution.

2006 2.

*** Question 2 ***

(if you experience any problems with these links then please let me know! so that I can fix them)
avatar Re: Oct 2006 Exam Question 2.
November 02, 2009 10:12AM
Looks good to me.
Pretty much the same as mine.

*Edit* Just one question: Do we have to cater for reading/popping something unexpected (like say a /\) and moving to a reject state?
I just noticed that you didn't do that, it would save a lot of time if it's not required.
Re: Oct 2006 Exam Question 2.
November 02, 2009 01:40PM
If a state in a PDA has no edge leading from it that can read a character that is on the TAPE (from a READ) or in the STACK (from a POP) then the word is rejected.
avatar Re: Oct 2006 Exam Question 2.
November 03, 2009 10:20AM
You need to read an /\ after reading the last a (in addition to popping an /\). Otherwise your PDA accepts (ac)n(bc)na(a+b)*.

"A man is the less likely to become great the more he is dominated by reason: few can achieve greatness - and none in art - if they are not dominated by illusion." Mr. Doctor
Re: Oct 2006 Exam Question 2.
November 03, 2009 10:36AM
Great! thanks for spotting that error would have cost me a point or two!
Will have to remember that in the exams, I do sometimes assum that the machine knows that the next Read will result in an empty / null character being red.
But we have to force the machine to carry on reading since it cannot predict what the next character will be and that it IS in fact at the end of the tape!

Here is my correct (ignore the funny block in the Start state)

*** Question 2 ***
Sorry, only registered users may post in this forum.

Click here to login