PDAtyped-1.docx - (1(i(ii(iii(iv(2(i Notes on PDA and...

This preview shows page 1 - 2 out of 3 pages.

Notes on PDA and Examples of PDA’s for Various Languages (1) Examples of PDA, strings it accepts and then determine the language accepted by it (a) s= initial state, f = final state, ∑ = (a,b). Transition rules (s,a,λ) → (s,a); (s,b,a)→(f,λ); (f,b,a)→(f,λ); (f,a,a)→(f,λ). Note that this PDA in state s when reads a pushes it on the stack and if it reads b when there is an a on the stack, it removes a from the stack. In the f state if it reads b and if there is an a on the stack, a is removed. Finally, in state f, if it reads a and there is an a on the stack it removes a. Please note that (s,a,λ) rule will also apply if there is an a or b on the stack because above these characters there is an empty space. This convention is used by some authors while others do not use. (i) (s,aaabba,λ)→ (s,aabba,a) )→ (s,abba,aa) )→ (s,bba,aaa) )→ (f,ba,aa) )→ (f,a,a)→(f,λ,λ) : Accepted (ii) (s,abbaaa,λ)→ (s,bbaaa,a) )→ (f,baaa,λ) No transition is available. Not accepted (iii) (s,aabba,λ)→ (s,abba,a) )→ (s,bba,aa) → (f,ba,λ) → (f,a,λ) No transition is available. Not accepted (iv) (s,aaaababa,λ)→ (s,aaababa,a)→ (s,aababa,aa)→ (s,ababa,aaa)→ (s,baba,aaaa)→ (f,aba,aaa)→ )→ (f,ba,aa)→ (f,a,a)→( (f,λ,λ) : Accepted The language of PDA is {a n bw|w €{a,b}*. |w| = n-1, n = 1, 2, …} (2) Another Examples of PDA, strings it accepts and then determine the language accepted by it. Here there are two transitions for the left side (Non-deterministic PDA) s= initial state, f = final state, ∑ = (a,b,c). Transition rules (s,a,λ) → (s,c); (s,b,λ)→ (s,c); (s,b,λ)→ (f,λ); (s,a, c)→(f,λ); (f,b,c)→(f,λ) (i) (s,aababaaab,λ)→ (s,ababaaab,c)→ (s,babaaab,cc)→ ( s,abaaab,ccc)→ ( s,baaab,cccc) ( f,aaab,cccc)→ ( f,aab,ccc)→ ( f,ab,cc)→ ( f,b,c)→(f,λ,λ) : Accepted (ii)
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Fall '15
  • Narendragoel

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern