Lecture5x - FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY...

Info iconThis preview shows pages 1–10. 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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight 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: FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 CONTEXT-FREE GRAMMARS AND PUSH-DOWN AUTOMATA = {0, 1}, L = { 0 n 1 n | n 0 } = {a, b, c, , z}, L = { w | w = w R } = { (, ) }, L = { balanced strings of parens } NONE OF THESE ARE REGULAR (), ()(), (()()) are in L, (, ()), ())(() are not in L PUSHDOWN AUTOMATA (PDA) FINITE STATE CONTROL STACK (Last in, first out) INPUT , $ 0, 1, 1, , $ input pop push 0011 STACK $ 0011 011 $ 11 $ 1 Non-deterministic , $ 0, 1, 1, , $ input pop push 001 STACK $ $ $ 1 01 001 PDA that recognizes L = { 0 n 1 n | n 0 } Definition: A ( non-deterministic ) PDA is a tuple P = (Q, , , , q , F), where: Q is a finite set of states is the stack alphabet q Q is the start state F Q is the set of accept states is the input alphabet : Q 2 Q 2 Q is the set of subsets of Q and = {} Let w * and suppose w can be written as w 1 ... w n where w i (recall = {} ) Then P accepts w if there are r , r 1 , ..., r n Q and s , s 1 , ..., s n * (sequence of stacks) such that 1. r 0 = q 0 and s = ( P starts in q with empty stack) 2. For i = 0, ..., n-1: (r i+1 , b ) ( r i , w i+1 , a ), where s i = a t and s i+1 = b t for some a, b and t * ( P moves correctly according to state, stack and symbol read) 3. r n F ( P is in an accept state at the end of its input) , $ 0, 0 1,0 1,0...
View Full Document

Page1 / 34

Lecture5x - FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY...

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

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