算法的基础与数据结构

时间:2012-11-08 08:54:01
【文件属性】:

文件名称:算法的基础与数据结构

文件大小:4.72MB

文件格式:ZIP

更新时间:2012-11-08 08:54:01

算法 基础

算法The machine consists of states (indicated by circled letters) and transitions (indicated by arrows). Each state has two transitions leaving it: a match transition (solid line) and a non-match transition (dotted line). The states are where the machine executes instructions; the transitions are the goto instructions. When in the state labeled “5,” the machine can perform just one instruction: “if t.he current character is x then scan past it and take the match transition, otherwise take the non-match transition.” To “scan past” a character means to take the next character in the string as the “current character”; the machine scans past characters as it matches them. There is one exception to this: the non-match transition in the first state (marked with a double line) also requires that the machine scan to the next character. (Essentially this corresponds to scanning for the first occurrence of the first character in the pattern.) In the next chapter we’ll see how to use a similar (but more powerful) machine to help develop a much more powerf


【文件预览】:
book0338.pdf

网友评论