Collection of algorithms for String Algorithms course (summer semesters 2019/20, 2021/22) 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
- Galil-Seiferas 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
- Crochemore algorithm for ordered alphabets
- 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
- Wee LCP (Fischer) 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
- Hunt-Szymanski algorithm
- Hunt-Szymanski-Apostolico 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
- Teng-Yao algorithm
- Paluch-Elbassioni-van Zuylen algorithm
- Crochemore-Ilie-Smyth incomplete factorization algorithm
- Approximate matching of string permutation algorithm (Grossi, Luccio)
- Longest previous factor algorithm (Crochemore, Ilie, Smyth)
- Duval algorithm
- Maximum suffix algorithm based on prefix-suffix array
- Maximum suffix algorithm in constant space, based on critical factorization
- Adamczyk-Rytter maximum suffix algorithm
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