You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/string/aho_corasick.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -245,7 +245,7 @@ A set of strings and a length $L$ is given.
245
245
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.
246
246
247
247
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.
249
249
Since in this task we have to avoid matches, we are not allowed to enter such states.
250
250
On the other hand we can enter all other vertices.
251
251
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