English

Revisiting the Sparse Matrix Compression Problem

Data Structures and Algorithms 2026-02-18 v1

Abstract

The sparse matrix compression problem asks for a one-dimensional representation of a binary n×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+\rho or restricting the shift function up to values of ρ\rho is NP-complete (cf. the textbook of Garey and Johnson). As a practical heuristic, a greedy algorithm has been proposed to shift the ii-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 Θ(+ρ)\Theta(\sqrt{\ell+\rho}). 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.

Keywords

Cite

@article{arxiv.2602.15314,
  title  = {Revisiting the Sparse Matrix Compression Problem},
  author = {Vincent Jugé and Dominik Köppl and Vincent Limouzy and Andrea Marino and Jannik Olblich and Giulia Punzi and Takeaki Uno},
  journal= {arXiv preprint arXiv:2602.15314},
  year   = {2026}
}