Standard PDA Extended PDA

Document Sample
Standard PDA Extended PDA Powered By Docstoc
					CSC445, Quiz #2 on PDA’s
Instructor: Dr. Hasmik Gharibyan

Name________________________________________Score ______________
                                                                      Total points 15 (1 point each).


1) (0.5 point)Give the sets from where the values of arguments of the transition function  of a
standard PDA M = (Q, , , , q0, F) are taken (list the sets in the order of arguments)
                Q, {}, {}

2)(0.5 point)The result of the transition function  of a standard PDA M=(Q, , , , q0, F) is an
element of the set    P (Q  ({}) )

3) (0.5 point) Give the starting machine configuration of the PDA M = (Q, , , , q0, F) with
an input string w*. [q0 , w,  ]

4) (0.5 point) Give the machine configuration of the PDA M = (Q, , , , q0, F) after
successful computation of the input string wL(M). (if you use any element other than , also
give the set to whom the element belongs): [qf , ,  ], where qf F


Picture: Diagram of a PDA            M = (Q, , , , q0, F)

M:             a  /                  b /A
          q0             /A   q1

5) Given the PDA M in the picture.

 a) Define the transition depicted by the loop on q1 (i.e. the arc going from node q1 back to q1)
    in the picture:
                            (q1, b,  ) = ___{[ q1, A ]}____

 b) Let the PDA in the picture is specified by the machine configuration [q1, baa, AA] at a
    particular moment. Define the machine configuration of M after one step of computation is
    performed (look at the state diagram of the machine):
                            [q1, baa, AA] ├ __ [q1, aa, AAA] ___

 c) Are the two transitions depicted in the picture by the two arcs starting in q0 compatible?
    (yes/no)      yes

 d) Specify the language of the PDA in the picture, if acceptance is standard: by final
    state and empty stack. (You can give the implicit definition of the set or, if possible, a
    regular expression):
                                               L (M) =____

 e) Specify the language of the PDA in the picture, if acceptance is by final state.
    (You can give the implicit definition of the set or, if possible, a regular expression):

                                                 LF (M) =      {aibj | i,j0} // or a*b*
   f) Specify the language of the PDA in the picture, if acceptance is by empty stack.
   (You can give the implicit definition of the set or, if possible, a regular expression):

                                                 LE (M) = {ai | i >0} // or a+

6) Given the following piece of diagram of a standard PDA. Give the equivalent piece (using two
nodes only) of diagram for an extended PDA :

              Standard PDA:                                      Extended PDA:

                                                              b /AA
b /A     /A
          a A/       A/         A/                              a AAA/


7) Given the following piece of diagram of a standard PDA. Give the equivalent piece of diagram
for an atomic PDA:

        Standard PDA:                                      Atomic PDA:
         a /A
               b A/                               /A    a  /
                                                            b  /         A/

8) For any regular language L there is a Push-Down Automaton (PDA) M such that
   L(M) = L. (true/false)     true

9) There is a language that can be accepted by a PDA but cannot be accepted by a finite
   state automaton (DFA, NFA, NFA-). (true/false) true

10) (1 point: 0.5 point each) Given two context-free languages: L1 and L2.

   a) Is the language L=(L1L2)* context-free ?(yes/no/not necessarily)_not necessarily_

   b) Is the language L = (L1L2) context-free?(yes/no/not necessarily) _not necessarily_

11) (2 points: 0.5 points each) Given a context-free language L. According to Pumping
  Lemma for context-free languages, there is a number k depending on L, such that any
  string zL , with length(z)k , can be decomposed into five parts z = uvwxy etc.

  a) Is it possible that k=0 (yes/no) ?____no_______

  b) Is it possible that v and x both are  (yes/no)?___no_______

  c) Let’s say z = abkc. Can v substring contain the a and x substring contain the c?
  (yes/no)__no____

  d) Is the string z’ = uwy a string of the language L (yes/no)?___yes___//0 time pumping

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:4
posted:8/26/2011
language:Danish
pages:2