Fast Diameter Computation within Split Graphs

When can we compute the diameter of a graph in quasi linear time? We address this question for the class of {\em split graphs}, that we observe to be the hardest instances for deciding whether the diameter is at most two. We stress that although the diameter of a non-complete split graph can only be either $2$ or $3$, under the Strong Exponential-Time Hypothesis (SETH) we cannot compute the diameter of an $n$-vertex $m$-edge split graph in less than quadratic time -- in the size $n+m$ of the input. Therefore it is worth to study the complexity of diameter computation on {\em subclasses} of split graphs, in order to better understand the complexity border. Specifically, we consider the split graphs with bounded {\em clique-interval number} and their complements, with the former being a natural variation of the concept of interval number for split graphs that we introduce in this paper. We first discuss the relations between the clique-interval number and other graph invariants such as the classic interval number of graphs, the treewidth, the {\em VC-dimension} and the {\em stabbing number} of a related hypergraph. Then, in part based on these above relations, we almost completely settle the complexity of diameter computation on these subclasses of split graphs: - For the $k$-clique-interval split graphs, we can compute their diameter in truly subquadratic time if $k={\cal O}(1)$, and even in quasi linear time if $k=o(\log{n})$ and in addition a corresponding ordering of the vertices in the clique is given. However, under SETH this cannot be done in truly subquadratic time for any $k = \omega(\log{n})$. - For the {\em complements} of $k$-clique-interval split graphs, we can compute their diameter in truly subquadratic time if $k={\cal O}(1)$, and even in time ${\cal O}(km)$ if a corresponding ordering of the vertices in the stable set is given. Again this latter result is optimal under SETH up to polylogarithmic factors. Our findings raise the question whether a $k$-clique interval ordering can always be computed in quasi linear time. We prove that it is the case for $k=1$ and for some subclasses such as bounded-treewidth split graphs, threshold graphs and comparability split graphs. Finally, we prove that some important subclasses of split graphs -- including the ones mentioned above -- have a bounded clique-interval number.


Introduction
In what follows, all graphs considered are assumed to be connected, unless stated otherwise.Computing the diameter of a graph (maximum number of edges on a shortest path) is a fundamental problem with countless applications in computer science and beyond.Unfortunately, the textbook algorithm for computing the diameter of an n-vertex m-edge graph takes O(nm)-time.This quadratic running-time is too prohibitive for large graphs with millions of nodes.As already noticed in Chepoi and Dragan (1992); Corneil et al. (2001), an algorithm breaking this quadratic barrier for general graphs is unlikely to exist since it would lead to more efficient algorithms for some disjoint set problems and, as proved in Roditty and Vassilevska Williams (2013), the latter would falsify the Strong Exponential-Time Hypothesis (SETH).This raises the question of when we can compute the diameter faster than O(nm).By restricting ourselves to more structured graph classes, here we hope in obtaining a finer-grained dichotomy between "easy" and "hard" instances for diameter computations -with the former being quasi linear-time solvable (i.e., solvable in O(m 1+ǫ ) time for any ǫ > 0) and the latter being impossible to solve in subquadratic time under some complexity assumptions.
Specifically, we focus in this work on the class of split graphs, i.e., the graphs that can be bipartitioned into a clique and a stable set.-For any undefined graph terminology, see Bondy and Murty (2008).-This is one of the most basic idealized models of core/periphery structure in complex networks Borgatti and Everett (2000).We stress that every split graph has diameter at most three.In particular, computing the diameter of a non-complete split graph boils down to decide whether this is either two or three.Nevertheless, under the Strong Exponential-Time Hypothesis (SETH) the textbook algorithm is optimal even for split graphs Borassi et al. (2016).We observe that the split graphs are in some sense the hardest instances for deciding whether the diameter is at most two.For that, let us bipartition a split graph G into a maximal clique K and a stable set S; it takes linear time Golumbic (2004).The sparse representation of G is defined as (K, {N G [v] | v ∈ S}) (i) .-Note that all our linear-time algorithms in this paper run in the size of this above representation.-Observation 1 Deciding whether an n-vertex graph G has diameter two can be reduced in linear time to deciding whether a 2n-vertex split graph G ′ (given by its sparse representation) has diameter two.
Proof: If G = (V, E) then, let V ′ be a disjoint copy of V .For every v ∈ V we denote by v ′ ∈ V ′ its copy.We define By construction, G ′ is a split graph with maximal clique V ′ and stable set V .Furthermore, diam(G) ≤ 2 if and only if diam(G ′ ) ≤ 2. ✷ Since the conference version of this paper, it was also proved in Ducoffe and Dragan (2021) that computing the diameter of chordal graphs (i.e., graphs with no induced cycle of length > 3, a far-reaching generalization of split graphs) could be reduced in randomized quasi linear time to computing the diameter of various split subgraphs given by their sparse representation.This result got used in Ducoffe (2020) for faster diameter computation within chordal graphs of bounded asteroidal number.We here address the fine-grained complexity of diameter computation on subclasses of split graphs.By the above Observation 1 and by Ducoffe and Dragan (2021), our results can be applied to the study of the diameter-two problem on general graphs and to the study of the diameter problem within chordal graphs. (i) This sparse representation is also called the neighbourhood set system of the stable set of G, see Sec. 2.

