arXiv:2610.28932cs.DSOct 2026

Manuscript Offprint

arXiv:2610.28932

Solving problems in RDV Graphs faster and easier

Therese Biedl, Günter Rote

Abstract

In interval graphs and many generalizations thereof, problems such as MATCHING, INDEPENDENTSET and DOMINATINGSET can be solved with simple greedy algorithms in linear (i.e., O(m+n)O(m+n)) time. However, it is sometimes possible to improve on this runtime if a suitable representation as intersection graph is given; for example it is possible to find a minimum dominating set in an interval graph in O(n)O(n) time. We study RDV graphs, a generalization of interval graphs, namely, the intersection graphs of directed paths in a rooted tree. It was known that the above three problems can be solved in O(nlog⁡n)O(n \log n) time if a suitably small representation is given. In this paper, we reduce the runtime to O(n)O(n). Furthermore, while the previous results used non-trivial operations such as range-minimum queries and ray-shooting queries, we need nothing more complicated than lists and (for MATCHING) a UNION-FIND data structure.

2012 ACM Subject Classification Mathematics of computing → Graph algorithms

Keywords and phrases RDV graph, Dominating Set, Independent Set, Matching, Linear Time

Funding Therese Biedl: Supported by NSERC, FRN RGPIN-2020-03958. Research done while the first author visited Freie Universität Berlin during her sabbatical in the winter term 2025/26.

1 Introduction

We study efficient algorithms for graphs that are RDV graphs, i.e., vertex-intersection graphs of directed paths in a rooted tree. (Formal definitions are given in Section 2.) This graph class contains interval graphs and is a subclass of the chordal graphs; so any problem that can be solved efficiently in chordal graphs (such as INDEPENDENTSET, which is NP-hard in general but can be solved with a linear-time greedy algorithm in chordal graphs [10]) can also be solved efficiently in RDV graphs. In fact, RDV graphs are a subclass of so-called strongly chordal graphs. In strongly chordal graphs, problems such as DOMINATINGSET and MATCHING can be solved in linear time with a greedy algorithm [6, 8], while no linear-time algorithms are known for chordal graphs (and in fact DOMINATINGSET is NP-hard in chordal graphs [4]).

In the above algorithms, “linear” refers to the input size, i.e., the runtime is O(m+n)O(m+n) for a graph with nn vertices and mm edges. In contrast to this, later papers considered algorithms whose runtime depends only on nn, assuming that a suitably small representation of the graph as intersection graph of objects is given. Of particular interest to the current work is a recent string of papers where the first author and Gokhale argued that the runtime of the above greedy algorithms can be reduced to O(nlog⁡n)O(n \log n) in RDV graphs [1, 3, 2, 13]. 1^{1}

Specifically, the runtime of these algorithms is O(∣T∣+nlog⁡n)O(|\mathcal{T}| + n \log n), where T\mathcal{T} is the tree used for the representation of GG. There always exists a representation with ∣T∣∈O(n)|\mathcal{T}| \in O(n), and so the runtime is O(nlog⁡n)O(n \log n) if the given representation is small enough (an assumption that we will make throughout).

1^{1} MATCHING is addressed in the conference paper [1], and in its journal version [3] with a simplified approach. DOMINATINGSET is addressed in [2], while INDEPENDENTSET is addressed only in Gokhale's Master's thesis [13], which summarizes all these results.

Solving Problems in RDV Graphs Faster and Easier

The crucial idea for these algorithms with runtime depending only on n and not on m is to reframe a given tree representation in geometric terms, namely as an intersection graph of T-shapes. Biedl and Gokhale define for every vertex of G a horizontal and a vertical segment whose union forms a T such that two vertices are adjacent if and only if their Ts intersect. One can then express the operations needed by the greedy algorithm as queries among these segments, and the authors showed that it suffices to use range-maximum queries and orthogonal ray-shooting queries in a (dynamically changing) subset of the segments. Prior results allow these queries to be implemented with runtime O(log⁡n)O(\log n): McCreight's priority search trees support range-maximum queries [17], and Giyora and Kaplan gave data structures for orthogonal ray-shooting queries [12]. However, neither of these data structures is straightforward to implement, especially in a dynamic setting.

In this paper, we improve on these algorithms for RDV graphs in three ways. First, we show that the detour into the T-intersection representation is not necessary: everything can be done directly with a bottom-up traversal of the tree T of the tree representation.

Second, the runtimes are better: we achieve runtime O(n)O(n) for all three problems, compared to the previous bound of O(nlog⁡n)O(n \log n) [2, 3, 13]. For MATCHING, our runtime even beats the best previously known result for interval graphs, which was O(nlog⁡log⁡n)O(n \log \log n) (Moitra and Johnson [18] with an improvement pointed out by Rhee and Liang [20, Section 5]).

Finally, and this is what we view as our most important contribution, our algorithms are very simple. There is no need for complicated data structures; all the required information can be obtained by storing at each node of T a few integers or lists or vertex references. (For MATCHING we also use a UNION-FIND data structure, but this is easy to implement if we relax the runtime bound from O(n)O(n) to O(nα(n))O(n\alpha(n))).

Organization of the paper. Section 2 introduces RDV representations and our notation, and Section 3 describes the bottom-up traversal of T on which our algorithms are based. Sections 4, 5, and 6 give our algorithms for INDEPENDENTSET, DOMINATINGSET, and MATCHING, respectively, each with a small example, and Section 7 mentions open problems. Appendix A contains streamlined pseudocode for all three algorithms, and Appendix B proves that the two greedy algorithms for MATCHING that we build on produce the same matching, and that this matching is maximum.