In this paper we extend to two-dimensional data two recently introduced one-dimensional compressibility measures: the $\gamma$ measure defined in terms of the smallest string attractor, and the $\delta$ measure defined in terms of the number of distinct substrings of the input string. Concretely, we introduce the two-dimensional measures $\gamma_{2D}$ and $\delta_{2D}$ as natural generalizations of $\gamma$ and $\delta$ and study some of their properties. Among other things, we prove that $\delta_{2D}$ is monotone and can be computed in linear time, and we show that, although it is still true that $\delta_{2D} \leq \gamma_{2D}$, the gap between the two measures can be $\Omega(\sqrt{n})$ for families of $n\times n$ matrices and therefore asymptotically larger than the gap in one-dimension. To complete the scenario of two-dimensional compressibility measures, we introduce also the measure $b_{2D}$ which generalizes to two dimensions the notion of optimal parsing. We prove that, somewhat surprisingly, the relationship between $b_{2D}$ and $\gamma_{2D}$ is significantly different than in the one-dimensional case. As an application of the measures $\gamma_{2D}$ and $\delta_{2D}$ we provide the first analysis of the space usage of the two-dimensional block tree introduced in [Brisaboa et al., Two-dimensional block trees, The computer Journal, 2023]. Finally, we present a linear time algorithm for constructing the two-dimensional block tree for arbitrary matrices, that is asymptotically faster than the (probabilistic) known solution which can only be used for binary matrices.
翻译:本文将最近提出的两种一维压缩性测度——基于最小字符串吸引子的$\gamma$测度和基于输入字符串不同子串数量的$\delta$测度——扩展到二维数据。具体而言,我们引入$\gamma_{2D}$和$\delta_{2D}$作为$\gamma$和$\delta$的自然推广,并研究其若干性质。我们证明$\delta_{2D}$具有单调性且可在线性时间内计算;同时表明,尽管$\delta_{2D} \leq \gamma_{2D}$仍然成立,但对于$n\times n$矩阵族而言,两种测度之间的差距可达$\Omega(\sqrt{n})$,因此渐近地大于一维情况下的差距。为完善二维压缩性测度的理论框架,我们还引入$b_{2D}$测度,该测度将最优解析的概念推广至二维。我们证明了一个令人意外的结果:$b_{2D}$与$\gamma_{2D}$之间的关系与一维情况存在显著差异。作为$\gamma_{2D}$和$\delta_{2D}$测度的应用,我们首次分析了[Brisaboa等人,《二维块树》,Computer Journal,2023]提出的二维块树的空间使用情况。最后,我们提出了一种针对任意矩阵的线性时间二维块树构建算法,其渐近速度优于仅适用于二值矩阵的现有(概率性)解法。