-
Notifications
You must be signed in to change notification settings - Fork 0
/
lec14.tex
61 lines (52 loc) · 1.59 KB
/
lec14.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
% context free grammar
\subsection{Push Down Automata}
\begin{example}[Bracket Matching]
The push down automaton described as following
\centgraph[7cm]{mp/push_down-0}
recognizes the language
\[
\set{ 0^n 1^n \mid n \ge 0 }.
\]
\end{example}
\begin{example}[Same number of 0's and 1's]
A push down automaton can be easily constructed to recognize the language,
\centgraph[7cm]{mp/push_down-1}
% \[
% S \mapsto SS \mid 0S1 \mid 1S0 \mid \varepsilon
% \]
\end{example}
\section{PDA}
\begin{definition}[PDA]
A PDA is
\[
M = \lst{Q, \Sigma, \Gamma, \delta, s, F}
\]
where
\begin{compactitem}
\item
$\Sigma, \Gamma$ are finite sets of alphabets,
\item
$Q$ is a finite set of states,
\item
$s \in Q$ is the starting state,
\item
$F \subseteq Q$ is a finite set of the final states, and
\item
$\delta \colon Q \times \Sigma_\varepsilon \times \Gamma_\varepsilon
\mapsto
\gamma(Q \times \Gamma_\varepsilon)$
\end{compactitem}
\end{definition}
\begin{definition}[Configurations]
\begin{align*}
\Conf_M &= Q \times \Sigma^* \times \Gamma^* \\
I_M(w) &= (s,w,\varepsilon) \\
H_M &= \set{ (q,w,z) \mid w = \varepsilon } \\
O_M\( (q,\varepsilon,z)\) &=
\begin{cases}
\text{accept} & q \in F \\
\text{reject} & \text{else}
\end{cases} \\
R(q',w,cz)
\end{align*}
\end{definition}