Related work.
Exact and approximate distance computations for chordal graphs have been a common research topic over the last few decades Brandstädt et al. (1999Brandstädt et al. ( , 2004)); Dourisboure and Gavoille (2002); Dragan (2005).To the best of our knowledge, this is the first study on the complexity of diameter computation on split graphs.However, there exist linear-time algorithms for computing the diameter on some other subclasses of chordal graphs such as: interval graphs Olariu (1990), or strongly chordal graphs Brandstädt et al. (1998).These results imply the existence of linear-time algorithms for diameter computations on interval split graphs and strongly chordal split graphs, among other subclasses.
Beyond chordal graphs, the complexity of diameter computation has been considered for many graph classes, e.g., see Corneil et al. (2001) and the papers cited therein.In particular, the diameter of general graphs with treewidth o(log n) can be computed in quasi linear time Abboud et al. (2016), whereas under SETH we cannot compute the diameter of split graphs with clique-number (and so, treewidth) ω(log n) in subquadratic time Borassi et al. (2016).We stress that our two first examples of "easy" subclasses, namely: interval split graphs and strongly chordal split graphs have unbounded treewidth.Our work unifies almost all known tractable cases for diameter computation on split graphs -and offers some new such cases -through a new increasing hierarchy of subclasses.
Relatedly, we proved in a companion paper Ducoffe et al. (2020) that on the proper minor-closed graph classes and the bounded-diameter graphs of constant distance VC-dimension (not necessarily split) we can compute the diameter in time O(mn 1−ε ) = o(mn), for some small ε > 0. We consider in this work some subclasses of split graphs of constant distance VC-dimension.However, the time bounds obtained in Ducoffe et al. (2020) are barely subquadratic.For instance, although the graphs of constant treewidth fit in our framework, our techniques in Ducoffe et al. (2020) do not suffice for computing their diameter in quasi linear time.In fact, neither are they sufficient to explain why we can compute the diameter in subquadratic time on graphs of superconstant treewidth o(log n).Unlike Ducoffe et al. (2020) this article is a new step toward characterizing the graph classes for which we can compute the diameter in quasi linear time.
Our results.We introduce a new invariant for split graphs, that we call the clique-interval number.Formally, for any k ≥ 1, a split graph is k-clique-interval if there exists a total ordering τ of the vertices in the clique so that, for every vertex v in the stable set, the neighbour set N (v) consists of at most k intervals of vertices in the ordering τ .The clique-interval number of a split graph is the minimum k such that it is k-clique-interval.Although this definition is quite similar to the one of the interval number McGuigan (1977), we show in Sec. 2 that being k-clique-interval does not imply being k-interval, and vice-versa (ii) .In fact, as we also prove in Sec. 2, the clique-interval number of a split graph is more closely related to the VC-dimension and the stabbing number of the neighbourhood set system of its stable set.Nevertheless, a weak relationship with the interval number can also be derived in this way.
We then study in Sec. 3 what the complexity of computing the diameter is on split graphs parameterized by the clique-interval number.It follows from our results in Sec. 2 and those in Ducoffe et al. (2020) that on every subclass of constant clique-interval number, there exists a subquadratic-time algorithm for diameter computation.Our work completes this general result as, if we assume a total ordering over the clique to be given in the input (showing the input split graph to be k-clique-interval for some value k), it provides an almost complete characterization of the quasi linear-time solvable instances.As a warm-up, we observe in Sec.3.1 that on clique-interval split graphs (a.k.a., 1-clique-interval), deciding whether the diameter is two is equivalent to testing for a universal vertex.We give a direct proof of this result and another one based on the inclusion of clique-interval split graphs in the subclass of strongly chordal split graphs.On the way, we prove more generally -and perhaps surprisingly -that for the intersection of split graphs with many interesting graph classes from the literature, having diameter at most two is equivalent to having a universal vertex!Then, we address the more general case of k-clique-interval split graphs, for k ≥ 2.
• Our first main contribution is the following almost dichotomy result (Theorem 2).For every nvertex k-clique-interval split graph, we can compute its diameter in quasi linear-time if k = o(log n) and a corresponding total ordering of its clique is given.This result follows from an all new application of a generic framework based on k-range trees Bentley (1979), that was already used for diameter computations on some special cases Abboud et al. (2016); Ducoffe (2019) but with a quite different approach than ours.Furthermore, the logarithmic upper bound on k is somewhat tight -at least if we assume every k-clique-interval split graph to be given with a k-clique-ordering.Indeed, we also prove that under SETH we cannot compute in subquadratic time the diameter of k-clique-interval split graphs for k = ω(log n).The complexity of computing the diameter of a k-clique-interval split graph, for k = o(log n), remains open if we are not given any total order over the vertices of the clique.
We note that this above result is quite similar to the one obtained in Abboud et al. (2016) for treewidth.Indeed, we observe that every split graph of treewidth k is k-clique-interval (and even k 2 -clique-interval, see Sec. 2).We use this easy observation so as to prove our conditional time complexity lower-bound.
• Then, we focus on the complements of k-clique-interval split graphs -these are an interesting subclass in their own right since they generalize, e.g., interval split graphs.For the latter we get a more straightforward algorithm for diameter computation, with a better dependency in k.Indeed, we prove that we can compute the diameter of such graphs in time O(km) if a corresponding ordering is given.This result is conditionally optimal up to polylogarithmic factors (at least if we assume every such split graph to be given with a k-clique-ordering of its complement) because k = O(n) and, under SETH, we cannot compute the diameter of split graphs with m = Õ(n) edges in subquadratic time Abboud et al. (2016).The complexity of computing the diameter within complements of k-clique-interval split graphs remains open if we are not given any total ordering over the vertices in the stable set.
It follows from these two above results that having at hands a k-clique-interval ordering for a split graph or its complement can help to significantly improve the time complexity for computing its diameter.We so ask whether such orderings can be computed in quasi linear time, for some small values of k.In Sec. 4 we prove that it is indeed the case for bounded-treewidth split graphs (trivially) and some other dense subclasses of bounded clique-interval number such as comparability split graphs.Finally our main result in this section is that the clique-interval split graphs can be recognized in linear time.
Overall, we believe that our study of k-clique-interval split graphs is a promising framework in order to prove, using this parameter, new quasi linear-time solvable special cases for diameter computations on split graphs and beyond.
Results of this paper were partially presented at the COCOA'19 conference Ducoffe et al. (2019).

