Push down automata

somyabagai 6,436 views 15 slides May 05, 2013
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

No description available for this slideshow.


Slide Content

PUSH DOWN AUTOMATA

WHY PDA ? DFAs accept regular languages. We want to design machines similar to DFAs that will accept context-free languages and is regular. A finite automation cannot accept string of the form ( a^n,b^n ) as it has to remember the no. of a’s and so requires infinite no. of states.

POWERS OF PDA This difficulty is avoided by adding a auxiliary memory in form of stack. It has a read only input tape and input alphabet. Final state control Set of final states Initial state (as in FA) Read write push down store.

PDA MODEL

FORMAL DEFINATION Finite nonempty set of states Q. Finite non empty set of input symbols denoted by Finite non empty set of pushdown store Initial state q0. Initial symbol of push down store Z0. Set of final state  a transition function . A PDA IS A 7 TUPLE , NAMELY

FORMAL DEFINATION OF CFG A context-free grammar G is a 4-tuple (V,  , R, S), where:  V is a finite set; each element v  V  is called  a non-terminal character  or a  variable.  is a finite set of  terminal s, disjoint from , which make up the actual content of the sentence. R is a finite relation from V  to (V U )* . S, the start symbol , used to represent the whole sentence (or program). It must be an element of  V.

FORMAL CONTRUCTION Let G = (V, T,R, S) be a CFG. The PDA P = ({q}, T, V ∪ T, δ, q, S) where the δ is defined as follows: For each variable A, R1: δ(q, ǫ,A ) = {(q, β) | A → β is a production of R} For each terminal a R2: δ(q, a, a) = {(q, ǫ)} * Ǫ DENOTES NULL

PROJECT CONTRUCT PDA EQUIVALENT TO FOLLOWING GRAMMAR WITH PRODUCTIONS. S -> a A A S -> a S A -> b S A -> a Convert to PDA using LL. Show simulations

Step 1: Select GRAMMAR

STEP 2:Write the productions STEP 3 : Covert ->PDA ( LL)

OUTPUT :

Construct CFG TO PDA We define PDA A as is defined by following rules:

TEST FOR STRING ‘ aabaaa ’

THANK YOU
Tags