Skip to content

Commit 3d2d863

Browse files
wikkuadamant-pwn
authored andcommitted
aho_corasick: fix least string not matching dict
1 parent 7047076 commit 3d2d863

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/string/aho_corasick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ A set of strings and a length $L$ is given.
245245
We have to find a string of length $L$, which does not contain any of the strings, and derive the lexicographically smallest of such strings.
246246
247247
We can construct the automaton for the set of strings.
248-
Recall that the vertices from which we can reach a $\text{leaf}$ vertex are the states at which we have a match with a string from the set.
248+
Recall that $\text{leaf}$ vertices are the states where we have a match with a string from the set.
249249
Since in this task we have to avoid matches, we are not allowed to enter such states.
250250
On the other hand we can enter all other vertices.
251251
Thus we delete all "bad" vertices from the machine, and in the remaining graph of the automaton we find the lexicographical smallest path of length $L$.

0 commit comments

Comments
 (0)