English

FunSeqSet: Towards a Purely Functional Data Structure for the Linearisation Case of Dynamic Trees Problem

Data Structures and Algorithms 2019-08-30 v1 Programming Languages

Abstract

Dynamic trees, originally described by Sleator and Tarjan, have been studied deeply for non persistent structures providing O(logn)\mathcal{O}(\log n) time for update and lookup operations as shown in theory and practice by Werneck. However, discussions on how the most common dynamic trees operations (i.e. link and cut) are computed over a purely functional data structure have not been studied. Even more, asking whether vertices uu and vv are connected (i.e. within the same forest) assumes that corresponding indices or locations for uu and vv are taken for granted in most of the literature, and not performed as part of the whole computation for such a question. We present FunSeqSet, based on the primitive version of finger trees, i.e. the de facto sequence data structure for the purely functional programming language Haskell, augmented with variants of the collection (i.e. sets) data structures in order to manage efficiently kk-ary trees for the linearisation case of the dynamic trees problem. Different implementations are discussed, and the performance is measured.

Keywords

Cite

@article{arxiv.1908.11105,
  title  = {FunSeqSet: Towards a Purely Functional Data Structure for the Linearisation Case of Dynamic Trees Problem},
  author = {Juan Carlos Saenz-Carrasco},
  journal= {arXiv preprint arXiv:1908.11105},
  year   = {2019}
}

Comments

Part of DECLARE 19 proceedings

R2 v1 2026-06-23T10:59:42.832Z