On coding labeled trees

  • Authors:
  • Saverio Caminiti;Irene Finocchi;Rossella Petreschi

  • Affiliations:
  • Dipartimento di Informatica, Università degli Studi di Roma La Sapienza, Via Salaria 113, 00198 Roma, Italy;Dipartimento di Informatica, Sistemi e Produzione, Università degli Studi di Roma Tor Vergata, Via del Politecnico 1, 00133 Roma, Italy;Dipartimento di Informatica, Università degli Studi di Roma La Sapienza, Via Salaria 113, 00198 Roma, Italy

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2007

Quantified Score

Hi-index 5.23

Visualization

Abstract

We consider the problem of coding labeled trees by means of strings of node labels. Different codes have been introduced in the literature by Prüfer, Neville, and Deo and Micikevičius. For all of them, we show that both coding and decoding can be reduced to integer (radix) sorting, closing several open problems within a unified framework that can be applied both in a sequential and in a parallel setting. Our sequential coding and decoding schemes require optimal O(n) time when applied to n-node trees, yielding the first linear time decoding algorithm for a code presented by Neville. These schemes can be parallelized on the EREW PRAM model, so as to work in O(logn) time with cost O(n), , or O(nlogn), depending on the code and on the operation: in all cases, they either match or improve the performances of the best ad hoc approaches known so far.