東京大学 情報理工学系研究科 コンピュータ科学専攻 2015年8月実施 専門科目I 問題2
Author
祭音Myyura (co-authored with GPT 5.6 SOL)
Description
Let N={0,1,2,…} denote the set of all nonnegative integers.
Let A=(Q,Σ,δ,q0,F) be a deterministic finite automaton (DFA). Here Q is a finite set of states; Σ is a finite alphabet; δ:Q×Σ→Q is a transition function; q0∈Q is an initial state; and F⊆Q is the set of accepting states. In what follows we let Σ∗ denote the set of finite words over Σ (that is, Σ∗=⋃n∈NΣn), and ε denote the empty word.
Let us consider the following construction that minimizes DFAs. We define a sequence R0,R1,R2,… of binary relations over Q (hence Rn⊆Q×Q for each n∈N), in the following inductive way.
R0=Q×Q,Rn+1=Φ(Rn).(†)
Here Φ is the function that, given R⊆Q×Q, returns the following binary relation Φ(R)⊆Q×Q.
(q,q′)∈Φ(R)⟺(q∈F⟺q′∈F;and for each a∈Σ,(δ(q,a),δ(q′,a))∈R.)
Answer the following questions.
(1) Let a DFA A be the one depicted below. Describe the binary relation Rn for each n∈N.
Here Σ={0,1}, and a double circle ◎ designates an accepting state.
(2) It is straightforward to see that the function Φ is monotone, that is, R⊆R′ implies Φ(R)⊆Φ(R′). Use this fact, and the fact that R0 is the greatest binary relation over Q, in showing the following: the sequence R0,R1,R2,… defined in (†) satisfies
R0⊇R1⊇R2⊇⋯.(‡)
(3) Let Rω be the limit ⋂n∈NRn of the descending chain (‡). Answer whether the chain (‡) reaches its limit within finitely many steps, that is, whether there is a nonnegative integer n∈N such that Rn=Rn+1=Rn+2=⋯=Rω. Give a proof or a counterexample, too.
(4) We extend the transition function δ to finite words and define the function δ∗:Q×Σ∗→Q by: for q∈Q, a∈Σ and w∈Σ∗,
δ∗(q,ε)=q,δ∗(q,aw)=δ∗(δ(q,a),w).
Prove, by induction, that the following holds for each integer n such that n≥1.
If two states q,q′∈Q satisfy (q,q′)∈Rn, then for any word w∈Σn−1 of length n−1 we have
δ∗(q,w)∈F⟺δ∗(q′,w)∈F.
(5) Let ≈ be the binary relation between states that they “accept the same language.” That is,
(q,q′)∈≈⟺(for each word w∈Σ∗, δ∗(q,w)∈F⟺δ∗(q′,w)∈F).
Prove that, between the two binary relations Rω and ≈, we have inclusion Rω⊆≈.
(6) Prove that the converse holds, that is, ≈⊆Rω. Here you can use that Φ is monotonic. You can also use the following fact (that is easily verified): between the two binary relations ≈ and Φ(≈), we have inclusion ≈⊆Φ(≈).
题目描述
令 N={0,1,2,…}。设 A=(Q,Σ,δ,q0,F) 为 DFA,其中 Q 是有限状态集,Σ 是有限字母表,δ:Q×Σ→Q 是转移函数,q0∈Q 是初态,F⊆Q 是接受态集。以 Σ∗=⋃n∈NΣn 表示有限词的集合,ε 表示空词。考虑如下 DFA 最小化过程,对 Q 上的二元关系定义
R0=Q×Q,Rn+1=Φ(Rn),
其中
(q,q′)∈Φ(R)⟺{q∈F⟺q′∈F,(δ(q,a),δ(q′,a))∈R(∀a∈Σ).
(1)对 Σ={0,1}、F={q0,q2} 且转移如下的 DFA,求每个 Rn。
| 状态 | 输入 0 | 输入 1 |
|---|
| q0 | q0 | q1 |
| q1 | q1 | q2 |
| q2 | q2 | q1 |
(2)Φ 具有单调性,即 R⊆R′ 蕴含 Φ(R)⊆Φ(R′)。利用这一事实及 R0 是 Q 上最大二元关系这一事实,证明 R0⊇R1⊇R2⊇⋯。
(3)令 Rω=⋂n∈NRn。判断该下降链是否必在有限步内稳定,并证明结论。
(4)将 δ 扩张为 δ∗:Q×Σ∗→Q:对 q∈Q,a∈Σ,w∈Σ∗,定义
δ∗(q,ε)=q,δ∗(q,aw)=δ∗(δ(q,a),w).
用归纳法证明:若 (q,q′)∈Rn 且 n≥1,则对任意长度为 n−1 的词 w,
δ∗(q,w)∈F⟺δ∗(q′,w)∈F.
(5)令 q≈q′ 表示从两状态出发接受相同语言。证明 Rω⊆≈。
(6)证明反向包含关系 ≈⊆Rω。可以使用 Φ 的单调性以及事实 ≈⊆Φ(≈)。
Kai
(1)
R1 只区分“接受态”和“非接受态”,所以
R1={q0,q2}2∪{(q1,q1)}.
q0,q2 在输入 0 后仍分别到达 q0,q2,在输入 1 后都到达 q1,故二者在下一轮仍不被区分。因此
R0=Q2,Rn={q0,q2}2∪{(q1,q1)}(n≥1).
(2)
R1=Φ(R0)⊆R0。若 Rn⊆Rn−1,由 Φ 单调可得
Rn+1=Φ(Rn)⊆Φ(Rn−1)=Rn.
归纳即得下降链。
(3)
必在有限步内稳定。因为 Q2 只有 ∣Q∣2 个有序对;若 Rn+1⊊Rn,至少删除一个有序对。因此严格下降至多发生 ∣Q∣2 次,随后存在 N 使
RN=RN+1=⋯=Rω.
(4)
对 n 归纳。n=1 时 w=ε,结论正是 R1=Φ(R0) 对接受性的要求。
设命题对 n 成立。若 (q,q′)∈Rn+1,将任意 ∣w∣=n 的词写成 w=av。由定义
(δ(q,a),δ(q′,a))∈Rn.
再对长度为 n−1 的 v 使用归纳假设,并利用
δ∗(q,av)=δ∗(δ(q,a),v),即得结论。
(5)
若 (q,q′)∈Rω,则它属于每个 Rn。对任意词 w,在(4)中取 n=∣w∣+1,便有
δ∗(q,w)∈F⟺δ∗(q′,w)∈F.
故 q≈q′,即 Rω⊆≈。
(6)
若 q≈q′,取空词可知 q,q′ 的接受性相同;对任意 a∈Σ 和 w∈Σ∗,
δ∗(δ(q,a),w)=δ∗(q,aw),
故 δ(q,a)≈δ(q′,a)。因此 ≈⊆Φ(≈)。
又 ≈⊆R0。若 ≈⊆Rn,利用单调性得到
≈⊆Φ(≈)⊆Φ(Rn)=Rn+1.
归纳知 ≈⊆Rn 对所有 n 成立,从而 ≈⊆Rω。