Clique-interval numbers and other graph parameters
We start by relating the clique-interval number of split graphs with better-studied invariants from Graph Theory and Computational Geometry.
Treewidth.First we observe that if G = (S ∪ K, E) is a split graph then, for any total order over K and any v ∈ S, N G (v) consists of at most |K| intervals of vertices.In fact we can improve this rough upper-bound, as follows: Lemma 1 Every split graph with clique-number (and so, treewidth) at most k is k 2 -clique-interval.
Proof: Let G = (K ∪ S, E) be a split graph with clique-number |K| = k.Let τ be any total ordering of K.For any integer i ≤ |K|, and any v ∈ S, we claim that N G (v) is the union of at most max{k − i, i} intervals of τ .Indeed if v has at least i non-neighbours, then it has at most k − i neighbours and so the claim trivially holds.Otherwise, v has less than i non-neighbours in K, but then the other nodes form at most i intervals of τ .This bound is optimal for i = k 2 .✷ Conversely, since any complete graph is 1-clique-interval, the clique-interval number cannot be bounded from below by any function of the treewidth.
VC-dimension and Stabbing number.For a set system (X, R) (a.k.a., range space or hypergraph), we say that a subset Y ⊆ X is shattered if {Y ∩ r | r ∈ R} is the power-set of Y .The VC-dimension of a finite set system is the largest size of a shattered subset.We now prove an interesting connection between the clique-interval number of a split graph and the VC-dimension of a related set system.
It turns our that a weak converse of Proposition 1 also holds.We need a bit of terminology from Chazelle and Welzl (1989).A spanning path for (X, R) is a total ordering x 1 , x 2 , . . ., x |X| of X.Its stabbing number is the maximum number of consecutive pairs x i , x i+1 that a set r ∈ R can stab, i.e., for which |r ∩ {x i , x i+1 }| = 1.Finally, the stabbing number of (X, R) is the minimum stabbing number over its spanning paths.
The main result of Chazelle and Welzl (1989) is that every range system of VC-dimension at most k has a stabbing number in , for some exponential function f .We so obtain: )-clique-interval, for some exponential function f .Interval number.Finally, we relate the clique-interval number of split graphs with their interval number.A graph G = (V, E) is called k-interval if we can map every v ∈ V to the union of at most k closed interval on the real line, denoted by I(v), in such a way that uv ∈ E ⇐⇒ I(u) ∩ I(v) = ∅.In particular, 1-interval graphs are exactly the interval graphs.We observe that there are k-interval split graphs that are not k-clique-interval, already for k = 1.For instance, consider the interval split graph of Fig. 1 (note that {a, 1, 2}, {b, 1, 2, 3}, {1, 2, 3, 4}, {c, 2, 3, 4}, {d, 2, 4} is a linear ordering of its maximal cliques).Suppose by contradiction it is a clique-interval split graph, and let us consider a corresponding total ordering of K = {1, 2, 3, 4}.The intersection N (b) ∩ N (c) = {2, 3} should be an interval.But then, one of the pairs {1, 2} or {4, 2} is not consecutive, and so one of N (a) or N (d) is not an interval.Therefore, the graph of Fig. 1 is not a clique-interval split graph.Conversely, there are clique-interval split graphs which are not interval graphs.For instance, this is the case of thin spiders, i.e., split graphs such that the edges between the maximal clique and the stable set induce a perfect matching.
Nevertheless we prove a weak connection between the clique-interval number and the interval number of a split graph, by using the VC-dimension.Specifically, Bousquet et al. proved that the neighbourhood set system of any interval graph has VC-dimension at most two Bousquet et al. (2015).We generalize their result.For that, we use in our proof the well-known Sauer-Shelah-Perles' Lemma Sauer (1972); Shelah (1972), namely: for any set system (X, R) and any subset Y ⊆ X, if the VC-dimension of (X, R) Proposition 2 The neighbourhood set system of any k-interval graph has VC-dimension at most (4 + o(1))k log k.
Proof: Let G = (V, E) be a k-interval graph, and let us fix a corresponding k-interval representation.We create a graph H whose vertices are the intervals in this representation and such that there is an edge between every two intersecting intervals.Observe that H is an interval graph, and so, its neighbourhood system has VC-dimension at most two Bousquet et al. (2015).Now, let Y ⊆ V , |Y | = d, be shattered by the neighbourhood set system of G.For the corresponding interval set Sauer (1972); Shelah (1972).But then, for any u ∈ V , there are only O((kd )-clique-interval, for some exponential function f .

Diameter Computation in quasi linear time
We now address the time complexity of diameter computation on k-clique-interval split graphs.Our first result in this section follows from the relations proved in Sec. 2 with the VC-dimension.
Theorem 1 ( Ducoffe et al. (2020)) For every d > 0, there exists a constant ε d ∈ (0; 1) such that in time Õ(mn 1−ε d ) we can decide whether a graph whose neighbourhood set system has VC-dimension at most d has diameter two.
Corollary 3 For every constant k, there exists a constant η k ∈ (0; 1) such that in time Õ(mn 1−η k ) we can decide whether a k-clique-interval split graph has diameter two.
Proof: Let G = (K ∪ S, E) be a k-clique-interval split graph.By Theorem 1, it suffices to prove that the neighbourhood set system of G has VC-dimension bounded by a function of k.The latter system is the union of and so we are done.Therefore, let But then, since we assume K Y ⊆ Y to be shattered, we get |K Y | ≤ 1.Therefore, the claim is proved, and so we are left upper bounding the VC-dimension of are dual from each other (where the dual of a set system (X, R) is another set system (R, X * ) so that for every x ∈ X, there is an (Chazelle and Welzl, 1989, Lemma 2.3).We conclude from Proposition 1 that the VC-dimension of (S, {N G (v) ∩ S | v ∈ K}) is at most 4 k , and we are done using Theorem 1. ✷ We observe that Corollary 3 also holds for the complements of k-clique-interval split graphs -with essentially the same proof as above.In the remainder of this section we focus on the existence of quasi linear-time algorithms.It starts with a small digression on clique-interval split graphs.

The Case k = 1 and beyond
Proposition 3 A clique-interval split graph has diameter at most two if and only if it has a universal vertex.Therefore, we can compute the diameter of clique-interval split graphs in linear time.
Proof: For G = (K ∪ S, E) a clique-interval split graph, let us fix a corresponding total order over the maximal clique K. Since K is a dominating clique of G, all vertices in K are at a distance at most two from any other vertex in G. Therefore, we are left to decide whether every two vertices in the stable set S are at distance two, i.e., whether they have a common neighbour.Equivalently, given the total order over K, we must decide whether for every v, v ′ ∈ S, the intervals N G (v) and N G (v ′ ) intersect.By the Helly property, a finite family of intervals on the line pairwise intersect if and only if they have a non-empty intersection.As a result, we are left deciding whether v∈S N G (v) = ∅, or equivalently whether some vertex of K is adjacent to all of S. Since K is a clique, having a vertex adjacent to all the vertices in S is equivalent to having a universal vertex.✷ We think that our proof of Prop. 3 is a nice introduction to the properties of clique-interval representations for split graphs, that will be further exploited in Sec.3.2.In the remainder of this part we give an alternative proof of Prop. 3 that also applies to larger subclasses of split graphs.It starts with the following inclusion lemma.
Lemma 2 Every clique-interval split graph is strongly chordal.

Proof:
The n-sun graph is a split graph G n = (K ∪ S, E) such that K = {u 0 , u 1 , . . ., u n−1 }, S = {v 0 , v 1 , . . ., v n−1 } and for every i we have N G (v i ) = {u i , u i+1 } (indices are taken modulo n).A chordal graph is strongly chordal if and only if it does not contain any n-sun graph as an induced subgraph, for every n ≥ 3 Farber (1983).Since every split graph is a chordal graph, in order to prove the lemma, it suffices to prove that a clique-interval split graph does not contain any n-sun graph as an induced subgraph, for every n ≥ 3.This is always the case for clique-interval split graphs because, in any n-sun graph, the neighbourhoods of the vertices in the stable set induce a cyclic ordering over K. ✷ We stress that since every n-sun graph is 2-clique-interval, this above Lemma 2 does not hold for k-clique-interval graphs, for any k ≥ 2. Now, a maximum neighbour of v is any u ∈ V such that Brandstädt et al. (1998)).We prove that if at least one vertex in a graph has a maximum neighbour then deciding whether the diameter is at most two becomes a trivial task.In particular, this is always the case for strongly chordal graphs Farber (1983).
Lemma 3 For every G = (V, E) and u, v ∈ V such that u is a maximum neighbour of v, we have diam(G) ≤ 2 if and only if u is a universal vertex.
3 now follows from the combination of Lemmata 2 and 3. Furthermore it turns out that many well-structured graph classes ensure the existence of a vertex with a maximum neighbour such as: graphs with a pendant vertex, threshold graphs Heggernes and Kratsch (2007) and interval graphs Brandstädt et al. (2010), or even more generally dually chordal graphs Brandstädt et al. (1998).We conclude that: Corollary 4 We can compute the diameter of split graphs with minimum degree one and dually chordal split graphs in linear time.
In particular, we can compute the diameter of interval split graphs and strongly chordal split graphs in linear time.
We observe that we can easily modify the hardness reduction from Borassi et al. (2016) in order to show that, under SETH, we cannot compute in subquadratic time the diameter of split graphs with minimum degree two.Indeed, this aforementioned reduction outputs a split graph G = (K ∪ S, E) such that: S is partitioned in two disjoint subsets A and B; and a diametral pair must have one end in each subset.Let a, b, v 0 / ∈ V be fresh new vertices, and let G ′ = (K ′ ∪ S ′ , E ′ ) be such that: K ′ = K ∪ {a, b}, S ′ = S ∪ {v 0 } and: By construction, diam(G ′ ) ≤ 2 if and only if diam(G) ≤ 2. Therefore, Corollary 4 is optimal for the parameter minimum degree.

The general case
We are now ready to prove the first main result of this paper.
Theorem 2 If G = (K ∪ S, E) is an n-vertex split graph and we are given a total ordering over K Conversely, under SETH we cannot compute the diameter of n-vertex split graphs with clique-interval number ω(log n) in subquadratic time.
In order to prove Theorem 2, we will use a special instance of k-range tree.Such a data-structure stores a static set of k-dimensional points and it supports the following operation: • (Range Query) Given k intervals [l i ; u i ], 1 ≤ i ≤ k, compute the number of stored points p such that, for every iii) .
Proposition 4 (Bringmann et al. (2018)) For any k ≥ 2 and any n-set of k-dimensional points, we can construct a k-range tree in time ) for any ǫ > 0, and answer any range query in time O(2 k k+1+⌈log n⌉ k+1 The use of range queries for diameter computation dates back from Abboud et al. (2016) (see also Bringmann et al. (2018); Ducoffe (2019) for some further applications).Roughly, if in a graph G we can find a separator S of size at most k that disconnects a diametral pair of G, then the idea is to compute a "distance profile" for every vertex v / ∈ S w.r.t.S, and to see this profile as a k-dimensional point.We can compute a diametral pair by constructing a k-range tree for these points and computing O(kn) range queries.Our present approach is different from the one in Abboud et al. (2016) as we define our multi-dimensional points based on some interval representation of the graph rather than on distance profiles, and we use a different type of range query than in Abboud et al. (2016).
Proof of Theorem 2. Let G = (K ∪ S, E) be an n-vertex split graph, and let us assume to be given a total ordering over K showing that G is k-clique-interval.By the hypothesis for every v ∈ S, we have . Furthermore since the ordering over K is given, the 2k endpoints that delimit these intervals can be computed in time O(|N G (v)|), simply by scanning the neighbours of vertex v.We so map every vertex v ∈ S to the 2k-dimensional point p(v) = (l 1 (v), u 1 (v), . . ., l k (v), u k (v)), that takes total time O(m).Then, we construct a 2k-range tree for the points p(v), v ∈ S, that takes time O(k2 O(k) n 1+ǫ ) for any ǫ > 0 by Proposition 4.
For every v ∈ S, we are left with computing the number of vertices in S at distance two from v. Indeed, G has diameter at most two if and only if this number is |S| − 1 for every v ∈ S. For that, we first observe that, for every w ∈ S \ {v}, we have dist G (v, w) = 2 if and only if there exists an interval [l j (w); u j (w)], for some 1 ≤ j ≤ k, which contains a vertex of N G (v).We partition the vertices to count into disjoint subsets S 1 , S 2 , . . ., S k such that, for every 1 ≤ j ≤ k, S j contains all the vertices w ∈ S which satisfy that: [l j (w); u j (w)] contains a vertex of N G (v), and there is no interval [l j ′ (w); u j ′ (w)] with this property for any 1 ≤ j ′ < j.Then, we further observe that for an interval [l j (w); u j (w)] to contain a vertex of N G (v), it is necessary and sufficient for this interval to intersect [l i (v); u i (v)], for some 1 ≤ i ≤ k.Therefore, we sub-partition each subset S j into S 1,j , S 2,j , . . ., S k,j such that, for every 1 ≤ i ≤ k and for every w ∈ S i,j , we have: [l j (w); u j (w)] and [l i (v); u i (v)] intersect, and [l j (w); u j (w)] and Let w ∈ S \ {v} be arbitrary and let 1 ≤ i, j ≤ k be fixed.We claim that w ∈ S i,j if and only if the following three constraints are satisfied:

and for every
Indeed, if w ∈ S i,j then the first and second constraints hold by minimality of index i (for fixed j) and the third constraint holds by minimality of index j.Conversely, assume the three constraints to hold.The first and second constraints imply that index i the least index i ′ such that the intervals [l j (w); u j (w)] and [l i ′ (v); u i ′ (v)] intersect.Therefore, in order to prove that w ∈ S i,j , it suffices to prove that there is no interval [l j ′ (w); u j ′ (w)], for any 1 ≤ j ′ < j, which contains a vertex of N G (v). Suppose for the sake of contradiction the existence of an interval [l j ′ (w); u j ′ (w)], for some 1 ≤ j ′ < j, which contains a vertex of N G (v).Let 1 ≤ i ′ ≤ k be such that [l j ′ (w); u j ′ (w)] and [l i ′ (v); u i ′ (v)] intersect.The third constraint implies that i ′ > i.But then, since we also have that [l j (w); u j (w)] and [l i (v); u i (v)] intersect (first constraint), we get l i ′ (v) > l j (w) > u j ′ (w), and therefore Next, we define range queries such that, for every w ∈ S i,j , its point p(w) is counted by exactly one of these queries.The first and second constraints are equivalent to one of the following three disjoint possibilities: v); +∞) for, respectively the (2j − 1) th and 2j th intervals of the range query); for, respectively the (2j − 1) th and 2j th intervals of the range query); for the (2j − 1) th interval of the range query).
The third constraint is equivalent to have j ′ <j [l j ′ (w); Note that in order to subdivide this constraint into disjoint possibilities, it suffices to indicate: (i) the subset of all intervals among (−∞, l 1 (v))∪ i ′ <i (u i ′ (v), l i ′ +1 (v)) that contain an interval [l j ′ (w); u j ′ (w)] for some j ′ < j; and (ii) the set of all indices j ′ ∈ (1; j) such that [l j ′ −1 (w); u j ′ −1 (w)] and [l j ′ (w); u j ′ (w)] are not contained in the same such interval.Note also that, for (i), there are 2 i possibilities (because we must choose a subset of a family of i intervals), while for (ii) there are at most 2 j−2 possibilities (because we must choose a subset of all indices j ′ between 2 and j − 1).Overall, that divides the third constraint in at most 2 i 2 j−2 ≤ 2 2k−2 disjoint events.Furthermore, for any such event, let us write (a 1 ; b 1 ), (a 2 ; b 2 ), . . ., (a r ; b r ) the selected intervals, resp.j 1 , j 2 , . . ., j r−1 the selected indices.Set j 0 = 1, j r = j.Then, for every 1 ≤ q ≤ r, all the intervals [l j ′ (w); u j ′ (w)], for j q−1 ≤ j ′ ≤ j q − 1 must be contained into (a q ; b q ).We set [l 2j ′ −1 ; u 2j ′ −1 ] = [l 2j ′ ; u 2j ′ ] = (a q ; b q ) for the (2j ′ − 1) th and 2j ′ th intervals of the range query.For a fixed pair (i, j) we so reduce our computation to at most 3 • 2 2k−2 range queries (obtained by the combination of one of the three disjoint possibilities for the two first constraints with one of the at most 2 2k−2 possibilities for the third constraint), that takes time O(2 O(k) n ǫ ) for any ǫ > 0 by Proposition 4. Since there are O(k 2 ) such pairs, the total time in order to compute the number of vertices in S at distance two from v is in O(k 2 2 O(k) n ǫ ) for any ǫ > 0.
Finally, the hardness result for k = ω(log n) follows from the fact that k-treewidth split graphs are k-clique-interval (Lemma 1) and that under SETH, we cannot compute the diameter of split graphs with treewidth ω(log n) in subquadratic time Abboud et al. (2016); Borassi et al. (2016).✷ Before ending this section, we give a simpler algorithm for computing the diameter on the complements of k-clique-interval split graphs.It is similar in spirit to (Ducoffe et al., 2020, Lemma 6).E) is an m-edge split graph, and we are given a total ordering over S showing that G is the complement of a k-clique-interval split graph then, we can compute the diameter of G in time O(km).
Proof: By the hypothesis for every v ∈ K, we have N G (v) ∩ S is the union of k intervals.In particular, (v).Furthermore since the ordering over S is given, the 2k + 2 endpoints that delimit these intervals can be computed in time O(|N G (v)|), simply by scanning the neighbours of vertex v. Overall, this pre-processing phase takes total time O(m).Then in order to compute the diameter of G, for every w ∈ S we store the 2k + 2 endpoints l 1 (v), u 1 (v), l 2 (v), u 2 (v), . . ., l k+1 (v), u k+1 (v) for every v ∈ N G (w).This takes time O(k|N G (w)|), and so total time O(km).Furthermore a vertex w ∈ S has eccentricity at most two if and only if we have v∈NG In order to check whether this collection of intervals covers all of S, it suffices to sort the pairs (l i (v), u i (v)) for all v ∈ N G (w) and 1 ≤ i ≤ k + 1, and then to scan these ordered pairs from left to right.This can be done in time O(k|N G (w)|).As a result, we can decide whether diam(G) ≤ 2 in total time O(km).✷ 4 Recognition of k-Clique-interval Split graphs Our two algorithms in Sec.3.2 show that in order to compute the diameter of k-clique-interval split graphs in quasi linear time, it is sufficient to compute a corresponding total order of their maximal clique.This raises the question whether such k-clique-interval orderings can always be computed in quasi linear time.A first positive example was given by Lemma 1. Indeed, for a split graph of treewidth at most k, we can pick any total order of its maximal clique.We complete this easy result by Sec.4.1 where we give examples of dense subclasses of split graphs with constant clique-interval number and for which a corresponding order can be computed in linear time.Finally, in Sec.4.2 we prove a stronger result, namely that we can recognize the clique-interval split graphs in linear time.

