From 3b0a64a748749e23c29d641240295d47f9e7b806 Mon Sep 17 00:00:00 2001 From: ouuan Date: Wed, 11 Sep 2019 08:58:59 +0800 Subject: [PATCH] :pencil2: update automaton.md --- docs/string/automaton.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/string/automaton.md b/docs/string/automaton.md index 01b20a4d..2aa2054a 100644 --- a/docs/string/automaton.md +++ b/docs/string/automaton.md @@ -40,12 +40,11 @@ $$ \delta(i, c)= \begin{cases} i+1&s[i+1]=c\\ -\delta(\pi(i),c)&s[i+1]\ne c +0&s[1]\ne c\land i=0\\ +\delta(\pi(i),c)&s[i+1]\ne c\land i>0 \end{cases} $$ -(需要特别定义 $\forall c\in\Sigma,\delta(\pi(1),c)=1$ ) - ### AC 自动机 [AC 自动机](./ac-automaton.md) 接受且仅接受以指定的字符串集合中的某个元素为后缀的字符串。也就是 Trie + KMP。 -- 2.11.0