Problem
Given a pattern and a text over a general alphabet, decide whether the text contains a window whose Parikh vector matches the pattern, then solve packing and disjoint-selection variants.
arXiv ยท January 2026
Linear-time detection, packing, and disjoint selection for jumbled-pattern matching by MD Nazmul Alam Shanto, Md. Tanzeem Rahat, and Md. Manzurul Hasan.
Given a pattern and a text over a general alphabet, decide whether the text contains a window whose Parikh vector matches the pattern, then solve packing and disjoint-selection variants.
Parikh-vector matching connects string algorithms with resource budgets, frequency constraints, and optimization tasks that appear beyond plain exact pattern detection.
Maintain the Parikh-vector difference between the pattern and the current window, then use sliding-window and greedy interval structure for the associated variants.
The paper presents O(n + sigma)-time and O(sigma)-space detection and packing algorithms, plus linear-time disjoint selection after match enumeration.
The useful abstraction is seeing symbol counts not only as a matching condition, but also as a supply budget for exact packing.