跳到主要内容

東京大学 情報理工学系研究科 コンピュータ科学専攻 2015年8月実施 専門科目I 問題2

Author

祭音Myyura (co-authored with GPT 5.6 SOL)

Description

Let N={0,1,2,}\mathbb N=\{0,1,2,\ldots\} denote the set of all nonnegative integers. Let A=(Q,Σ,δ,q0,F)\mathcal A=(Q,\Sigma,\delta,q_0,F) be a deterministic finite automaton (DFA). Here QQ is a finite set of states; Σ\Sigma is a finite alphabet; δ:Q×ΣQ\delta:Q\times\Sigma\to Q is a transition function; q0Qq_0\in Q is an initial state; and FQF\subseteq Q is the set of accepting states. In what follows we let Σ\Sigma^* denote the set of finite words over Σ\Sigma (that is, Σ=nNΣn\Sigma^*=\bigcup_{n\in\mathbb N}\Sigma^n), and ε\varepsilon denote the empty word.

Let us consider the following construction that minimizes DFAs. We define a sequence R0,R1,R2,R_0,R_1,R_2,\ldots of binary relations over QQ (hence RnQ×QR_n\subseteq Q\times Q for each nNn\in\mathbb N), in the following inductive way.

R0=Q×Q,Rn+1=Φ(Rn).()R_0=Q\times Q,\qquad R_{n+1}=\Phi(R_n). \qquad(\dagger)

Here Φ\Phi is the function that, given RQ×QR\subseteq Q\times Q, returns the following binary relation Φ(R)Q×Q\Phi(R)\subseteq Q\times Q.

(q,q)Φ(R)    (qF    qF;and for each aΣ,(δ(q,a),δ(q,a))R.)(q,q')\in\Phi(R) \iff \left( \begin{array}{l} q\in F\iff q'\in F;\\ \text{and for each }a\in\Sigma,\quad (\delta(q,a),\delta(q',a))\in R. \end{array} \right)

Answer the following questions.

(1) Let a DFA A\mathcal A be the one depicted below. Describe the binary relation RnR_n for each nNn\in\mathbb N. Here Σ={0,1}\Sigma=\{0,1\}, and a double circle ◎ designates an accepting state.

(2) It is straightforward to see that the function Φ\Phi is monotone, that is, RRR\subseteq R' implies Φ(R)Φ(R)\Phi(R)\subseteq\Phi(R'). Use this fact, and the fact that R0R_0 is the greatest binary relation over QQ, in showing the following: the sequence R0,R1,R2,R_0,R_1,R_2,\ldots defined in ()(\dagger) satisfies

R0R1R2.()R_0\supseteq R_1\supseteq R_2\supseteq\cdots. \qquad(\ddagger)

(3) Let RωR_\omega be the limit nNRn\bigcap_{n\in\mathbb N}R_n of the descending chain ()(\ddagger). Answer whether the chain ()(\ddagger) reaches its limit within finitely many steps, that is, whether there is a nonnegative integer nNn\in\mathbb N such that Rn=Rn+1=Rn+2==RωR_n=R_{n+1}=R_{n+2}=\cdots=R_\omega. Give a proof or a counterexample, too.

(4) We extend the transition function δ\delta to finite words and define the function δ:Q×ΣQ\delta^*:Q\times\Sigma^*\to Q by: for qQq\in Q, aΣa\in\Sigma and wΣw\in\Sigma^*,

δ(q,ε)=q,δ(q,aw)=δ(δ(q,a),w).\delta^*(q,\varepsilon)=q,\qquad \delta^*(q,aw)=\delta^*(\delta(q,a),w).

Prove, by induction, that the following holds for each integer nn such that n1n\ge1.

If two states q,qQq,q'\in Q satisfy (q,q)Rn(q,q')\in R_n, then for any word wΣn1w\in\Sigma^{n-1} of length n1n-1 we have

δ(q,w)F    δ(q,w)F.\delta^*(q,w)\in F\iff\delta^*(q',w)\in F.

(5) Let \approx 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).(q,q')\in\approx \iff \left(\text{for each word }w\in\Sigma^*,\ \delta^*(q,w)\in F\iff\delta^*(q',w)\in F\right).

Prove that, between the two binary relations RωR_\omega and \approx, we have inclusion RωR_\omega\subseteq\approx.

(6) Prove that the converse holds, that is, Rω\approx\subseteq R_\omega. Here you can use that Φ\Phi is monotonic. You can also use the following fact (that is easily verified): between the two binary relations \approx and Φ()\Phi(\approx), we have inclusion Φ()\approx\subseteq\Phi(\approx).

题目描述

N={0,1,2,}\mathbb N=\{0,1,2,\ldots\}。设 A=(Q,Σ,δ,q0,F)\mathcal A=(Q,\Sigma,\delta,q_0,F) 为 DFA,其中 QQ 是有限状态集,Σ\Sigma 是有限字母表,δ:Q×ΣQ\delta:Q\times\Sigma\to Q 是转移函数,q0Qq_0\in Q 是初态,FQF\subseteq Q 是接受态集。以 Σ=nNΣn\Sigma^*=\bigcup_{n\in\mathbb N}\Sigma^n 表示有限词的集合,ε\varepsilon 表示空词。考虑如下 DFA 最小化过程,对 QQ 上的二元关系定义

R0=Q×Q,Rn+1=Φ(Rn),R_0=Q\times Q,\qquad R_{n+1}=\Phi(R_n),

