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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
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. Well push symbols until we reach an element i I . Then well pop ( x i ) R from the top of the stack and repeat. If we run out of input and have an empty stack, then were 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 isnt, were 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

This note was uploaded on 07/14/2011 for the course COT 5310 taught by Professor Staff during the Spring '08 term at University of Central Florida.

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 Right Arrow Icon
Ask a homework question - tutors are online