English

Fully Persistent Dynamic LCE via AVL Trees and AVL Grammars

Data Structures and Algorithms 2026-07-02 v1

Abstract

We study fully persistent dynamic strings with equality and longest common extension (LCE) queries. Straightforward full persistence is problematic for the splay-based FeST structure, since the same unbalanced past version can be reused indefinitely and the usual amortized analysis no longer applies. We give a fully persistent dynamic LCE structure, called FeAVL, based on path copying over AVL trees. For an operation involving string(s) of total length nn, it supports split, concatenate, and single-character updates in worst-case O(logn)O(\log n) time, equality in worst-case O(logn)O(\log n) time w.h.p., and LCE in worst-case O(logn+log2)O(\log n+\log^2\ell) time w.h.p., where \ell is the answer; each update creates only O(logn)O(\log n) new permanent nodes. We also give a grammar-compressed instantiation via AVL grammars: starting from an initial grammar of size g0g_0, after UU updates, the total number of permanent grammar nodes is O(g0+I+Ulognmax)O(g_0+I+U\log n_{\max}), where II is the number of inserted fresh characters and nmaxn_{\max} is the maximum string length appearing during the update sequence.

Cite

@article{arxiv.2607.01580,
  title  = {Fully Persistent Dynamic LCE via AVL Trees and AVL Grammars},
  author = {Taiki Kaneda and Hiroki Arimura and Shunsuke Inenaga},
  journal= {arXiv preprint arXiv:2607.01580},
  year   = {2026}
}