其中

(q,q)Φ(R)    {qF    qF,(δ(q,a),δ(q,a))R(aΣ).(q,q')\in\Phi(R) \iff \begin{cases} q\in F\iff q'\in F,\\ (\delta(q,a),\delta(q',a))\in R & (\forall a\in\Sigma). \end{cases}

(1)对 Σ={0,1}\Sigma=\{0,1\}F={q0,q2}F=\{q_0,q_2\} 且转移如下的 DFA,求每个 RnR_n

状态输入 00输入 11
q0q_0q0q_0q1q_1
q1q_1q1q_1q2q_2
q2q_2q2q_2q1q_1

(2)Φ\Phi 具有单调性,即 RRR\subseteq R' 蕴含 Φ(R)Φ(R)\Phi(R)\subseteq\Phi(R')。利用这一事实及 R0R_0QQ 上最大二元关系这一事实,证明 R0R1R2R_0\supseteq R_1\supseteq R_2\supseteq\cdots

(3)令 Rω=nNRnR_\omega=\bigcap_{n\in\mathbb N}R_n。判断该下降链是否必在有限步内稳定,并证明结论。

(4)将 δ\delta 扩张为 δ:Q×ΣQ\delta^*:Q\times\Sigma^*\to Q:对 qQ,aΣ,wΣq\in Q,a\in\Sigma,w\in\Sigma^*,定义

δ(q,ε)=q,δ(q,aw)=δ(δ(q,a),w).\delta^*(q,\varepsilon)=q,\qquad \delta^*(q,aw)=\delta^*(\delta(q,a),w).

用归纳法证明:若 (q,q)Rn(q,q')\in R_nn1n\ge1,则对任意长度为 n1n-1 的词 ww

δ(q,w)F    δ(q,w)F.\delta^*(q,w)\in F\iff\delta^*(q',w)\in F.

(5)令 qqq\approx q' 表示从两状态出发接受相同语言。证明 RωR_\omega\subseteq\approx

(6)证明反向包含关系 Rω\approx\subseteq R_\omega。可以使用 Φ\Phi 的单调性以及事实 Φ()\approx\subseteq\Phi(\approx)

Kai

(1)

R1R_1 只区分“接受态”和“非接受态”,所以

R1={q0,q2}2{(q1,q1)}.R_1=\{q_0,q_2\}^2\cup\{(q_1,q_1)\}.

q0,q2q_0,q_2 在输入 00 后仍分别到达 q0,q2q_0,q_2,在输入 11 后都到达 q1q_1,故二者在下一轮仍不被区分。因此

R0=Q2,Rn={q0,q2}2{(q1,q1)}(n1).\boxed{R_0=Q^2,\qquad R_n=\{q_0,q_2\}^2\cup\{(q_1,q_1)\}\quad(n\ge1).}

(2)

R1=Φ(R0)R0R_1=\Phi(R_0)\subseteq R_0。若 RnRn1R_n\subseteq R_{n-1},由 Φ\Phi 单调可得

Rn+1=Φ(Rn)Φ(Rn1)=Rn.R_{n+1}=\Phi(R_n)\subseteq\Phi(R_{n-1})=R_n.

归纳即得下降链。

(3)

必在有限步内稳定。因为 Q2Q^2 只有 Q2|Q|^2 个有序对;若 Rn+1RnR_{n+1}\subsetneq R_n,至少删除一个有序对。因此严格下降至多发生 Q2|Q|^2 次,随后存在 NN 使

RN=RN+1==Rω.R_N=R_{N+1}=\cdots=R_\omega.

(4)

nn 归纳。n=1n=1w=εw=\varepsilon,结论正是 R1=Φ(R0)R_1=\Phi(R_0) 对接受性的要求。

设命题对 nn 成立。若 (q,q)Rn+1(q,q')\in R_{n+1},将任意 w=n|w|=n 的词写成 w=avw=av。由定义

(δ(q,a),δ(q,a))Rn.(\delta(q,a),\delta(q',a))\in R_n.

再对长度为 n1n-1vv 使用归纳假设,并利用 δ(q,av)=δ(δ(q,a),v)\delta^*(q,av)=\delta^*(\delta(q,a),v),即得结论。

(5)

(q,q)Rω(q,q')\in R_\omega,则它属于每个 RnR_n。对任意词 ww,在(4)中取 n=w+1n=|w|+1,便有

δ(q,w)F    δ(q,w)F.\delta^*(q,w)\in F\iff\delta^*(q',w)\in F.

qqq\approx q',即 RωR_\omega\subseteq\approx

(6)

qqq\approx q',取空词可知 q,qq,q' 的接受性相同;对任意 aΣa\in\SigmawΣw\in\Sigma^*

δ(δ(q,a),w)=δ(q,aw),\delta^*(\delta(q,a),w)=\delta^*(q,aw),

δ(q,a)δ(q,a)\delta(q,a)\approx\delta(q',a)。因此 Φ()\approx\subseteq\Phi(\approx)

R0\approx\subseteq R_0。若 Rn\approx\subseteq R_n,利用单调性得到

Φ()Φ(Rn)=Rn+1.\approx\subseteq\Phi(\approx)\subseteq\Phi(R_n)=R_{n+1}.

归纳知 Rn\approx\subseteq R_n 对所有 nn 成立,从而 Rω\approx\subseteq R_\omega