Examples of subclasses with bounded clique-interval number
A threshold graph is a split graph G = (K ∪ S, E) such that: (i) the neighbourhoods of the vertices in K and (ii) the neighbourhoods of the vertices in S are totally ordered by inclusion.Observe that threshold graphs can be dense and of unbounded treewidth.
Lemma 4 Every threshold graph is a clique-interval split graph.
Proof: For a threshold graph G In order to prove that G is a clique-interval split graph, it suffices to construct any total order of K such that the subsets N Note that we can easily derive from the proof of Lemma 4 a linear-time algorithm for computing a clique-interval ordering.
Lemma 5 For every comparability split graph G = (K ∪ S, E), we can compute in linear time a total order over K such that, for every v ∈ S, N G (v) is the union of a prefix and a suffix of this order.
In particular, every comparability split graph is 2-clique-interval.
Proof: A comparability ordering of G is a total order ≺ over V = K ∪ S with the property that, for every and Stewart (1993).For a given comparability graph G, we can compute a comparability ordering ≺ in linear time McConnell and Spinrad (1999).Then, let ≺ K be the subordering induced by ≺ over K.For every v ∈ S, we claim that We also want to stress that the complements of comparability split graphs, i.e., the cocomparability split graphs are just interval split graphs and we have already considered this case in Section 3.1.
Corollary 5 The diameter of comparability split graphs can be computed in linear time.
Proof: We first apply Lemma 5, of which we reuse in what follows the notations that were locally defined in its proof.For every x, y ∈ S such that N L (x) and N L (y) are non-empty we have either N L (x) ⊆ N L (y) or N L (y) ⊆ N L (x) because these are prefixes of the ordering over K.In particular, x and y are at distance two from each other.The same holds if both N R (x) and N R (y) are non-empty.Hence, let S L = {x ∈ S | N R (x) = ∅} and S R = {y ∈ S | N L (y) = ∅}.We are left deciding whether every x ∈ S L , y ∈ S R are pairwise at distance two.For that, since all the sets N L (x) are prefixes of the total order over K, and in the same way all the sets N R (y) are suffixes of this ordering, we only need to consider a pair x, y such that |N L (x)| and |N R (y)| are minimized.✷

Linear-time recognition of Clique-interval split graphs
Theorem 4 Clique-interval split graphs can be recognized in linear time.
Proof: Let G = (K ∪ S, E) be a split graph.We define a graph G + from G by first transforming K into a stable set and then, for every u ∈ K, making a clique of N G (u) ∩ S. Furthermore, we claim that G is a clique-interval split graph if and only if G + is interval.To see that, let us call clique-path of a graph G ′ an ordering of its maximal cliques such that, for any vertex v of G ′ , the maximal cliques containing v are contiguous in the ordering; a graph is interval if and only if it admits a clique-path Blair and Peyton (1993); Fulkerson and Gross (1965).We can now prove our claim, as follows: • If G is a clique-interval split graph then, any clique-ordering over K for G is a total ordering over the maximal cliques {u} ∪ (N G (u) ∩ S) , u ∈ K, for G + .Furthermore as already observed in the proof of Proposition 3 the vertices in a subset S ′ ⊆ S are pairwise at distance two in G if and only if they have a common neighbour in K.As a result, the maximal cliques of G + are exactly the sets {u} ∪ (N G (u) ∩ S) , u ∈ K, and so G + admits a clique-path.This implies that G + is an interval graph.
• Conversely, if G + is an interval graph then any clique-path of G + induces a total ordering over the maximal cliques {u} ∪ (N G (u) ∩ S) , u ∈ K. Since every vertex u ∈ K is contained in exactly one such maximal clique, we get a total ordering τ over K.For every v ∈ S, we have that N G (v) consists of an interval of vertices in τ because the maximal cliques {u}∪(N G (u) ∩ S) , u ∈ N G (v) must be consecutive in the clique-path of G + .Therefore, τ is a clique-ordering over K for G.
Unfortunately, computing the graph G + may take super-linear time.We can overcome this issue as follows.First, given a family C of subsets over V , if there exists a chordal graph G C whose maximal cliques are exactly those in C then, we can compute a Lex-BFS ordering of G C in time O( C∈C |C|) (Algorithm 10 in Habib et al. (2000)).Moreover we can also compute a clique-tree of G C in time O( C∈C |C|) (Tarjan and Yannakakis, 1984, Sec. 3).Finally given this Lex-BFS ordering and the corresponding clique-tree of G C , we can apply Algorithm 9 from Habib et al. (2000)  ✷ We left open the status of the recognition of k-clique-interval split graphs, for k ≥ 2.

