2.2 Pushdown Automata
图示2.11 2.12:PDA = FA + stack
deterministic PDA跟nondeterministic PDA不等价了,PDA指后者。
定义2.13(PDA)
A pushdown automaton is a 6-tuple , where , , , and are all finite sets, and
- is the set of states,
- is the input alphabet,
- is the stack alphabet,
- is the transition function
- is the start state, and
- is the set of accept states.
定义(PDA's computation )
A pushdown automaton computes as follows. It accepts input if can be written as (where ), and sequences of states (where ), and strings (其中) exists that satisfy the following three conditions. The string represent the sequence of stack contents that has on the accepting branch of the computation.
TODO..
定理2.20(L(PDA) = L(CFG))
A language is context free if and only if some pushdown automaton recognizes it.
证明方法:构造法,从CFG构造PDA,从PDA构造CFG
推论2.32(regular languages context free languages)
Every regular language is context free
证明方法:每个regular language都有一个能识别它的FA,而FA是PDA结构简化版,即FAsPDAs,因此 regular languagesL(PDA)=regular languages
定理(的封闭性)
对正则运算封闭,对交、补不封闭