English

Depth first representations of $k^2$-trees

Data Structures and Algorithms 2025-05-19 v1

Abstract

The k2k^2-tree is a compact data structure designed to efficiently store sparse binary matrices by leveraging both sparsity and clustering of nonzero elements. This representation supports efficiently navigational operations and complex binary operations, such as matrix-matrix multiplication, while maintaining space efficiency. The standard k2k^2-tree follows a level-by-level representation, which, while effective, prevents further compression of identical subtrees and it si not cache friendly when accessing individual subtrees. In this work, we introduce some novel depth-first representations of the k2k^2-tree and propose an efficient linear-time algorithm to identify and compress identical subtrees within these structures. Our experimental results show that the use of a depth-first representations is a strategy worth pursuing: for the adjacency matrix of web graphs exploiting the presence of identical subtrees does improve the compression ratio, and for some matrices depth-first representations turns out to be faster than the standard k2k^2-tree in computing the matrix-matrix multiplication.

Keywords

Cite

@article{arxiv.2505.11302,
  title  = {Depth first representations of $k^2$-trees},
  author = {Gabriel Carmona and Giovanni Manzini},
  journal= {arXiv preprint arXiv:2505.11302},
  year   = {2025}
}

Comments

extended submission for SPIRE 2025

R2 v1 2026-06-28T23:36:07.937Z