The problem of Permutation Pattern Matching (PPM) asks, given a permutation , viewed as the point set , and a pattern of small length , whether contains an order-isomorphic copy of . The PPM problem and its (exact and approximate) counting variants have been studied extensively in the literature. We consider a preprocessing-query version: after preprocessing , one must determine whether a query contains , where is obtained by intersecting with a geometric shape (e.g., an axis-aligned rectangle or such rectangles). This naturally generalizes the classical range query problem in computational geometry, which corresponds to the case . We extend the study of this problem from patterns of length to patterns of length (and in some cases beyond), and prove new fine-grained equivalences, separations, and applications: (1) Single rectangle: For all patterns of length , detection can be done with preprocessing and query time. The proof goes through a new tool of independent interest: reductions from rectangle queries to a simpler family of slab queries. (2) Multiple rectangles: For , detection is equivalent to the online set disjointness problem; we also show connections to online -set disjointness. To our knowledge, this is the first equivalence between a PPM-type problem and online set disjointness, a problem playing a fundamental role in fine-grained complexity. (3) Counting: As applications, we obtain an time algorithm for exact counting of -patterns based on the rectangle-to-slab reduction, improving upon [Beniamini and Lavee, ICALP 2025], and an approximate counting algorithm for -patterns, the first to break the barrier for -patterns.

生成讲解博客的中文版本

生成AI智能校验的中文版本