Implementing Ideas with PDAs and FSAs: Worksheet - Prof. Eric Torng, Study notes of Computer Science

This worksheet provides exercises on implementing ideas using finite state automata (fsa) and pushdown automata (pda). The exercises involve defining next states, stack updates, and constructing the automata for given inputs and states. The worksheet also includes take-home review questions to test understanding.

Typology: Study notes

Pre 2010

Uploaded on 07/23/2009

koofers-user-6q5-1
koofers-user-6q5-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Module 35 Worksheet
In Class Questions
1) (S8) Specify how we implemented this idea with FSA’s.
M1 = (Q1, , q1, A1, 1)
M2 = (Q2, , q2, A2, 2)
M3 = (Q3, , q3, A3, 3) where
Q3 =
q3 =
A3 =
3((p,q), a) =
2) (S10) Try and implement this idea with PDA’s
M1 = (Q1, , 1, Z1, q1, A1, 1)
M2 = (Q2, , 2, Z2, q2, A2, 2)
M3 = (Q3, , 3, Z3, q3, A3, 3) where
Convenient notation:
Let “S(q,a,A)” be the “next state” component of
Let “U(q,a,A)” be the “stack update” component of
That is, if 1(q,a,A) = (p, ABC) then
S1(q,a,A) = p
U1(q,a,A) = ABC
Q3 =
q3 =
A3 =
3 = 1 x 2 where x is the cartesian product operator
Z3 =
3:
Current State Input Top Stack Next State Stack Update
(p, q) a (A,B)
pf2

Partial preview of the text

Download Implementing Ideas with PDAs and FSAs: Worksheet - Prof. Eric Torng and more Study notes Computer Science in PDF only on Docsity!

Module 35 Worksheet In Class Questions

  1. (S8) Specify how we implemented this idea with FSA’s. M 1 = (Q 1 , , q 1 , A 1 ,  1 ) M 2 = (Q 2 , , q 2 , A 2 ,  2 ) M 3 = (Q 3 , , q 3 , A 3 ,  3 ) where Q 3 = q 3 = A 3 =  3 ((p,q), a) =
  2. (S10) Try and implement this idea with PDA’s M 1 = (Q 1 , ,  1 , Z 1 , q 1 , A 1 ,  1 ) M 2 = (Q 2 , ,  2 , Z 2 , q 2 , A 2 ,  2 ) M 3 = (Q 3 , ,  3 , Z 3 , q 3 , A 3 ,  3 ) where Convenient notation: Let “S(q,a,A)” be the “next state” component of  Let “U(q,a,A)” be the “stack update” component of  That is, if  1 (q,a,A) = (p, ABC) then S 1 (q,a,A) = p U 1 (q,a,A) = ABC Q 3 = q 3 = A 3 =  3 =  1 x  2 where x is the cartesian product operator Z 3 =  3 : Current State Input Top Stack Next State Stack Update (p, q) a (A,B)
  1. (S12) What if the inputs are 1 PDA and 1 FSA? M 1 = (Q 1 , , q 1 , A 1 ,  1 ) M 2 = (Q 2 , ,  2 , Z 2 , q 2 , A 2 ,  2 ) M 3 = (Q 3 , ,  3 , Z 3 , q 3 , A 3 ,  3 ) where Convenient notation: Let “S(q,a,A)” be the “next state” component of  Let “U(q,a,A)” be the “stack update” component of  That is, if  1 (q,a,A) = (p, ABC) then S 1 (q,a,A) = p U 1 (q,a,A) = ABC Q 3 = q 3 = A 3 =  3 = Z 3 =  3 : Current State Input Top Stack Next State Stack Update (p, q) a A
  2. (S12) What result can we prove using the above construction? Take home review questions
  3. Did we prove that CFL’s are not closed under set intersection?
  4. What result did we prove?
  5. What was the problem with combining two PDA’s?