diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2024-06-28 13:47:18 +0200 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2024-06-28 13:47:18 +0200 |
| commit | 65d2ac37862ce9d1de208a05099c281863e66256 (patch) | |
| tree | d1fe1ece8790e8e8b2a8bcd3895f82477b3a0e2b /string/string.tex | |
| parent | a3c9198048cf465a3c01827b3667edfc99d8031c (diff) | |
| parent | 366ff0a4ba0c94f5cdc2cbd4e2c991ad0b544522 (diff) | |
merge
Diffstat (limited to 'string/string.tex')
| -rw-r--r-- | string/string.tex | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/string/string.tex b/string/string.tex index c36ec69..393c2ad 100644 --- a/string/string.tex +++ b/string/string.tex @@ -47,18 +47,21 @@ \sourcecode{string/longestCommonSubsequence.cpp} \end{algorithm} +\columnbreak \begin{algorithm}{\textsc{Aho-Corasick}-Automat} \begin{methods}[ll] - sucht patterns im Text & \runtime{\abs{Text}+\sum\abs{pattern}+\abs{matches}} + sucht patterns im Text & \runtime{\abs{Text}+\sum\abs{pattern}} \end{methods} \begin{enumerate} - \item mit \code{addString(pattern, idx);} Patterns hinzufügen. + \item mit \code{addString(pattern, idx)} Patterns hinzufügen. + \item rufe \code{buildGraph()} auf \item mit \code{state = go(state, idx)} in nächsten Zustand wechseln. - \item mit \code{state = getExit(state)} den exit Kanten folgen bis \code{state == 0} - \item dabei mit \code{aho[state].patterns} die Matches zählen + \item erhöhe dabei \code{dp[state]++} + \item rufe \code{dfs()} auf. In dp[pattern state] stehen die Anzahl der Matches \end{enumerate} \sourcecode{string/ahoCorasick.cpp} \end{algorithm} +\clearpage \begin{algorithm}{Lyndon und De-Bruijn} \begin{itemize} |