Fig. 1 :
Fig.1: An interval split graph that is not a clique-interval split graph.
As a result, we must have that d ≤ log O((kd) 2k ) = 2k log (kd) + O(1) = 2k log d + 2k log k + O(1).Assume d ≥ k (else, we are done).Then, 2k log d + 2k log k + O(1) ≤ 4k log d+ O(1) = (4 + o(1))k log d.In particular, d/ log d ≤ (4 + o(1))k, that implies d ≤ (4 + o(1))k log k. ✷ Using previous Corollary 1, we have: Since the VC-dimension of the union of two set systems can be upper bounded by a function of their respective VC-dimensionsDudley (1978), we are left proving that both set systems have a VC-dimension which is upper bounded by a function of k.By Proposition 1, (K, {N G (v) | v ∈ S}) has VC-dimension at most 2k.Furthermore, we claim that the VCdimension of (S ∪ K, {N G (v) | v ∈ K}) is at least the VC-dimension of (S, {N G (v) ∩ S | v ∈ K}), and at most this value plus one.The lower bound is trivial because any subset shattered by (S, {N G in order to decide in time O( C∈C |C|) whether G C is interval.For solving our initial problem, we can take C = {{u} ∪ (N G (u) ∩ S) | u ∈ K}, and in this situation we have C∈C |C| = O(n + m).