Permutation Matching Under Parikh Budgets: Linear-Time Detection, Packing, and Disjoint Selection
MD Nazmul Alam Shanto, Md. Tanzeem Rahat, Md. Manzurul Hasan

TL;DR
This paper introduces efficient linear-time algorithms for permutation pattern matching, packing, and disjoint selection based on Parikh vector differences, connecting string matching with packing optimization.
Contribution
It presents a unified sliding-window framework for permutation matching and introduces a novel packing variant, MFSP, with linear-time solutions and a greedy approach for disjoint match selection.
Findings
Permutation matching achieved in O(n + σ) time and space.
MFSP problem solved efficiently with a two-pointer algorithm.
Disjoint occurrence selection can be optimized with a greedy strategy.
Abstract
We study permutation (jumbled/Abelian) pattern matching over a general alphabet . Given a pattern P of length m and a text T of length n, the classical task is to decide whether T contains a length-m substring whose Parikh vector equals that of P . While this existence problem admits a linear-time sliding-window solution, many practical applications require optimization and packing variants beyond mere detection. We present a unified sliding-window framework based on maintaining the Parikh-vector difference between P and the current window of T , enabling permutation matching in O(n + {\sigma}) time and O({\sigma}) space, where {\sigma} = |{\Sigma}|. Building on this foundation, we introduce a combinatorial-optimization variant that we call Maximum Feasible Substring under Pattern Supply (MFSP): find the longest substring S of T whose symbol counts are component-wise bounded by…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Network Packet Processing and Optimization · Genome Rearrangement Algorithms
