文档详情

自动机理论语言和计算导论课后习题答案(中文版)..doc

发布:2017-01-20约10.79万字共67页下载文档
文本预览下载声明
Solutions for Section 2.2 Exercise 2.2.1(a) States correspond to the eight combinations of switch positions, and also must indicate whether the previous roll came out at D, i.e., whether the previous input was accepted. Let 0 represent a position to the left (as in the diagram) and 1 a position to the right. Each state can be represented by a sequence of three 0s or 1s, representing the directions of the three switches, in order from left to right. We follow these three bits by either a indicating it is an accepting state or r, indicating rejection. Of the 16 possible states, it turns out that only 13 are accessible from the initial state, 000r. Here is the transition table: 杠杆可能出现8种情况,影响着最终状态。并且也要说明,前面一个大理石球是否从D滚出,也就是说,前一个输入是否被接受。令 0 代表向左方的状态(如图表), 1 代表向右方。这三个杠杆的每一个状态都可以用三个数(0或1)组成的序列表示。这个序列后面跟着字母a或者r。a代表接受状态,r代表拒绝状态。16种可能的状态中,只有13种是从初始状态000r可达的。下面它的有穷自动机的转移表。 A B -000r 100r 011r *000a 100r 011r *001a 101r 000a 010r 110r 001a *010a 110r 001a 011r 111r 010a 100r 010r 111r *100a 010r 111r 101r 011r 100a *101a 011r 100a 110r 000a 101a *110a 000a 101a 111r 001a 110a Exercise 2.2.2 The statement to be proved is δ-hat(q,xy) = δ-hat(δ-hat(q,x),y), and we proceed by induction on the length of y. 证明:通过对|y|进行归纳,来证明(q , xy)=((q , x) , y) ,具体过程如下: Basis: If y = ε, then the statement is δ-hat(q,x) = δ-hat(δ-hat(q,x),ε). This statement follows from the basis in the definition of δ-hat. Note that in applying this definition, we must treat δ-hat(q,x) as if it were just a state, say p. Then, the statement to be proved is p = δ-hat(p,ε), which is easy to recognize as the basis in the definition of δ-hat. 基础: =0,则y=ε。那么需证(q,x)=((q ,x),ε),记p=(q,x),命题变为 p=(p ,ε), 由的定义知这显然成立。 Induction: Assume the statement for strings shorter than y, and break y = za, where a is the last symbol of y. The steps converting δ-hat(δ-hat(q,x),y) to δ-hat(q,xy) are summarized in the following table: 归纳: 假设命题对于比 y 短的串成立, 且y = za, 其中 a 是y的结尾符号。((q,x),y) 到(q
显示全部
相似文档