TOC Assignment 3
TOC Assignment 3
Assignment-III
7. If the initial ID of the pda A is (q0 , aacaa, Z0 ).what is the ID after processing of aacaa?If the input string
is (i)abcba, (ii)abcb, (iii)acba, (iv)abac, (v)abab,will A process the entire string?If,so what will be the final
ID?
A = ({q0 , q1 , qf }, {a, b, c}, {a, b, Z0 }, δ, q0 , Z0 , F )
where δ is defined as:
1
Present State Tape Symbol
b 0 1
→ q1 1Lq2 0Rq1
q2 bRq3 0Lq2 1Lq2
q3 bRq4 bRq5
q4 0Rq5 0Rq4 1Rq4
q5 0Lq2
10. Construct the computation sequence for strings 1213, 2133, 312 for the Turing machine given below:
Present State Input Tape Symbol
1 2 3 b
→ q1 bRq2 bRq1
q2 1Rq2 bRq3 bRq2
q3 2Rq3 bRq4 bRq3
q4 3Lq5 bLq7
q5 1Lq6 2Lq5 bLq5
q6 1Lq6 bRq1
q7