l14 - Lecture 14: More Properties of Context-Free Languages...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 14: More Properties of Context-Free Languages David Dill Department of Computer Science 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline Push Down Automata Definition Language of a PDA Acceptance by final state vs. empty stack From CFGs to PDAs. CF closure properties. 2
Background image of page 2
PDA Formalities ( Q, Σ , Γ ,δ,q 0 ,Z 0 ,F ) Γ is the stack alphabet . Z 0 is the start symbol . PDA starts with Z 0 on the stack and nothing else. δ : Q × ǫ ) × Γ 2 Q × Γ * (The value of δ must be a finite set, though.) δ bases possible next configuration on: the current state, the input (or ǫ ), and the top symbol on the stack. It gets a set of non-deterministic choices, each of which specifies the next state and a string of new symbols to be pushed on the stack Everything else is as in an ǫ -NFA 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Acceptance by a PDA An instantaneous description is a snapshot of the PDA: Def An instantaneous description of a PDA is The current state. The input that has not yet been read. The complete contents of the stack. So an ID has the type Q × Σ × Γ . E.g., ( q,w,α ) , where q is the current state, w is the unread input, and α is the stack (with the top symbol first). The ID has everything necessary to predict the possible future IDs of the PDA. 4
Background image of page 4
IDs evolve over time. ID i ID i +1 if the PDA can transform ID i to ID i +1 . If δ ( q,a,X ) contains ( p,α ) , then ( q,aw,Xβ ) ( p,w,αβ ) is the obvious relation: ID ID and ID ID if ID ID ′′ ID . A string
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/12/2010 for the course CS 154 at Stanford.

Page1 / 18

l14 - Lecture 14: More Properties of Context-Free Languages...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online