P. 1
23084817 Lecture 18 Pushdown Automata Examples

23084817 Lecture 18 Pushdown Automata Examples

|Views: 248|Likes:

More info:

Published by: Himanshu Sekhar Satpathy on Dec 20, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/14/2015

pdf

text

original

Pushdown Automata Examples Robb T.

Koether Homework Review Examples of PDAs Assignment

Pushdown Automata - Examples
Lecture 18 Section 2.2 Robb T. Koether
Hampden-Sydney College

Mon, Oct 6, 2008

Outline Pushdown Automata Examples Robb T. Koether Homework Review Examples of PDAs Assignment 1 Homework Review 2 Examples of PDAs 3 Assignment .

10. k ≥ 0}. j. Give an informal description of a pushdown automaton that recognizes the language A = {ai bj ck | i = j or j = k where i.Homework Review Pushdown Automata Examples Robb T. Koether Homework Review Examples of PDAs Assignment Exercise 2. page 129. .

.Homework Review Pushdown Automata Examples Robb T. Koether Homework Review Examples of PDAs Assignment Solution The language A is the union of the languages {ai bi ck | i. k ≥ 0}. k ≥ 0} and {ai bk ck | i.

Homework Review Pushdown Automata Examples Robb T. $ → ε c. a → ε ε. ε → $ ε. Koether Homework Review Examples of PDAs Assignment Solution A PDA for the first of these languages is a. ε → a ε. ε → ε b. ε → ε .

Koether Homework Review Examples of PDAs Assignment Solution A PDA for the second language is a. ε → ε c. $ → ε .Homework Review Pushdown Automata Examples Robb T. b → ε ε. ε → b ε. ε → $ b. ε → ε ε.

Koether Homework Review Examples of PDAs Assignment Solution Therefore. ε → ε a. ε → ε ε.Homework Review Pushdown Automata Examples Robb T. ε → $ ε. ε → ε b. ε → ε ε. ε → $ c. ε → a ε. a → ε ε. $ → ε . ε → ε b. ε → ε ε. b → ε ε. ε → b ε. a PDA for the language A is a. $ → ε c.

Examples Pushdown Automata Examples Robb T. . Koether Homework Review Examples of PDAs Assignment Example (Pushdown automaton) Design a PDA that accepts the language {w | w contains an equal number of a’s and b’s}.

. when the stack is empty. on the stack. Koether Homework Review Examples of PDAs Assignment Example (Pushdown automaton) The strategy will be to keep the excess symbols. Another state will represent an excess of b’s. In fact.Examples Pushdown Automata Examples Robb T. we may return to the start state. either a’s or b’s. We can tell when the excess switches from one symbol to the other because at that point the stack will be empty. One state will represent an excess of a’s.

$ → ε a<b a. Koether Homework Review Examples of PDAs Assignment Example (Pushdown automaton) a. b → ε b. $ → ε b. ε → b . ε → $ b. a → ε a>b a. ε → a b.Examples Pushdown Automata Examples Robb T. ε → $ a.

Examples Pushdown Automata Examples Robb T. Koether Homework Review Examples of PDAs Assignment Example (Pushdown automaton) Note that this solution is inspired by the grammar S → SS | aSb | bSa | ε .

∗. (. Koether Example (Pushdown automata) Homework Review Examples of PDAs Assignment Let Σ = {a. Design a PDA whose language is {w | w contains balanced parentheses}. )}. . c. Design a PDA whose language is {w | w is a valid algebraic expression}. )}. (.Examples Pushdown Automata Examples Robb T. +. b. Let Σ = {a.

pages 112 .114. [. ). (. 23. n ≥ 0}. 22. Design a PDA whose language is {w | w contains balanced parentheses and brackets}. ]}. Problems 21. page 130.2. 24. Let Σ = {a. Design a PDA whose language is {an bm cm dn | m. . Design a PDA whose language is {an bm | n = m}.Assignment Pushdown Automata Examples Robb T. Koether Homework Review Examples of PDAs Assignment Read Section 2.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->