1.二叉树的自动机描述
A binary tree is a triple
T
=
(
Σ
,
V
,
r
,
ϕ
,
c
)
T=(\Sigma,\bm{V},r,\phi, c)
T=(Σ,V,r,ϕ,c)
∀
v
∈
V
\forall v \in \bm{V}
∀v∈V,
∃
1
\exists1
∃1
s
∈
Σ
∗
s \in \Sigma^*
s∈Σ∗ st.
(
r
,
s
)
=
v
(\mathrm{r},\mathrm{s})=v
(r,s)=v;
a)
Σ
=
{
l
,
r
}
\Sigma=\{\mathrm{l},\mathrm{r}\}
Σ={l,r} is alphabet
b)
V
=
{
v
1
,
…
,
v
n
}
∪
ϕ
\bm{V} = \{v_1, \dots, v_n\}\cup{\phi}
V={v1,…,vn}∪ϕ
c)
r
∈
V
r \in \bm{V}
r∈V is the root and the start state
d)
ϕ
\phi
ϕ is the special terminal state
e)
c
:
V
∪
{
ϕ
}
×
Σ
∗
→
V
∪
{
ϕ
}
c: \bm{V} \cup \{\phi\} \times \Sigma^* \to \bm{V} \cup \{\phi\}
c:V∪{ϕ}×Σ∗→V∪{ϕ} satisfying
2.树的自动机描述
A Tree is a triple
T
=
(
Σ
,
V
,
n
,
r
,
p
)
T=(\Sigma,\bm{V},n,r, p)
T=(Σ,V,n,r,p)
∀
v
∈
V
\forall v \in \bm{V}
∀v∈V,
∃
1
\exists1
∃1
s
∈
Σ
∗
s \in \Sigma^*
s∈Σ∗ st.
(
v
,
s
)
=
r
(\mathrm{v},\mathrm{s})=r
(v,s)=r;
a)
Σ
=
{
q
}
\Sigma=\{\mathrm{q}\}
Σ={q} is alphabet
b)
V
=
{
v
1
,
…
,
v
n
}
∪
ϕ
\bm{V} = \{v_1, \dots, v_n\}\cup{\phi}
V={v1,…,vn}∪ϕ
c)
q
∈
V
q \in \bm{V}
q∈V is the start state
d)
ϕ
\phi
ϕ is the special terminal state
e)
ϕ
\phi
ϕ is the root node
f)
p
:
V
∪
{
ϕ
}
×
Σ
∗
→
V
∪
{
ϕ
}
p: \bm{V} \cup \{\phi\} \times \Sigma^* \to \bm{V} \cup \{\phi\}
p:V∪{ϕ}×Σ∗→V∪{ϕ} satisfying