The \textit{$k^2$-tree} is a compact data structure designed to efficiently store sparse binary matrices leveraging both sparsity and clustering of nonzero elements. This representation efficiently supports navigational operations and complex binary operations, such as matrix-matrix multiplication, while maintaining space efficiency. The standard $k^2$-tree follows a level-by-level representation, which, while effective, prevents further compression of identical subtrees and it is not cache friendly when accessing individual subtrees. In this work, we introduce some novel depth-first representations of the $k^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 representation is a strategy worth pursuing: for the adjacency matrix of web graphs exploiting the presence of identical subtrees does improve both compression ratio and peak memory usage, and for some matrices, depth-first representations turn out to be faster than the standard $k^2$-tree in computing the matrix-matrix multiplication.

Depth First Representations of k2-trees

Gabriel Alfredo Carmona Tabja
;
Giovanni Manzini
2025-01-01

Abstract

The \textit{$k^2$-tree} is a compact data structure designed to efficiently store sparse binary matrices leveraging both sparsity and clustering of nonzero elements. This representation efficiently supports navigational operations and complex binary operations, such as matrix-matrix multiplication, while maintaining space efficiency. The standard $k^2$-tree follows a level-by-level representation, which, while effective, prevents further compression of identical subtrees and it is not cache friendly when accessing individual subtrees. In this work, we introduce some novel depth-first representations of the $k^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 representation is a strategy worth pursuing: for the adjacency matrix of web graphs exploiting the presence of identical subtrees does improve both compression ratio and peak memory usage, and for some matrices, depth-first representations turn out to be faster than the standard $k^2$-tree in computing the matrix-matrix multiplication.
2025
978-3-032-05228-5
978-3-032-05227-8
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11568/1342834
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact