Handout 22.docx

7
Tahir Naseem/Handout 22 -1- Theory of Automata and Formal Languages Lesson 25, 26 & 27 Pushdown Automata.(PDA) Just as a DFA is a way to implement a regular epression! a pushdown automata is implement a "ontet free grammar #DA e$ui%alent in power to a &F' &an "hoose the representation most useful to our parti"ular pro(lem )ssentially identi"al to a regular automata e"ept for the addition of a s +ta"* is of infinite si,e +ta"* allows us to re"ogni,e some of the non-regular languages Example 1: Example 2:

Transcript of Handout 22.docx

Tahir Naseem/Handout 22-7-Theory of Automata and Formal LanguagesLesson 25, 26 & 27

Pushdown Automata.(PDA)Just as a DFA is a way to implement a regular expression, a pushdown automata is a way to implement a context free grammar PDA equivalent in power to a CFG Can choose the representation most useful to our particular problem Essentially identical to a regular automata except for the addition of a stack Stack is of infinite size Stack allows us to recognize some of the non-regular languages

Example 1:

Example 2:

Example 3:

The process of running the string aaabbb can also be expressed in the following table

More Examples:

Non-deterministic PDA

Here non-determinism can be observed at state READ1. It can be observed that the above PDA accepts the language of EVENPALINDROME.