全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Glushkov automaton?

Definition 22.6 University Computer Science — Year 2 · 第 22 章 — Regular Expressions and the Limits of Regular Languages

Let ee have positions 1,…,m1, \dots, m, the letter at position jj being ℓ(j)\ell(j), and let e′e' be the linear expression. Define Null\mathrm{Null} (whether ε∈L(e)\varepsilon \in L(e)), First\mathrm{First} (the positions that can begin a word of L(e′)L(e')), Last\mathrm{Last} (those that can end one), and Follow(j)\mathrm{Follow}(j) (the positions that can come right after jj in a word of L(e′)L(e')). The Glushkov automaton of ee has states 0,1,…,m0, 1, \dots, m, start state 0, transitions 0→ℓ(j)j0 \xrightarrow{\ell(j)} j for j∈Firstj \in \mathrm{First} and i→ℓ(j)ji \xrightarrow{\ell(j)} j for j∈Follow(i)j \in \mathrm{Follow}(i), and accepting states Last\mathrm{Last}, plus 0 if Null\mathrm{Null}.

The Glushkov automaton of (a b)*abb: one state per position, and every transition into a position carries that position’s letter. It is nondeterministic: from 0, a_1 and a_3 both read a.
The Glushkov automaton of (a∣b)∗abb(a \mid b)^*abb: one state per position, and every transition into a position carries that position’s letter. It is nondeterministic: from 0, a1a_1 and a3a_3 both read aa.
在原文中阅读 →