A signed tree model of a graph $G$ is a compact binary structure consisting of a rooted binary tree whose leaves are bijectively mapped to the vertices of $G$, together with 2-colored edges $xy$, called transversal pairs, interpreted as bicliques or anti-bicliques whose sides are the leaves of the subtrees rooted at $x$ and at $y$. We design an algorithm that, given such a representation of an $n$-vertex graph $G$ with $p$ transversal pairs and a source $v \in V(G)$, computes a shortest-path tree rooted at $v$ in $G$ in time $O(p \log n)$. A wide variety of graph classes are such that for all $n$, their $n$-vertex graphs admit signed tree models with $O(n)$ transversal pairs: for instance, those of bounded symmetric difference, more generally of bounded sd-degeneracy, as well as interval graphs. As applications of our Single-Source Shortest Path algorithm and new techniques, we - improve the runtime of the fixed-parameter algorithm for first-order model checking on graphs given with a witness of low merge-width from cubic [Dreier and Toruńczyk, STOC '25] to quadratic; - give an $O(n^2 \log n)$-time algorithm for All-Pairs Shortest Path (APSP) on graphs given with a witness of low merge-width, generalizing a result known on twin-width [Twin-Width III, SICOMP '24]; - extend and simplify an $O(n^2 \log n)$-time algorithm for multiplying two $n \times n$ matrices $A, B$ of bounded twin-width in [Twin-Width V, STACS '23]: now $A$ solely has to be an adjacency matrix of a graph of bounded twin-width and $B$ can be arbitrary; - give an $O(n^2 \log^2 n)$-time algorithm for APSP on graphs of bounded twin-width, bypassing the need for contraction sequences in [Twin-Width III, SICOMP '24; Bannach et al. STACS '24]; - give an $O(n^{7/3} \log^2 n)$-time algorithm for APSP on graphs of symmetric difference $O(n^{1/3})$.
Shortly after twin-width was introduced [13], it was observed that graphs G of bounded twinwidth admit natural sparse representations called twin-decompositions [10] or tree models [14]: a rooted binary tree T whose n leaves are in one-to-one correspondence with the vertices of G, together with relatively few extra edges called transversal edges such that two "leaves" ℓ and ℓ ′ are adjacent in G whenever an ancestor of ℓ and an ancestor of ℓ ′ are linked by a transversal edge, and in which case, this pair of adjacent ancestors is unique. Every graph admits a tree model if no constraint is imposed on the number of transversal edges or on the arXiv:2602.16605v1 [cs.DS] 18 Feb 2026 graph that they induce. Not every graph class, though, admits sparse tree models, i.e., ones with O(n) transversal edges, since this property implies that the class has factorial growth. Graphs of bounded twin-width happen to even admit degenerate tree models, i.e., where the graphs formed by the transversal edges (together with T ) are of bounded degeneracy.
Degenerate tree models are generally useful to the theory of twin-width, and have yielded faster shortest-path algorithms when such representations are given as part of the input: an O(n log n)-time algorithm for Single-Source Shortest Paths [10], improved to O(n) time [4]. They are at play in characterizing bounded twin-width classes by first-order transductions of pattern-avoiding permutation classes [14], and an O(n)-time algorithm multiplying n × n matrices of bounded twin-width over a finite ring [12]. They are also implicitly leveraged in the χ-boundedness of graphs of bounded twin-width [10], which can be thought of as a top-down coloring of the tree model, and in their O(log n)-bit adjacency labeling schemes [9] after arranging that the tree has logarithmic height. (On the other hand, if the main concern is data compression, better data structures are possible; see [23].) For some applications, like fast shortest-path algorithms, sparse tree models are sufficient.
At this point, we should note that degenerate tree models can encode graphs of unbounded twin-width. For instance, graphs of bounded degeneracy trivially admit degenerate tree models by placing the transversal edges directly at the leaves of T . Aiming to design short adjacency labeling schemes for broad graph classes, the authors of [7] further generalize tree models with signed tree models. These add transversal anti-edges A, which together with the transversal edges B form the transversal pairs (see also [12] where the transversal edges are labeled). Now two “leaves” ℓ and ℓ ′ are adjacent in G if and only if the “lowest”-when representing the tree T with the root up and the leaves down-transversal pair with one endpoint ancestor of ℓ and the other endpoint ancestor of ℓ ′ is an edge (and not an anti-edge). A non-crossing condition on the transversal pairs makes this well-defined.
Surprisingly many factorial graph classes admit sparse signed tree models, and even degenerate ones. The sd-degeneracy graph parameter is defined in [7], extending degeneracy to the dense world, and doing so more permissively than symmetric difference [3]. As graphs of bounded sd-degeneracy admit degenerate signed tree models [7], this is in particular true for the (less general) classes of bounded degeneracy, symmetric difference, twin-width, flip-width [25], and merge-width [19]. 1 It is relatively easy to see that interval graphs too admit degenerate signed tree models (for which the trees are combs). Hereditary classes of linear neighborhood complexity 2 have bounded symmetric difference [16], hence admit degenerate signed tree models. We will see that classes with almost 3 linear neighborhood complexity admit signed tree models with n 1+o (1) transversal pairs; we may call them almost sparse signed tree models. It is conjectured that every monadically dependent class has almost linear neighborhood complexity [18].
The generality of classes with (almost) sparse signed tree models motivates devising fast algorithms on these representations. We first show how to efficiently convert signed tree models into other sparse encodings. In the next theorem, an interval biclique partition of a graph G is a set of bicliques edge-partitioning G together with a linear order on the vertices of G such that each side of every biclique is an interval along this order. We defer the definition of a DAG compression [4] to the next section. The reader can now think of it as a sparse digraph encoding adjacencies via reachability. Either of the first two items (the first combined with [10], the second, with [4]) implies an equally fast Single-Source Shortest Path algorithm for sparsely encoded graphs.
▶ Theorem 2. There is an O(p log n)-time algorithm that, given a signed tree model with p transversal pairs of an n-vertex graph G and v ∈ V (G), outputs a shortest-path tree of G rooted at v. Notably, for sparse tree models (i.e., when p = O(n)),
This content is AI-processed based on open access ArXiv data.