COT5310hw7key

# COT5310hw7key - COT 5310 Assignment 7 Key Fall 2007 1...

This preview shows pages 1–2. Sign up to view the full content.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COT 5310 Assignment 7 Key, Fall 2007 1. Present the description of a PDA (in words) that accepts L A (see page 253 of Notes). You may assume that [ i ] is a single symbol. A PCP instance over Σ consists of two vectors x, y over Σ ∗ where | x | = | y | = n . Let I = { 1 , . . . , n } and be disjoint from Σ (we use just i instead of [ i ] to denote the index). L A is the language generated by the grammar A → x i A i | x i i for i ∈ I over the alphabet Σ ′ = Σ ∪ I . So L A = braceleftbig x i 1 x i 2 . . . x i k- 1 x i k i k i k − 1 . . . i 2 i 1 : 1 ≤ i j ≤ n for 1 ≤ j ≤ k and i j ∈ I and x i j ∈ Σ ∗ bracerightbig . To make a PDA that accepts this language, use Σ ′ = Σ ∪ I as the stack symbols, with Z as the bottom of stack marker. We’ll push symbols until we reach an element i ∈ I . Then we’ll pop ( x i ) R from the top of the stack and repeat. If we run out of input and have an empty stack, then we’re in L A . 1) Read in elements of Σ and push them onto the stack. When encountering some i ∈ I , push it onto the stack and move to step 2). 2) Pop i from the stack and check if w i R is on top of the stack. If it isn’t, we’re not in L A so transition to a non-accepting state r ). If w i R is on top, and the bottom of stack symbol is exposed, transition to an accepting state a )....
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

COT5310hw7key - COT 5310 Assignment 7 Key Fall 2007 1...

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

View Full Document
Ask a homework question - tutors are online