🤖 AI Summary
This study addresses the problem of efficiently compressing sparse binary matrices under a one-dimensional representation that supports constant-time element access while minimizing storage overhead. The authors formulate a compression model using integer arrays and row shift functions, and establish the NP-completeness of the problem under various parameter settings through computational complexity analysis and parameterized algorithm design. They provide the first approximation ratio for the classical greedy algorithm, showing it to be Θ(√(ℓ+ρ)), and propose an improved variant that reduces array length. Furthermore, for instances with doubly logarithmic or logarithmic width, they devise dynamic programming algorithms that yield exact and efficient solutions.
📝 Abstract
The sparse matrix compression problem asks for a one-dimensional representation of a binary $n \times \ell$ matrix, formed by an integer array of row indices and a shift function for each row, such that accessing a matrix entry is possible in constant time by consulting this representation. It has been shown that the decision problem for finding an integer array of length $\ell+ρ$ or restricting the shift function up to values of $ρ$ is NP-complete (cf. the textbook of Garey and Johnson). As a practical heuristic, a greedy algorithm has been proposed to shift the $i$-th row until it forms a solution with its predecessor rows. Despite that this greedy algorithm is cherished for its good approximation in practice, we show that it actually exhibits an approximation ratio of $Θ(\sqrt{\ell+ρ})$. We give further hardness results for parameterizations such as the number of distinct rows or the maximum number of non-zero entries per row. Finally, we devise a DP-algorithm that solves the problem for double-logarithmic matrix widths or logarithmic widths for further restrictions. We study all these findings also under a new perspective by introducing a variant of the problem, where we wish to minimize the length of the resulting integer array by trimming the non-zero borders, which has not been studied in the literature before but has practical motivations.