Collection of algorithms for String Algorithms course (summer semester 2019/20) at Jagiellonian University, Theoretical Computer Science Department.
- Morris-Pratt and Knuth-Morris-Pratt algorithms
- Boyer-Moore algorithm with many variants
- Boyer-Moore-Apostolico-Giancarlo algorithm
- Constant space two-way (Crochemore-Perrin) algorithm
- fast-on-average (Crochemore et al.) algorithm
- Turbo Boyer-Moore (Crochemore et al.) algorithm
- Bitap Shift-Add (Baeza-Yates-Gonnet) algorithm
- Hashing-based (Karp-Rabin) algorithm
- Weiner algorithm
- McCreight algorithm
- Ukkonen on-line algorithm
- Farach algorithm
- Prefix doubling (Karp-Miller-Rosenberg) algorithm
- Larsson-Sadakane algorithm
- Skew (Kärkkäinen-Sanders) algorithm
- Induced sorting (Zhang-Nong-Chan) algorithm
- Small-large (Ko-Aluru) algorithm
-
$O(m \log{n})$ naive algorithm - Manber-Myers
$O(m + \log{n})$ algorithm
- Kasai et al. algorithm
-
$\phi$ array-based (Kärkkäinen-Manzini-Puglisi) algorithm - Irreducible LCPs-based (Kärkkäinen-Manzini-Puglisi) algorithm
- Aho-Corasick algorithm
- Commentz-Walter algorithm
- fast-on-average (Crochemore et al.) algorithm
- Needleman-Wunsch algorithm
- Hirschberg algorithm
- Four Russians (Masek-Paterson) algorithm
- Myers algorithm
- Kumar-Rangan algorithm
- Landau-Vishkin algorithm
- Bitap Shift-Add (Baeza-Yates-Gonnet) algorithm
- Grossi-Luccio algorithm
- Approximate Boyer-Moore (Tarhio-Ukkonen) algorithm
- Basic algorithm based on FFT
- Clifford-Clifford algorithm
- Nonrecursive randomised algorithm (Clifford, Eremenko et al.)
- Recursive randomised algorithm (Clifford, Eremenko et al.)
- Nonrecursive deterministic algorithm (Clifford, Eremenko et al.)
-
$\log{n}$ -approximation (Li-Jiang) algorithm -
$4$ - and$3$ -approximation (Blum et al.) algorithms based on overlaps - Greedy overlap algorithm
- Approximate matching of string permutation (Grossi, Luccio)
- Maximum suffix algorithm based on prefix-suffix array
- Maximum suffix algorithm in constant space, based on critical factorization
Run all small tests:
python3 -B -m unittest discover test -v
Run example large test:
LARGE=1 python3 -B -m unittest test.test_exact_string_matching.TestExactStringMatching -v