OSDN Git Service

:pencil2: update automaton.md
authorouuan <y___o___u@126.com>
Wed, 11 Sep 2019 00:58:59 +0000 (08:58 +0800)
committerouuan <y___o___u@126.com>
Wed, 11 Sep 2019 00:58:59 +0000 (08:58 +0800)
docs/string/automaton.md

index 01b20a4..2aa2054 100644 (file)
@@ -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。