Skip to main content
QUICK REVIEW

[论文解读] Counting Small Permutation Patterns

Chaim Even‐Zohar, Calvin Leng|arXiv (Cornell University)|Nov 4, 2019
Bayesian Methods and Mixture Models被引用 4
一句话总结

本文提出了角落树公式,一种代数框架,可实现近乎线性时间计算小规模排列模式——具体包括所有2-和3-模式、八个4-模式,以及23个4-模式的独立线性组合——通过多维前缀和树与分治策略。关键贡献是针对剩余一个4-模式的近乎最优 $\frac{1}{2}$-时间算法,实现 $\tilde{O}(n^{3/2})$ 的时间复杂度,优于以往非参数独立性检验的方法。

ABSTRACT

A sample of n generic points in the xy-plane defines a permutation that relates their ranks along the two axes. Every subset of k points similarly defines a pattern, which occurs in that permutation. The number of occurrences of small patterns in a large permutation arises in many areas, including nonparametric statistics. It is therefore desirable to count them more efficiently than the straightforward ~O(n^k) time algorithm. This work proposes new algorithms for counting patterns. We show that all patterns of order 2 and 3, as well as eight patterns of order 4, can be counted in nearly linear time. To that end, we develop an algebraic framework that we call corner tree formulas. Our approach generalizes the existing methods and allows a systematic study of their scope. Using the machinery of corner trees, we find twenty-three independent linear combinations of order-4 patterns, that can be computed in time ~O(n). We also describe an algorithm that counts one of the remaining 4-patterns, and hence all 4-patterns, in time ~O(n^(3/2)). As a practical application, we provide a nearly linear time computation of a statistic by Yanagimoto (1970), Bergsma and Dassios (2010). This statistic yields a natural and strongly consistent variant of Hoeffding's test for independence of X and Y, given a random sample as above. This improves upon the so far most efficient ~O(n^2) algorithm.

研究动机与目标

  • 开发高效算法用于计算小规模排列模式,这些模式在非参数统计与组合数学中至关重要。
  • 克服朴素模式计数方法在大小为 $n$ 的排列中对 $k$-模式计数的 $\tilde{O}(n^k)$ 时间瓶颈。
  • 通过代数框架推广现有方法,系统性地捕捉高效模式计数的适用范围。
  • 通过加速模式计数,实现更快的基于秩的统计检验(如Hoeffding与Yanagimoto独立性检验)。
  • 探索模式计数的计算极限,识别哪些模式线性组合可实现高效算法。

提出的方法

  • 作者引入了'角落树公式'——一种代数框架,将模式计数建模为排列中相对顺序在树状结构配置上的求和。
  • 使用二维前缀和树高效维护和查询横条带中元素对的信息,从而实现对复杂4-模式(如3241与3214)的快速计数。
  • 算法将排列划分为 $m = \tilde{O}(\tbinom{n}{k})$ 个条带,通过在 $\tilde{O}(n^{2-a})$ 时间与 $\tilde{O}(n^{1+a})$ 空间之间权衡,实现计算与空间的平衡,其中 $a \to 0.5$。
  • 对于3241模式,结合自底向上的扫描与稀疏2D前缀和树上的框查询,实现对321与34对有效合并的计数,时间复杂度为 $\tilde{O}(n^{3/2})$。
  • 该方法通过将模式的线性组合表示为角落树上的求和,推广至动态规划在树结构上的高效评估。
  • 该方法已实现于Python包 `cornertree.py` 中,包含一个 `ProductTree` 类,用于高效支持2D范围查询。

实验结果

研究问题

  • RQ1若模式计数或其线性组合未被角落树张成,是否可在 $\tilde{O}(n)$ 时间内计算?
  • RQ2排列的完整4-轮廓的计算复杂度是多少?
  • RQ3由 $k$-顶点角落树张成的模式组合空间的维度是多少?它是否能张成所有 $k$-模式?
  • RQ4是否存在其他超越角落树的树状结构,可产生高效的模式计数算法?
  • RQ5对于一般 $k$,使得 $k$-轮廓可在 $\tilde{O}(n^{d(k)})$ 时间内计算的最小 $d(k)$ 是多少?

主要发现

  • 所有2-和3-模式,以及八个特定4-模式,均可使用角落树公式在 $\tilde{O}(n)$ 时间内计数。
  • 本文识别出23个独立的4-模式线性组合,可在 $\tilde{O}(n)$ 时间内计算,扩展了高效计数的适用范围。
  • 提出一种新颖算法,可在 $\tilde{O}(n^{3/2})$ 时间内计数3241模式,这意味着所有4-模式均可在相同时间复杂度内计数。
  • 该方法将Yanagimoto独立性检验统计量的计算复杂度从 $\tilde{O}(n^2)$ 提升至 $\tilde{O}(n^{3/2})$,达到当前最优水平。
  • 作者计算了 $k \leq 7$ 时由 $k$-顶点角落树张成的模式组合空间,发现此类树的数量增长为 $O(11.07^k)$,相比 $k!$ 为次指数级。
  • 该框架使高效模式计数的系统性研究成为可能,并提示通过更精细的分类划分或替代树结构,未来可能实现进一步优化。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。