Conceptual

Suffix-Tree Algorithm and Average-Case Analysis for Binary Jumbled Indexing

The binary jumbled indexing problem preprocesses a binary string so that one can quickly decide whether some substring has a given number of zeros and ones (a Parikh vector). This work analyses why the standard run-based construction is quadratic even on average -- proving that a random binary string has about n/4 runs -- and presents SFTree, a suffix-tree-based construction that removes duplicate substrings and, though still quadratic in theory, wins in practice by cutting memory-access cost through vectorization. Students learn how run structure controls the cost of jumbled indexing, how average-case analysis is carried out over random strings, and how a suffix tree turns repeated substructure into a practical speedup.