-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstringsheet.tex
484 lines (395 loc) · 17 KB
/
stringsheet.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
\documentclass[10pt,landscape]{article}
\usepackage{amssymb,amsmath,amsthm,amsfonts}
\usepackage{multicol,multirow}
\usepackage{calc}
\usepackage{ifthen}
\usepackage{diagbox}
\usepackage[landscape]{geometry}
\usepackage[colorlinks=true,citecolor=blue,linkcolor=blue]{hyperref}
\usepackage{titlesec}
\titleformat*{\paragraph}{\itshape}
\ifthenelse{\lengthtest { \paperwidth = 11in}}
{ \geometry{top=.5in,left=.5in,right=.5in,bottom=.5in} }
{\ifthenelse{ \lengthtest{ \paperwidth = 297mm}}
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
{\geometry{top=1cm,left=1cm,right=1cm,bottom=1cm} }
}
\pagestyle{empty}
\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0mm}%
{-1ex plus -.5ex minus -.2ex}%
{0.5ex plus .2ex}%x
{\normalfont\large\itshape}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
{-1explus -.5ex minus -.2ex}%
{0.5ex plus .2ex}%
{\normalfont\normalsize\itshape}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
{-1ex plus -.5ex minus -.2ex}%
{1ex plus .2ex}%
{\normalfont\small\itshape}}
\makeatother
\setcounter{secnumdepth}{0}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}
% -----------------------------------------------------------------------
\title{String Sheet}
\newcommand*{\UnaryOperator}[2][]{%
\ifx&%
\ensuremath{\mathop{}\mathopen{}#2\mathopen{}}%
\else%
\ensuremath{\mathop{}\mathopen{}#2\mathopen{}\left(#1\right)}%
\fi%
}
\newcommand*{\Oh}[1]{\UnaryOperator[#1]{\mathcal{O}}}
\newcommand*{\Ot}[1]{\ensuremath{\Theta(#1)}}
\newcommand*{\EndZeichen}{\texttt{\$}}
\usepackage{mathtools} % coloneqq
\newcommand*{\IC}{\mathbin{{.}\,{.}}} %interval '\IC{}'
\newcommand*{\gauss}[1]{\left\lfloor#1\right\rfloor} %
\newcommand*{\upgauss}[1]{\left\lceil#1\right\rceil} %
\newcommand*{\abs}[1]{\ensuremath{|#1|}} % | |
\newcommand*{\menge}[1]{\ensuremath{\{#1\}}} % | |
\newcommand*{\instancename}[1]{\ensuremath{\mathsf{#1}}} %for instance names
\newcommand*{\LPF} {\instancename{LPF}}
\newcommand*{\LCPA} {\instancename{LCP}}
\newcommand*{\PLCP}{\instancename{PLCP}}
\newcommand*{\ISA} {\instancename{ISA}}
\newcommand*{\SA} {\instancename{SA}}
\newcommand*{\LF} {\instancename{LF}}
\newcommand*{\BWT} {\instancename{BWT}}
\newcommand*{\arrC} {\instancename{C}}
\newcommand*{\textT} {\ensuremath{T}}
\newcommand*{\textS} {\ensuremath{S}}
\newcommand*{\ibeg}[1]{\mathsf{b}(#1)}% beginning position of the interval #1
\newcommand*{\iend}[1]{\mathsf{e}(#1)}% ending position of the interval #1
\newcommand*{\functionname}[1]{{\ensuremath{\renewcommand{\rmdefault}{ptm}\fontfamily{ppl}\selectfont\textrm{\textup{#1}}}}} %for instance names
\newcommand*{\select}{\functionname{select}}
\newcommand*{\rank}{\functionname{rank}}
\newcommand*{\RMQ}{\functionname{RMQ}}
\newcommand*{\lcp}{\functionname{lcp}}
\newcommand*{\lce}{\functionname{lce}}
\newcommand*{\psv}{\functionname{psv}}
\newcommand*{\nsv}{\functionname{nsv}}
\newcommand*{\NN}{\mathbb{N}}
\newcommand*{\argmax}{\operatorname{argmax}}
\newcommand*{\argmin}{\operatorname{argmin}}
\usepackage{tikz}
\usetikzlibrary{matrix,fit}
\usepackage{lilyglyphs}
% -----------------------------------------------------------------------
\begin{document}
\begin{tabular}{*{3}{p{0.33\linewidth}}}
&
\multicolumn{1}{c}{{\Large{\textbf{String Sheet \twoBeamedQuavers}}}}
&
\url{https://github.com/koeppl/stringsheet}
\\
\phantom{x} &
\phantom{x} &
\phantom{x}
\end{tabular}
\raggedright
\footnotesize
\begin{multicols}{2}
\setlength{\premulticols}{1pt}
\setlength{\postmulticols}{1pt}
\setlength{\multicolsep}{1pt}
\setlength{\columnsep}{2pt}
\paragraph{notation}
\begin{multicols}{2}
\begin{itemize}
\item $\prec \coloneqq$ lexicographic order
\item $\varepsilon \coloneqq$ empty string
\item $\textT \coloneqq$ string, $T[\abs{T}] \coloneqq \EndZeichen$, $\EndZeichen < T[i]~\forall i \in [1..\abs{T})$
\item $\textS \lhd \textT :\Leftrightarrow \textS[\lcp(\textS,\textT)] < \textT[\lcp(\textS,\textT)]$
\item $\textS \prec \textT :\Leftrightarrow \textS \lhd \textT \vee \textS$ is proper prefix of $\textT$
\item $w \coloneqq$ word size
\item $n \coloneqq$ length of a given text~$T$
\end{itemize}
\end{multicols}
alphabet $\Sigma$
\begin{multicols}{2}
\begin{itemize}
\item constant $:\Leftrightarrow \abs{\Sigma} = \Oh{1}$
\item integer $:\Leftrightarrow \abs{\Sigma} = n^{\Oh{1}}$
\item finite $:\Leftrightarrow \abs{\Sigma} < \infty$
\item constant $\subset$ integer $\subset$ finite
\end{itemize}
\end{multicols}
entropy for alphabet $\Sigma \coloneqq \menge{c_1, \ldots, c_\sigma}$:
\begin{itemize}
\item $H_0(\textT) \coloneqq (1/|T|)\sum_{j=1}^{\sigma} n_j \lg(|T|/n_j)$, $n_j \coloneqq \abs{\menge{i : \textT[i] = c_j}}$
\item $H_k(\textT) \coloneqq (1/|T|) \sum_{\textS \in \Sigma^k} \abs{\textT_{\textS}} H_0(\textT_{\textS})$,
where $\textT_{\textS}$ is the concatenation of each character in $\textT$ that directly follows an occurrence of the substring~$\textS \in \Sigma^k$ in $\textT$.
\end{itemize}
\section{computational model}
\begin{itemize}
\item cell probe model: no cost for computation, counts only memory access $\Rightarrow$ for lower bounds~\cite{yao81sorted}
\item pointer machine model: time for any random access is constant
\item word RAM model: pointer machine model with access to $\lg n = \Oh{w}$ consecutive bits in constant time~\cite{hagerup98sorting}
\item Transdichotomous model: word RAM model with $\lg n = \Ot{w}$~\cite{fredman93fusion}
\end{itemize}
Word RAM model supports word-packed string $T'[i] = T[(i-1) \gauss{w / \lg\sigma}+1 \IC{} (i+1) \gauss{w/\lg\sigma}]$ with constant time operations
\section{arrays}
\begin{itemize}
\item $\SA$: $\textT[\SA[i-1]\IC{}n] \prec \textT[\SA[i]\IC{}n]~\forall i \in [2\IC{}n]$, suffix array~\cite{manber93sa}
\item $\LCPA[i] = \lcp(\SA[i-1], \SA[i])~\forall i \in [2\IC{}n]$, longest common prefix array
\item $\PLCP[ {\SA[i]} ] \coloneqq \LCPA[i]$, permuted LCP array~\cite{kasai01lcp}
\item $\LPF[j] \coloneqq \max\{\ell \mid \exists i \in [1\IC{}j-1] : \textT[i\IC{}i+\ell-1] = \textT[j\IC{}j+\ell-1]\}$, longest previous factor array~\cite{franek03lpf,crochemore08lpf}
\item $\arrC[i] := \abs{\menge{j \in [1\IC{}n] : \textT[j] < i}}$
\end{itemize}
backward
\begin{itemize}
\item $\LF[i] := C[\BWT[i]] + \BWT.\rank_{L[i]}(i)$
\item $\LF[i] = \ISA[\SA[i] - 1]$~\cite{ferragina05index}
\item $\BWT[i] \coloneqq \textT[\SA[i]-1]~\forall i \not= \ISA[1]$, $\BWT[\ISA[1]] \coloneqq \textT[n] = \EndZeichen$, Burrows-Wheeler transform~\cite{burrows94bwt}
\item $\Phi[i] \coloneqq \SA[ {\ISA[i]} - 1]~\forall i \not= \ISA[1]$, $\Phi[\ISA[1]] \coloneqq n$~\cite{karkkainen09plcp}
\item $\Phi^{k}[i] = \SA[ ({\ISA[i]} + n - k-1 \mod n) + 1]~\forall i,k \in [1\IC{}n]$.
\end{itemize}
\begin{multicols}{2}
\begin{minipage}{\linewidth}
forward
\begin{itemize}
\item $\Psi[i] \coloneqq \ISA[ {\SA[i]} + 1 ]~\forall i \not= \ISA[n]$
\item $\Psi[\ISA[n]] \coloneqq \ISA[1]$~\cite{grossi05csa}
\end{itemize}
\end{minipage}
\begin{minipage}{0.8\linewidth}
\begin{flushright}
\begin{tabular}{|l|l|l|}
\hline
\diagbox{order}{dir} & $\leftarrow$ & $\rightarrow$ \\
\hline
\SA{} & $\LF$ & $\Psi$ \\
\hline
$\textT$ & $\Phi$ & \\
\hline
\end{tabular}%
\end{flushright}
\end{minipage}
\end{multicols}
\begin{itemize}
\item $\Psi^{k}[i] = \SA[ ({\ISA[i]} + k-1 \mod n) + 1]~\forall i,k \in [1\IC{}n]$.
\item $\Psi[i] = \BWT.\select_{T[\SA[i]]}(i - C[ T[\SA[i]]] )$~\cite{lee09rank}
\end{itemize}
properties
\begin{itemize}
\item $\Psi \mid_{[C[c]+1,C[c+1]]}$ strictly increasing $\forall c \in \Sigma$.
\item $T[\SA[i]] = c \wedge \BWT[\Psi[i]] = c~\forall i \in [C[c]+1,C[c+1]]~\forall c \in \Sigma$
\end{itemize}
reducible LCP values
\begin{itemize}
\item $\LCPA[i] = \PLCP[\SA[i]]$ reducible $:\Leftrightarrow$ $\BWT[i] = \BWT[i-1]$.
\item $\PLCP[i+1]$ reducible $\Leftrightarrow T[i] = T[\Phi[i]] \wedge \Psi[\ISA[\Phi[i]]] = \Psi[\ISA[i]]-1$. \cite{siren10plcp}
\item $\PLCP[i]$ reducible $\Rightarrow \PLCP[i] = \PLCP[i-1] - 1 \wedge \Phi[i] = \Phi[i-1]+1$. \cite{karkkainen09plcp}
\end{itemize}
\section{trees}
\begin{multicols}{2}
\begin{tikzpicture}[every node/.style={shape=circle,draw,inner sep=0.1em},scale=0.5, sibling distance=7em]
\node {1}
child {node {2}
child {node {3}}
child {node {4}
child {node {5}}
child {node {6}}
}
child {node {7}}
}
child {node {8} }
child {node {9}
child {node {10}}
child {node {11}
child {node {12}}
}
}
;
\end{tikzpicture}
\begin{itemize}
\item DFUDS~\cite{benoit05dfuds}
\item LOUDS~\cite{jacobson89rank}
\item BP~\cite{jacobson89rank}
\end{itemize}
$2n + \Oh{1}$ bits for $n$ nodes.
\end{multicols}
\tikzstyle{mymatrix} = [matrix of nodes,nodes in empty cells
,row sep=0
,inner sep=0.4em
,row 1/.style={nodes={font=\tiny,inner sep=0}}
,row 3/.style={nodes={font=\scriptsize,inner sep=0}}
,row 4/.style={nodes={font=\scriptsize}}
,column 1/.style={nodes={text width=3.5em}}
]
\begin{tikzpicture}
\matrix (DFUDS) [mymatrix]
{%
& 1& 2& 3&4& 5& 6&7& 8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24\\
DFUDS & ( & ( & ( & ( & ) & ( & ( & ( & ) & ) & ( & ( & ) & ) & ) & ) & ) & ( & ( & ) & ) & ( & ) & ) \\
id & & & & & & & & & & & & & & & & & & & & & & & & \\
};
\newcommand*{\DrawId}[3]{%
\node[fit=(DFUDS-3-#1)(DFUDS-3-#2),font=\scriptsize]{#3};
\begin{scope}[transform canvas={yshift=-0.1em}]
\draw (DFUDS-2-#1.south |- DFUDS-2-1.south) -- (DFUDS-2-#2.south |- DFUDS-2-1.south);
\end{scope}
}
\DrawId{3}{6}{1}
\DrawId{7}{10}{2}
\DrawId{11}{11}{3};
\DrawId{12}{14}{4};
\DrawId{15}{15}{5};
\DrawId{16}{16}{6};
\DrawId{17}{17}{7};
\DrawId{18}{18}{8};
\DrawId{19}{21}{9};
\DrawId{22}{22}{10};
\DrawId{23}{24}{11};
\DrawId{25}{25}{12};
\end{tikzpicture}
\begin{tikzpicture}
\matrix (LOUDS) [mymatrix]
{%
& 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25\\
LOUDS & ( & ) & ( & ( & ( & ) & ( & ( & ( & ) & ) & ( & ( & ) & ) & ( & ( & ) & ) & ) & ( & ) & ) & ) & ) \\
id & 1 & & 2 & 8 & 9 & & 3 & 4 & 7 & & &10 &11 & & & 5 & 6 & & & & 12 & & & & \\
parent & & & & & & & & & & & & & & & & & & & & & & & & & \\
};
\newcommand*{\DrawParent}[3]{%
\node[fit=(LOUDS-4-#1)(LOUDS-4-#2),font=\scriptsize]{#3};
\begin{scope}[transform canvas={yshift=-0.1em}]
\draw (LOUDS-3-#1.south |- LOUDS-3-1.south) -- (LOUDS-3-#2.south |- LOUDS-3-1.south);
\end{scope}
}
\DrawParent{4}{7}{1}
\DrawParent{8}{11}{2}
\DrawParent{12}{12}{8}
\DrawParent{13}{15}{9}
\DrawParent{16}{16}{3}
\DrawParent{17}{19}{4}
\DrawParent{20}{20}{7}
\DrawParent{21}{21}{10}
\DrawParent{22}{23}{11}
\DrawParent{24}{24}{5}
\DrawParent{25}{25}{6}
\DrawParent{26}{26}{12}
\end{tikzpicture}
\begin{tikzpicture}
\matrix (BP) [mymatrix]
{%
& 1& 2& 3&4& 5& 6&7& 8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24\\
BP & (& (& (&)& (& (&)& (&)& )& (&)& )& (&)& (& (&)& (& (&)& )& )& ) \\
& & & & & & & & & & & & & & & & & & & & & & & & \\
};
\newcommand*{\DrawId}[4]{%
\draw (BP-2-#1.south |- BP-2-1.south) |- node [midway,anchor=north] {#3} ([yshift=-#4]BP-2-#2.south) -- (BP-2-#2.south |- BP-2-1.south);
}
\DrawId{4}{5}{3}{0.5em}
\DrawId{6}{11}{4}{2em}
\DrawId{7}{8}{5}{0.5em}
\DrawId{9}{10}{6}{0.5em}
\DrawId{12}{13}{7}{0.5em}
\DrawId{3}{14}{2}{3.5em}
\DrawId{15}{16}{8}{0.5em}
\DrawId{18}{19}{10}{0.5em}
\DrawId{21}{22}{12}{0.5em}
\DrawId{20}{23}{11}{2em}
\DrawId{17}{24}{9}{3.5em}
\DrawId{2}{25}{1}{5em}
\end{tikzpicture}
\section{regularity}
\begin{itemize}
\item $p \le \abs{T}/2$ period of $T :\Leftrightarrow \textT[i+p] = \textT[i] \forall i\in[1\IC{}\abs{T}-p]$
\item $T$ primitive $:\Leftrightarrow \nexists$ period of $T$
\item exponent $\exp(T) \coloneqq \abs{T}/p$, $p:$ minimal period of $T$
\end{itemize}
Periodicity Lemma~\cite{fine65uniqueness}:
$\textT$ has periods~$p$ and~$p'$ with $p+p' \le \abs{\textT} \Rightarrow \gcd(p,p')$ is period of~$\textT$.
\begin{itemize}
\item square $U^2$ irreducible $:\Leftrightarrow U$ is not a repetition.
\item square $U^2$ minimal $:\Leftrightarrow \nexists P$ proper prefix of $U^2 : P$ is square
\item square $U^2$ minimal $\Rightarrow U^2$ is irreducible
\end{itemize}
Three Squares Lemma~\cite{fan06periodicity}: If
\begin{multicols}{3}
\begin{itemize}
\item $U$ not a repetition,
\item $\nexists j \in \NN : V \not= U^j$,
\item $U^2$ prefix of $V^2$, and
\item $V^2$ proper prefix of $W^2$,
\item[$\Rightarrow$] $|W| \ge |U| + |V|$.
\end{itemize}
\end{multicols}
%TODO: period, exponent, primitive, palindrome, square
%TODO: runs theorem: #runs, #exponents
\section{Lyndon}
$\textT$ Lyndon $:\Leftrightarrow \textT \lhd \textT[i\IC{}] \forall i \in [2\IC{}\abs{\textT}]$
If $\textT$ Lyndon, then
\begin{multicols}{2}
\begin{itemize}
\item $\nexists$ period of $\textT$
\item $\textT$ is border-free
\item $\textT \prec \textS \wedge \textS$ Lyndon $\Rightarrow \textT \prec \textT\textS \prec \textS \Rightarrow \textT \textS$ Lyndon \cite{chen58lyndon}
\end{itemize}
\end{multicols}
\section{factorization}
Let $\textT = F_1 \cdots F_z$.
\paragraph{Lyndon factorization}
\begin{itemize}
\item $F_i$ Lyndon $\forall i \in [1\IC{}z] \wedge F_i \succeq F_{i+1}~\forall i\in[1\IC{}z)$ \cite{chen58lyndon}
\item $F_i = \textT[\ibeg{F_i} \IC{} x]$ where $x \coloneqq \argmin_{j > \ibeg{F_i}} \ISA[j] > \ISA[\ibeg{F_i}]$
\item $F_i$ longest Lyndon prefix of $\textT[\ibeg{F_i}\IC{}]$
\end{itemize}
Standard factorization: $T = UV$, where $V$ is the smallest proper suffix of $V$.
\newcommand*{\SubStrPrev}[2]{\mathcal{S}_{#1}(#2)}
\paragraph{Classic LZ77-factorization}
$F_x$ is the shortest prefix of $F_x \cdots F_z$ occurring exactly once in $F_1 \cdots F_x$~\cite{ziv77lz}.
\paragraph{LZ78 factorization}
$F_x=F'_x c$ with $F'_x = \argmax_{S \in \menge{F_y \mid y < x} \cup \menge{\varepsilon} } \abs{S}$ and $c\in\Sigma$, $\forall x \in [1\IC{} z]$~\cite{ziv78lz}.
\paragraph{$s$-factorization}
$F_x \coloneqq \argmax_{S \in \SubStrPrev{j}{T} \cup \Sigma} \abs{S}~\forall x \in [1\IC{} z]$, where $j \coloneqq \abs{F_1\cdots F_{x-1}}+1$
and $\SubStrPrev{j}{\textT}$ is the set of substrings of $\textT$ starting \emph{strictly} before~$j$~\cite{storer82lzss}.
Equivalently: $F_i = T[k\IC{}k+\max(1,\LPF[k])]$ with $k \coloneqq \sum_{j=1}^{i-1}\abs{F_{j}}+1$ for $1 \le i \le z$.
\paragraph{Non-overlapping $s$-factorization}
$F_x \coloneqq \argmax \menge{ \abs{S} \mid S \in \Sigma^* \text{~occurs in~} T[1\IC{}j] \text{~or~} S \in \Sigma}~\forall
x \in [1\IC{}z]$, where $j \coloneqq \abs{F_1\cdots F_{x-1}}$.
$\delta(T) := \max_{k \in [1..n]} |\{ T[i..i+k-1] \mid i \in [1..n-k+1] \}|/k$~\cite{raskhodnikova13sublinear}.
SAIS
\begin{itemize}
\item $\textT[i] < \textT[i+1] \Rightarrow \textT[i\IC{}]$ is $S$-type ($\textT[i\IC{}] \prec \textT[i+1\IC{}]$)
\item $\textT[i] > \textT[i+1] \Rightarrow \textT[i\IC{}]$ is $L$-type ($\textT[i\IC{}] \succ \textT[i+1\IC{}]$)
\item $\textT[i] = \textT[i+1] \Rightarrow \textT[i\IC{}]$ has same type as $\textT[i+1\IC{}]$
\item $\textT[i\IC{}]$ is $S$-type $\wedge$ $\textT[i-1\IC{}]$ is $L$-type $\Rightarrow \textT[i\IC{}]$ is $S^*$-type
\end{itemize}
operations
\begin{itemize}
\item $\textT.\psv(j) \coloneqq \max \{ k < j \mid \textT[k] < \textT[j] \}$ previous smaller value
\item $\textT.\nsv(j) \coloneqq \min \{ k > j \mid \textT[k] < \textT[j] \}$ next smaller value
\item $\textT.\rank_c(j) \coloneqq \abs{\menge{ k \in [1\IC{}j] \mid \textT[k] = c } }$ rank query
\item $\textT.\select_c(k) \coloneqq \min \menge{j \mid \textT.\rank_c(j) = k}$ select query
\item $\textT.\RMQ[a,b] \coloneqq \argmin_{i \in [a\IC{}b]} T[i]$ range minimum query
\item $\textT.\lce(a,b) \coloneqq \lcp(T[a\IC{}],T[b\IC{}]) = \LCPA.\RMQ[\min(\ISA[a],\ISA[b])+1\IC{}\max(\ISA[a],\ISA[b])]$ longest common extension
\end{itemize}
Backward Search of FM-index~\cite{ferragina00fmindex}:
\begin{itemize}
\item $P:$ pattern
\item $R_i$: range of the pattern $P[i\IC{}n]$, i.e., $\textT[\SA[j]\IC{}\SA[j]+i-1] = P[i\IC{}n] \Leftrightarrow j \in R_i$
\item $\ibeg{R_i} = \arrC[P[i]] + \BWT.\rank_{P[i]}(\ibeg{R_{i+1}}-1)+1$
\item $\ibeg{R_i} = \LF[ \BWT.\select_{P[i]}( \BWT.\rank_{P[i]}(\ibeg{R_{i+1}}-1)+1)]$
\item $\iend{R_i} = \arrC[P[i]] + \BWT.\rank_{P[i]}(\iend{R_{i+1}})$
\end{itemize}
%% IBWT: String Inference from Longest-Common-Prefix Array
%%TODO: Karp-Rabin, collision probability
Stirling's formula:
\begin{itemize}
\item $n! = n^n e^{-n} \Oh{\sqrt{n}}$
\item $\lg (n!) = n \lg n - n \lg e + \Oh{\log n}$
\item $\lg \binom{n}{m} = n \lg{n} - m \lg{m} - (n-m) \lg (n-m) - \Oh{\log{n}}$
\end{itemize}
\end{multicols}
% \newpage
\begin{multicols}{3}
\tiny
\bibliographystyle{abbrv}
\bibliography{literature}
\end{multicols}
\end{document}