Markus Lohrey ; Markus L. Schmid - Enumeration for MSO-Queries on Compressed Trees

theoretics:16426 - TheoretiCS, February 26, 2026, Volume 5 - https://doi.org/10.46298/theoretics.26.6
Enumeration for MSO-Queries on Compressed TreesArticle

Authors: Markus Lohrey ORCID; Markus L. Schmid ORCID

    We study the problem of enumerating the answers to a query formulated in monadic second order logic (MSO) over an unranked forest F that is compressed by a straight-line program (SLP) D. Our main result states that this can be done after O(|D|) preprocessing and with output-linear delay (in data complexity). This is a substantial improvement over the previously known algorithms for MSO-evaluation over trees, since the compressed size |D| might be much smaller than (or even logarithmic in) the actual data size |F|, and there are linear time SLP-compressors that yield very good compressions on practical inputs. In particular, this also constitutes a meta-theorem in the field of algorithmics on SLP-compressed inputs: all enumeration problems on trees or strings that can be formulated in MSO-logic can be solved with linear preprocessing and output-linear delay, even if the inputs are compressed by SLPs. We also show that our approach can support vertex relabelling updates in time that is logarithmic in the uncompressed data. Our result extends previous work on the enumeration of MSO-queries over uncompressed trees and on the enumeration of document spanners over compressed text documents.

    64 pages. This is the TheoretiCS journal version


    Volume: Volume 5
    Published on: February 26, 2026
    Accepted on: January 24, 2026
    Submitted on: August 28, 2025
    Keywords: Formal Languages and Automata Theory, Databases

    Consultation statistics

    This page has been seen 35 times.
    This article's PDF has been downloaded 15 times.