机器学习的数学基础3:有限状态自动机
习题 3.1 模仿自动机的样子来重新定义二叉树.
答:
Definition: Let Σ = { l , r } be the alphbet and ϕ be a null node. A Btree is a tuple = (
,
,
,
) ,where
is the set of states,
∈
is the start state,
⊆Q is the set of terminal states,
:
×Σ∗→
is the transition function.
a) ∈ Σ is accepted by the automata;∃1
∈
, iff
(
, s ) ∈
.
b) ∀∈
,st. ∃1
(
, Σ)∈
.
c)∀∈
, ∃ t∈
=ϕ.
d) ∀∈
/ϕ, ∃1 q
∈
.
e)∀=ϕ,∃1 q
=
=ϕ.
习题3.2 模仿自动机的样子来重新定义树.
A tree is a tuple = (
,
,
,
) ,where
is the set of states,
∈
is the start state,
⊆Q is the set of terminal states,
:
×Σ∗→
is the transition function.
a) ∈ Σ is accepted by the automata;∃1
∈
, iff
(
, s ) ∈
.
b)∀∈
, ∃ t∈
=ϕ.
c) ∀∈
/ϕ, ∃ q
∈
.
d)∀=ϕ,∃1 q
=
=ϕ.