Extremal total distance of graphs of given radius I

In 1984, Plesn\'{i}k determined the minimum total distance for given order and diameter and characterized the extremal graphs and digraphs. We prove the analog for given order and radius, when the order is sufficiently large compared to the radius. This confirms asymptotically a conjecture of Chen et al. We also state an analog of the conjecture of Chen et al for digraphs and prove it for sufficiently large order.


Introduction
The total distance W (G) of a graph G equals the sum of distances between all unordered pairs of vertices, i.e. W (G) = {u,v}⊂V d(u, v). In 1984, Plesník [5] determined the minimum total distance among all graphs of order n and diameter d. He did this both for graphs and digraphs and characterized the extremal examples. In this paper we solve the analogous questions for given order n and radius r, when n is sufficiently large compared with r.
The extremal graphs attaining the minimal total distance among all graphs with order n and radius r ∈ {1, 2} are easily characterized; complete graphs when r = 1, complete graphs minus a maximum matching when r = 2 and 2 | n and complete graphs minus a maximum matching and an additional edge adjacent to the vertex not in the maximum matching, when r = 2 and 2 ∤ n. For r ≥ 3 the question is harder and a conjecture of the extremal graphs was made by Chen, Wu and An [4]. Here G n,r,s is a cycle C 2r in which we take blow-ups in 2 consecutive vertices by cliques K s and K n−2r+2−s , as defined in Section 2.
Conjecture 1.1 ([4]). Let n and r be two positive integers with n ≥ 2r and r ≥ 3. For any graph G of order n with radius r, W (G) ≥ W (G n,r,1 ). Equality holds if and only if G ∼ = G n,r,s where 1 ≤ s ≤ n−2r+2 Although there are counterexamples to Conjecture 1.1 when n is small (as we discuss below), we will show that Conjecture 1.1 is true asymptotically, i.e. when n ≥ n 1 (r) for some value n 1 (r), in Section 3. Theorem 1.2. For any r ≥ 3, there exists a value n 1 (r) such that for all n ≥ n 1 (r) the following hold • any graph G of order n with radius r satisfies W (G) ≥ W (G n,r,1 ). Equality holds if and only if G ∼ = G n,r,s where 1 ≤ s ≤ n−2r+2 2 .
There are some main ideas in the proof which are somewhat intuitive. Since the minimum average distance is close to 1, we expect there are many vertices of high degree and there is a large clique. Because the conjectured extremal graphs contain large blow-ups, we can expect there are vertices such that G\v satisfies the original statement as well. By proving that the total distance W (G) and W (G\v) differ by a certain amount with equality if and only if a structure close to the conjectured structure appears, at the end we only need to prove that an extremal graph is exactly of the form G n,r,s .
For small values of n with respect to a fixed r, there might be a few exceptions to Conjecture 1.1. The graph Q 3 is a counterexample for the equality statement when r = 3 and n = 8, as it also has a total distance equal to 48. A computer check 1 has shown that this is the only counterexample for n < 10. In the digraph setting, the total distance W (D) of a digraph D equals the sum of all distances between all ordered pairs of vertices. The outradius of D is equal to the smallest value r such that there exists a vertex x for which d(x, v) ≤ r for every vertex v of the digraph D.
In this setting, when the outradius r = 1, the extremal digraphs are obviously bidirected cliques, their total distance being 2 n 2 . When r = 2, the extremal digraphs are bidirected cliques missing n edges, one starting in every vertex, with the restriction that no n − 1 of those missing edges end in the same vertex. In this case the total distance W (D) = n 2 . For r ≥ 3, we propose the digraph analog to Conjecture 1.1. The definition of D n,r,s being stated in Section 2. Figure 2 shows D n,r,s for r = 3. Just as in the graph case, like with Conjecture 1.1, for fixed r there may be a few counterexamples for small n. Also Conjecture 1.3 is asymptotically true. Theorem 1.4. For r ≥ 3, there exists a value n 1 (r) such that for all n ≥ n 1 (r) the following hold • for any digraph D of order n with outradius r, we have W (D) ≥ W (D n,r,1 ).  The proof for this in Section 4 uses the same main ideas as in the graph case, but turns out to be slightly more difficult as the distance function is not symmetric. In this case, we consider an expression which gives information about W (D) − W (D\v) in a more general setting. In Section 5 we start the investigation of the question for radius instead of out-radius in the digraph case.

Notation and definitions
A graph will be denoted by G = (V, E) and a digraph will be denoted by D = (V, A). The order |V | will be denoted by n. A clique or bidirected clique on n vertices will be denoted by K n . A cycle or directed cycle of length k will be denoted by C k . The clique number of a graph G, ω(G), is the order of the largest clique which is a subgraph of G. The complement G c of graph G = (V, E) is the graph with vertex set V and edge set E c = V 2 \E. The complement D c of a digraph D is defined similarly, where the set of directed edges is the complement with respect to the edges of a bidirected clique.
The degree of a vertex in a graph deg(v) equals the number of neighbours of the vertex v, i.e. deg(v) = |N (v)|. In a digraph, we denote with N − (v) and N + (v) the (open) in-and outneighbourhood of a vertex v. The indegree deg − and outdegree deg + of a vertex v, equals the number of arrows ending in or starting from the vertex v, i.e. deg + (v) = |N + (v)| and deg − (v) = |N − (v)|. The total degree deg of a vertex v in a digraph is the sum of the in-and outdegree, i.e. deg(v) = deg Let d(u, v) denote the distance between vertices u and v in a graph G or digraph D, i.e. the number of edges or arrows in a shortest path from u to v. The eccentricity of a vertex v in a graph equals ecc(v) = d(v, V ) = max u∈V d(v, u). The radius and diameter of a graph on vertex set V are respectively equal to min v∈V ecc(v) and max v∈V ecc(v) = max u,v∈V d(u, v).
In the case of digraphs, the distance function between vertices is not symmetric and so there is a difference between the inner-and outer eccentricity ecc . We use the conventions as in e.g. [1]. Radius, inradius and outradius are defined in Subsection 2.1 in [1] or Subsection 3.1 in [2] but for clarity we define them in the next sentences. The in-and outradius of a digraph D are defined by rad − (D) = min{d(V, x) | x ∈ V } and rad + (D) = min{d(x, V ) | x ∈ V }. The radius of a digraph D is defined as rad(D) = min{ d(x,V )+d(V,x) 2 | x ∈ V }. Sometimes authors refer to the outradius as radius (see e.g. Subsection 1.4 in [3]), as outradius is the most common one between those three definitions.
The total distance, also called the Wiener index, of a graph G equals the sum of distances between all unordered pairs of vertices, i.e.
. The Wiener index of a digraph equals the sum of distances between all ordered pairs of vertices, i.e.
) as x → ∞, then one uses f (x) = Θ(g(x)) as x → ∞. Sometimes we do not write the "as x → ∞" if the context is clear. Let G n,r,s , where n ≥ 2r and 1 ≤ s ≤ n−2r+2 2 , be the graph obtained by taking two blow-ups of two consecutive vertices in a cycle C 2r by cliques K s and K n−2r+2−s respectively. Note that ω(G n,r,s ) = n − 2r + 2.
Let D 2r,r,1 be a digraph with 2r vertices v 1 , v 2 , . . . v r and w 1 , w 2 , . . . , w r , such that there are directed edges from v i to v j and from w i to w j if and only if j ≤ i + 1 and a directed edge from any v i to w 1 and from any w i to v 1 .
Let D n,r,s , n ≥ 2r and 1 ≤ s ≤ n−2r+2 2 , be the digraph obtained by taking the blow-up of v 1 by a bidirected clique K s and a blow-up of w 1 by a bidirected clique K n−2r+2−s .

Conjecture 1.1 for large order
In this section we will prove the conjecture of Chen et al, Conjecture 1.1, for sufficiently large order compared with the radius. The main idea in the proof is that in a possible extremal graph, there is a big blow-up (clique) and these vertices add at least some value to the total distance, where equality only holds if we have some structure close to our conjectured extremal graphs. More detailed, in this section we start with the calculation of the total distance of the graphs G n,r,s and D n,r,s , which we want to prove to be extremal. This is done in Lemma 3.1. Next, in Lemma 3.2 we show that graphs with small total distance contain a big clique. In Lemma 3.3 we prove that when the total distance is small, there is at least one vertex which does not influence other distances nor the radius. Lemma 3.4 then describes the minimal sum of distances using such a vertex, where equality happens if and only if we have a certain base structure. To finish the proof, we show that if the order is large, equality in Lemma 3.4 has to occur in some step. From that, we derive a lowerbound of the total distance which equals the total distance of the graphs of the form G n,r,s and we conclude. (2) Proof. The graph G n,r,s can be constructed in a different way. Start with a cycle C 2r = (v 1 v 2 . . . v 2r ) and a K n−2r . Connect s − 1 vertices of K n−2r with v 1 , v 2 and v 3 , and the other n−2r−(s−1) vertices with v 2 , v 3 and v 4 . The sum of distances between any vertex of the cycle C 2r with respect to all other vertices of the cycle equals 1 + 2 + . . . + r + (r − 1) + . . . + 1 = r 2 . Due to double counting, one has W (C 2r ) = 2r×r 2 2 = r 3 . The sum of distances between a vertex of the K n−2r and all vertices of C 2r is now exactly one more, i.e. r 2 + 1. Due to these observations, we can now compute W (G n,r,s ).
In the digraph case, one can build D n,r,s from a D 2r,r,1 and a K n−2r with some additional edges. First, we will compute W (D 2r,r,1 ) where v i , w i are used as has been done in the definition of D 2r,r,1 at the end of Section 2. The factors 2 are due to symmetry between v and w. The factor r in the second term is due to the fact that d(v i , w j ) = j for every 1 ≤ i ≤ r.
Using these computations, we can now compute W (D n,r,s ).
Lemma 3.2. Suppose G is a graph with order n and total distance W (G) < n 2 + an, for some positive constant a. Then ω(G) ≥ n 8a , i.e. G contains a clique of order at least n 8a . Furthermore there exists such a clique such that all its vertices have degree at least equal to n − 4a.
Proof. Let S be the set of vertices of degree at least n − 4a, equivalently the set of vertices for which strictly less than 4a vertices are at distance at least 2 from v. Note that |S| ≥ n 2 since otherwise for at least half of the vertices v, we have that u∈V d(u, v) ≥ (n − 1) + 4a and hence Now the following algorithm (presented in pseudocode) returns a set T of at least n 8a vertices in S which form a clique, as we will prove next.
Start with T = ∅ and U = S. While U is nonempty , do : Take arbitrary v ∈ U and set T :=T ∪ {v} and U :=U ∩ N (v) return T By induction, we see that every vertex in U is a common neighbour of all vertices in T and T is a clique. The base case is trivial since T = ∅. In every step, when a new vertex v is chosen, the vertices in T ∪ {v} form a clique since we add a vertex adjacent to all vertices of a clique. The set U , only containing common neighbours of the original set T by the induction hypothesis, is updated by removing the non-neighbours of v. Hence U ∩ N (v) only contains common neighbours of T ∪ {v}. So the induction is done. In every step, |T | increases by one, while |U | decreases by at most 4a since N (v) contains all vertices except at most 4a by the definition of S. This implies that the algorithm cannot terminate after less than |S| 4a ≥ n 8a steps and so |T | is at least this value. This is a clique containing only vertices of S, i.e. all of its vertices have degree being at least n − 4a.
Let a, r ≥ 3 be fixed integers. There is a value n 0 (a, r) such that for any n ≥ n 0 and any graph G of order n and radius r with W (G) < n 2 + an, there is a vertex v ∈ G such that G\v has radius r and the distance between any 2 vertices of G\v equals the distance between them in G.
Proof. Let n 0 := n 0 (a, r) = 192a 3 . By Lemma 3.2, we know that G contains a clique K k with k ≥ n 8a = 24a 2 , such that the degree of all its vertices is at least n − 4a. We can take a subset S of vertices of K k of size at most 16a 2 such that for any 2 vertices v, w in G\K k which are connected with a common neighbour in K k have a common neighbour in S and any vertex v in G\K k with a neighbour in K k has a neighbour in S. Taking a first vertex x in K k , it has degree at least n − 4a and hence it is connected to all vertices except for s ≤ 4a − 1 vertices v 1 , v 2 , . . . , v s in G\K k . For every of the s vertices v i which has a neighbour x i in K k , add a single x i to S. For every v i , 1 ≤ i ≤ s, there are at most 4a − 1 vertices which are not neighbours of x i . For any such non-neighbour of X i which has a common neighbour in K k with v i , add the common neighbour to S. We end with a set S of size at most 4a(4a − 1) + 1 < 16a 2 which satisfies the properties. Now for any vertex z ∈ K k \S, the distance measure in G\z equals the restriction to G\z of the distance measure in G, since for every two vertices in G\z there is a shortest path in G between the two vertices that does not contain z by the construction of S. This also implies that for every u ∈ K k different from z, ecc(u) attains the same value in G and in G\z. Vertices w ∈ G\K k cannot have larger eccentricity in G\z than in G. As a consequence, there is at most one value z * such that G\z * has radius larger than r.
Since removing one vertex cannot decrease the radius with more than one, the radius of G\z is at least r − 1. Equality can occur if and only if there is at least one vertex w z in G\K k such that its eccentricity as a vertex in G\z equals r − 1 and d G (z, w z ) = r. Let T be the set of all vertices z ∈ K k \S for which this happens. For any fixed z ∈ T , z is the only vertex at distance r from w z , implying that the corresponding w z are different for different z ∈ T.
Since n k ≤ 8a, this implies that |T | < 8a 2 . Combining with k ≥ 24a 2 and |S| < 16a 2 , we can choose a vertex v ∈ K k \(S ∪ T ∪ {z * }) as the latter is non-empty. This vertex v is a vertex satisfying the statement of the lemma. Lemma 3.4. Let G be a graph with radius r and order n such that there is some vertex v ∈ G such that G\v has also radius r and the same restricted distance function. Then Equality occurs if and only if there is a path Q = w r w r−1 . . . w 1 u 1 u 2 . . . u r as subgraph of G, and Inequality 3 holds strictly. Since G has radius r, there exists a vertex z with d(u r ′ −r+1 , z) = r. Since we now assume r ′ < 2r − 1, z is not a vertex of P. Take a shortest path P ′ from v to z and let u i be the vertex in P ∩ P ′ with the largest index, where we take By applying the triangle inequality, we have that Here we used 2r − 1 > r ′ ≥ r, i ≥ 0 and the inequality between the quadratic and arithmetic mean (QM-AM). Equality occurs if and only if r ′ = r, i = 0, d(v, z) = r − 1 and d(w, v) = 1 for every vertex w which is not part of P nor of P ′ . These conditions are equivalent with the characterization given in the statement of this lemma.
Proof of Theorem 1.2. Take a = a(r) = (r − 1) 2 and n 1 := n 1 (r) = n 0 (r) + a(r)n 0 (r), where n 0 is chosen as in Lemma 3.3. Let n ≥ n 1 . Let G be a graph of order n and radius r with minimal total distance among such graphs. From the minimum total distance assumption, we have that such a graph G satisfies W (G) < n 2 + an, where a := a(r) = (r − 1) 2 due to the example G n,r,s and Equation 1. Let G = G n . By iterating Lemma 3.3 we can find a sequence of n − n 0 ≥ an 0 vertices v n 0 +1 , . . . , v n such that the graphs G i = G i+1 \v i+1 for n 0 ≤ i ≤ n all have radius r, the distance function of G j equals the distance function of G i restricted to the vertices of G j for every n 0 ≤ j < i ≤ n and W (G i ) ≤ i 2 + ai for every n 0 ≤ i ≤ n. The latter expression is true by induction as the base case W (G) < n 2 + an holds and Lemma 3.4 implies the induction step If there is no equality in any of these steps using Lemma 3.4, then which is a contradiction.
Let v = v m be a vertex whose addition gives equality in Lemma 3.4, then we know part of the characterization of the graph G m due to Lemma 3.4. We note that u i is not connected with w j when j < i as otherwise d(w 1 , u i ) = j < i. Similarly, u i is not connected with w j when j > i as otherwise d(u 1 , w j ) = i < j. Also vertices u i and w i are not connected when 1 < i ≤ r − 1 as otherwise ecc(w i ) < r. For any neighbour w of v = w 1 , it is easy to see that we need as otherwise there is some vertex with eccentricity strictly smaller than r.
Using the previous observations, we conclude that the graph with minimal total distance at this point (i.e. equality in the three above estimates) was some G m,r,s . As W (G m ) = W (G m,r,s ), we will need equality in Lemma 3.4 when applying to every G k and v k with n ≥ k > m and so G is also of the form G n,r,s .

Conjecture 1.3 for large order
In this section, we prove that Conjecture 1.3 does also hold when the order is sufficiently large in terms of the outradius. The main ideas are somewhat similar as in Section 3. In Section 5 we briefly discuss the analog given the radius instead of outradius of a digraph.
Lemma 4.1. Let D be a digraph with average total degree at least being equal to 2(n − 1) − 2t. Then at least half of the vertices have a total degree which is at least 2(n − 1) − 4t + 1. Also ω(D) ≥ n 8t , i.e. D contains a bidirected clique of size at least n 8t all of whose vertices have total degree more than 2(n − 1) − 4t.
Proof. The first part is true as the contrary would lead to a contradiction. If more than half of the vertices have total degree equal to at most 2(n − 1) − 4t, then the average is smaller than 2(n − 1) − 2t as the other vertices have total degree at most 2(n − 1). The second part is analogous to the proof of Lemma 3.2, with S now being the set of vertices with total degree more than 2(n − 1) − 4t. In the algorithm, N (v) = N + (v) ∩ N − (v), will denote the set of vertices w which are both in-neighbours and out-neighbours of v. Again in every step, at most 4t vertices do not belong to both the in-and outneighbourhood of the additional selected vertex, so U is decreased with at most 4t and we started with |S| ≥ n 2 vertices.
Lemma 4.2. Let D be a digraph with outradius r ≥ 3, order n and size at least n(n − 1 − t) such that it contains a bidirected clique K k for which all of its vertices have total degree at least 2(n − 1) − 4t + 1. If k > 32t 2 + 4t + 1 + tn k , there is a vertex v ∈ K k such that D\v has outradius r and the distance between any 2 vertices of D\v equals the distance between them in D.
Proof. We will first construct a set S of vertices of K k of size at most 32t 2 + 4t + 1 such that for any 2 vertices x, y in D\K k for which there exists a vertex v ∈ K k such that − → xv and − → vy are edges of D, there is an s ∈ S with − → xs and − → sy being edges of D as well. Take a first vertex s 1 of K k and assume Z is the set of vertices z of D\K k such that there are not edges in both directions between s 1 and z. For any vertex z ∈ Z that has an edge towards K k and − → zs 1 ∈ A, take an additional vertex s i ∈ K k (which we put in S) such that there is an edge from z to s i . Similarly for every vertex z ∈ Z such that there is an edge from K k to z and − → s 1 z ∈ A, we take some s i ∈ K k for which there is an edge from s i to z. Note at this point |S| ≤ 4t due to the total degree of s 1 being at least 2(n − 1) − 4t + 1. Now there at most 2 · 4t · 4t = 32t 2 pairs of vertices (x, y) in D\K k such that the property is not satisfied by S yet. Adding a corresponding vertex of K k to S gives a set S satisfying the property. Now for any vertex v ∈ K k \S, the distance measure in D\v equals the restriction to D\v of the distance measure in D. To see this, pick any x, y ∈ D\v and note that there is a shortest path from x to y in D that avoids v.
As is the case in Lemma 3.3, we see there can be at most one vertex z * ∈ K k \S such that the outradius of D\z * is larger than r (being equal to r + 1) since the out-eccentricities for the other vertices in K k are the same in D as in D\z * and the out-eccentricities for other vertices in D\K k cannot become larger.
For any vertex v ∈ K k \S, the outradius of D\v is at least r − 1. In case equality holds, there is at least one vertex w v in D\K k such that d(w v , v) = r and the out-eccentricity of w v as a vertex in D\v equals r − 1. Let T be the set of all vertices v ∈ K k \S for which this happens. Note that no value w can be associated with two elements v 1 , v 2 ∈ T because then d(w, v 1 ) = d(w, v 2 ) = r and thus the out-eccentricity of w in D\v 1 , D\v 2 is still at least r. So for every v ∈ T , there is an associated w v which is not associated with another element from T , for which there is no edge from w v to any element of K k since r ≥ 3. This implies that at least |T |k arrows are missing, which has to be at most tn due to the lowerbound on the size |A| of n(n − 1 − t), i.e. |T | ≤ tn k . Since k > 32t 2 + 4t + 1 + tn k ≥ |S| + |T |, we can choose a vertex v ∈ K k \(S ∪ T ).
There is a value n 0 (r) such that for any n ≥ n 0 and any digraph D of order n and outradius r with W (D) < 2 n 2 + an for some positive integer a, there is a vertex v ∈ D such that D\v has outradius r and the distance between any 2 vertices of D\v equals the distance between them in D.
Proof. If the size of the digraph would be smaller than n(n − 1 − a), then at least an pairs of vertices are at distance at least 2 implying W (D) ≥ n(n − 1 − a) + 2an = 2 n 2 + an, which is a contradiction. Due to the equivalent of the handshaking lemma, we know the average total degree is at least 2(n − 1) − 2a and hence by Lemma 4.1 we know that D contains a clique K k with k ≥ n 8a , such that the (total) degree of all its vertices is at least 2(n − 1) − 4a. Let n 0 := n 0 (r) = 8a(40a 2 + 4a) + 1. Since k ≥ n 8a > 40a 2 + 4a = 32a 2 + 4a + 8a 2 ≥ 32a 2 + 4a + an k when n ≥ n 0 , the result follows from Lemma 4.2.
with equality if and only if the following conditions (up to labeling) are satisfied • there is a second directed path vw 2 w 3 . . . w r with d(v, w r ) = r − 1 which is disjoint from the first directed path except from the vertex v, • d(u i , v) = 1 for every 1 ≤ i ≤ r, and • d(v, u) = 1 for all vertices u not on those two directed paths.
Proof. We will conclude by doing calculations over possible non-realizable graphs, i.e. we only take into account some important distances, the d(u i , v) and d(v, x i ) and some substructure of shortest paths towards possible x i . By doing this, it is easier to perform reductions such that we are able to focus on important substructures of the graph. As at the end equality can be obtained, there is no problem having intermediate steps where the sequence of distances is not realizable. For any r ′ − r + 1 ≤ i ≤ r ′ , we let x i be a vertex on the path P if possible (that is when d(u i , v) + i − 1 ≥ r). If this is not possible, we take a shortest (directed) path Q from v to x i such that P ∩ Q is the directed path vu 1 . . . u j with j being minimal among all such possible choices for Q and we say x i is of type j. For every j, if there are multiple x i that have type j, we can associate the vertex x i such that d(u j , x i ) is maximal to all of them as we will only keep track of the distances d(u i , v) and do not look to possible shorter paths from a certain u i to x i . The shortest path from u j to the x i with d(u j , x i ) maximal will be denoted Q j .
Remark that Q j 1 and Q j 2 are disjoint for j 1 < j 2 , since if there was a vertex in common, one could find a shortest path from v of type j 1 in both cases.
We will prove for V * , being the set of all vertices in P and all paths Q j , that First we notice that there will be no x i of type j for any j ≥ 2 in an optimal possible graph.
and so one of the conditions for the choice of x k are not met. When k > j + d(u j , x i ) then it was possible to choose the vertex If one removes x i of the digraph, takes z m as the new x i and increase all values d(u k , v) by one if j + 1 ≤ k ≤ j + d(u j , x i ), then the conditions are still satisfied and the lefthandside of Equation (5) decreased with at least (j + d(u j , x i ) − 1) − d(u j , x i ) = j − 1. Hence this was not optimal.
Next, we want to prove there is no Q 1 as well in an optimal configuration. So suppose we have some x i of type 1 and none of type at least 2, so we only have the possible paths Q 0 and Q 1 . If the path Q 0 its length ℓ 0 is more than the length ℓ 1 of Q 1 , we can delete Q 1 . In the other case we can delete Q 0 and Q 1 and add the path Q 0 = vw 2 w 3 . . . w ℓ 1 +1 x of length ℓ 1 + 1 instead, as then the vertex x can do the job of the x i . If d(u 1 , v) > 1, we can decrease this distance with 1 without destroying one of the necessary properties. If d(u 1 , v) = 1, then r ′ > r, or r ′ = r which implies Q 0 had length at least r − 1 and so some positive terms in the LHS of Equation (5) disappeared.
So having no x i of type j ≥ 1, we know that there is some directed path Q 0 = vw 2 w 3 . . . w s for some 2 ≤ s ≤ r ′ which is disjoint from P (except from v), or we could take x i = u i−1 in all cases (i.e. also Q 0 had length 0). In the second case, we have that d( ≥ r and hence we can compute that the LHS of Equation (5) is at least Here we used the inequality between the quadratic and arithmetic mean (QM-AM) at the end. In the first case, we have that d( we can assume 2 ≤ s ≤ r, as s ≥ r + 1 implies the result trivially. When s ≤ i ≤ r, we have d(u i , v) + d(v, u i−1 ) ≥ r. So we get that the LHS of Equation (5) is at least This expression is strictly increasing for r ′ ≥ r, so the minimum is attained when r ′ = r. So the expression reduces to r 2 − r − s + 1 which is minimal for s = r and gives exactly (r − 1) 2 .
Since equality cannot occur for r ′ > r, we conclude no other extremal cases could be left. In case of equality in Inequality (4), we also need d(v, u) = 1 for vertices u not considered (not on the paths), from which the characterization of the equality constraints is clear as well.
Proof of (6). First note that for every u ∈ V \V 1 and v ∈ V , we have By the given conditions, we know that d( We also have d(u i , w j ) = j for all 1 ≤ i ≤ r − 1, j being an upper bound since d(u i , w 1 ) = 1 and d(w 1 , w j ) = j − 1, while d(u i , w j ) < j for some j would imply d(u i , w r ) < r and hence ecc + (u i ) < r, which would be a contradiction.
Next, we see d(w i , u j ) ≥ j for all 1 ≤ j ≤ r − 1. When j = 1, this is by definition of distance and when i = 1 this is a consequence of the triangle-inequality r = d(w 1 , u r ) ≤ d(w 1 , u j ) + d(u j , u r ) = r − j + d(w 1 , u j ). When d(w i , u j ) < j for some 1 < j < r and 1 < i, we would get ecc Inequality (6) would is true if every term d(x, y) is lowerbounded by the distance of the corresponding vertices in D 2r,r,1 . The only distances for which we did not conclude that lowerbound already are of the form d(u r , w j ) for some j or d(w i , u r ) for some i. The condition d(u r , w j ) < j for some j > 1 would imply d(u r , w j ) = j − 1 since otherwise ecc + (u r−1 ) < r and hence d(u r , u r−1 ) = r as ecc + (u r ) = r and so d(u r , u i ) ≥ 1 + i for all 1 ≤ i ≤ r − 1. Note this already implies that if d(w i , u r ) = r for all i, Inequality (6) is strictly satisfied, since at most r − 1 terms are one smaller than the corresponding term in D 2r,r,1 , no other terms are smaller and the terms d(u r , u r−1 ) = r and d(u r , u 1 ) = 2 are respectively r − 1 and 1 larger than the corresponding terms in D 2r,r,1 .
So we can focus on the case d(w i , u r ) < r for some i. Since d(w 1 , u r ) = r, d(w 1 , w i ) = i − 1 and d(w i , u r−1 ) ≥ r − 1, we see that d(w i , u r ) < r is only possible if there is an arc from w r to u r because there need to be an arc ending in u r different from − −−− → u r−1 u r and the other possibilities would lead to d(w 1 , u r ) < r. So assume d(w r , u r ) = 1 and remark we now need d(w i , u r−1 ) = r for every 1 < i ≤ r, so d(w i , u j ) ≥ j + 1 for all 1 ≤ j ≤ r − 1 and 1 < i ≤ r. So at least (r − 1) 2 distances are at least 1 larger than the corresponding distances in D 2r,r,1 , while the edge between w r and u r made we won only r(r−1) 2 with the terms corresponding to d(w i , u r ) for 2 ≤ i ≤ r and at most r − 1 from the possibility that d(u r , w j ) = j − 1. But in that latter case, due to d(u r , u r−1 ) being necessarily equal to r, there is a term increasing with r − 1 again. Since r(r−1) 2 < (r − 1) 2 , Inequality (7) is strict. We conclude that Inequality (6) is always true and equality is possible if and only if D[V 1 ] is isomorphic to D 2r,r,1 .
Proof of (7). Note that d(y, w r ) ≥ r − 2 and d(y, u r ) ≥ r − 1 due to the conditions on w 1 . As ecc + (y) ≥ r, there is at least one vertex at distance ≥ r, the only possible vertices for this are in {w r , u r−1 , u r }. So we consider the three cases.
If d(y, w r ) = r, combining this with d(y, u r ) ≥ r − 1 we already have The same holds if d(y, u r ) ≥ r or d(y, u r−1 ) = r and d(y, w r ) ≥ r−1. In the case d(y, u r−1 ) = r it is even strict since d(y, u r ) ≥ r − 1 > 1. If d(y, u r ) = r and d(y, w r ) = r − 2, this implies d(u i , y) ≥ 2 for every 1 ≤ i ≤ r as otherwise ecc + (u i ) < r. So now we have from which the result follows again as the sum is at least (r − 1) 2 + 1.
In the remaining case, we have d(y, u r−1 ) = r, d(y, u r ) = r − 1 and d(y, w r ) = r − 2 and the conclusion is again analogous.
To have equality in Equation (7), we need d(x, y) = 1 for every x ∈ V 1 . Since ecc + (u r ) ≥ r, we need d(y, w r ) ≥ r − 1. The only cases we have to consider where equality can be attained, have {d(y, w r ), d(y, u r )} = {r − 1, r}. This implies that the only arcs from y to V 1 can end in w 2 , w 1 , v 1 , v 2 and the outneighbourhood cannot contain both w 2 and v 2 . In the equality cases, Proof of Theorem 1.4. Let a = a(r) = (r − 1) 2 and n 1 := n 1 (r) = n 0 (r) + a(r)n 0 (r). Let n ≥ n 1 . Note that a digraph D with order n ≥ n 1 which would be a counterexample to Theorem 1.4 will satisfy W (D) < W (D n,r,1 ) < 2 n 2 + an due to Equation 2. By Lemma 4.3 we know that there is a sequence of n−n 0 ≥ an 0 vertices v n 0 +1 , . . . , v n which are consecutively added, starting from some digraph H = D n 0 with order n 0 and radius r, such that distances and the radius do not change. Note that a digraph of radius r satisfies the conditions of Proposition 4.4. If no addition of any of the an 0 vertices gives equality in Proposition 4.4, then which is a contradiction. So we have equality in some step adding v m in Proposition 4.4 and we get a digraph D m at that step. Knowing the conditions of equality of Proposition 4.4 and that D m has outradius r, we may apply Lemma 4.5 to conclude that D m should be of the form D m,r,s for some s and so does the digraph at the final step. So there was no digraph with smaller total distance and the extremal graphs are exactly of the form D n,r,s .

Minimum for digraphs given order and radius
For small r, we easily can determine the exact minimum Wiener index of digraphs with given order and radius r. Note that r can be an integer or a half-integer, i.e. 1 ≤ r with r ∈ 1 2 Z. For r = 2, one can conclude from Theorem 3 in [5] that the digraph has diameter 2 as any digraph with diameter at least 3 has total distance at least equal to n 2 and the digraphs attaining equality have radius 3 2 . Proposition 5.1. The minimum Wiener index among all digraphs D with radius r and order n is at least Equality holds if and only if D = K n , D c is the union of ⌈ n 2 ⌉ directed edges which are spanning or D c is the union of some vertex disjoint directed cycles (possible of length 2) which span all vertices.
When r ≥ 5 2 , one could guess that the extremal digraphs are blow-ups of simple structures closely related to e.g. a directed cycle C ⌈r+1⌉ . It turns out that this is not the case. For r = 5 2 , Figure 3 presents at the left the structure of the extremal digraphs for n ∈ {4, 5} when taking s = n − 3. Nevertheless, for n = 6 the structure is different as the structure at left has a larger total distance for s = 3 than the digraph at the right 2 . This implies that the characterization for n ≥ 2r cannot be as simple as it was in Conjecture 1.1 and Conjecture 1.3. The strategies used before, are also harder in this case. The analog of Proposition 4.4 for radius does not give a unique nor clear configuration or substructure for example. Some examples for this are presented in Figure 4 and Figure 5 in case the radius is 3 or 3.5. We note that taking a blow-up in vertices 2 or 4 of these configurations gives the minimum total distance up to a constant, as a corollary of the ideas used before. We give a sketch of that partial result in this section for r ≥ 7 2 . We now prove the asymptotic result roughly by showing the corresponding version of what has been done for the out-radius. Lemma 4.1 does not use the notion of out-radius, but we note that the numbers can be chosen a bit different and can be straightforward generalized to Lemma 5.2. Note that the idea behind is exactly the same as in the proof of Markov's inequality if you state it as "the probability that a vertex has at least b times the average degree, is at most 1 b ", where one has to apply this to the complement graph. Lemma 5.2. Let D be a digraph with average total degree at least being equal to 2(n − 1) − 2t.
Then at most 1 b of the vertices have a total degree which is at most 2(n − 1) − 2bt. Also at most 1 b of the vertices have in-degree at most (n − 1) − bt and the same holds for out-degree being at most (n − 1) − bt. Furthermore D contains a bidirected clique of size at least n 8t all of whose vertices have total degree more than 2(n − 1) − 4t.
The analog of Lemma 4.2 and Lemma 4.3 needs some more care and we only prove r ≥ 7 2 to avoid even more details.
There is a value n 0 (r) such that for any n ≥ n 0 and any digraph D of order n and radius r with W (D) < 2 n 2 +an for some positive integer a, there is a vertex v ∈ D such that D\v has outradius r and the distance between any 2 vertices of D\v equals the distance between them in D.
Proof. Note that the size of the digraph is at least n(n − 1 − a) again and by Lemma 5.2 there exists a bidirected clique K k with k ≥ n 8a all of whose vertices have total degree more than 2(n − 1) − 4a. As was done in Lemma 4.2, we know there exists a set S of at most 32a 2 + 4a + 1 vertices of K k such that for any 2 vertices x, y in D\K k for which there exists a vertex v ∈ K k such that − → xv and − → vy are edges of D, there is an s ∈ S with − → xs and − → sy being edges of D. Also for any vertex v in D\K k for which there is an arc towards or from a vertex u in K k , there is such an arc − → vs or − → sv for some s ∈ S. This implies that both the in-and outeccentricities of the remaining vertices in D\z for any z ∈ K k \S cannot increase. As a consequence, there is at most one vertex z * ∈ K k \S such that the radius of D\z * is larger than r. Next, we invest vertices z ∈ K k \S such that the radius in D\z becomes smaller. Then there must be a vertex w for which ecc + or ecc − strictly decreases. Similarly as in Lemma 4.2, in case d(w, z) or d(z, w) equals at least 3 and the distance from or towards the other vertices is smaller, we can see that there is only one choice for z such that this is the case for a particular w and there are most an k of them in any of the two directions. Now look to the number of vertices z ∈ K k \S such that d(w, z) = 2 for a choice of w and d(w, v) = 1 for all vertices v different from w and z. Assume there are at least b(r)a + 1 of them. Then as a corollary of Lemma 5.2 at least 1 − 1 b n vertices are connected with at least one of these vertices w. Since at most 4a vertices do not have a directed edge towards the corresponding z, there are at least 1 − 1 b n − 4a vertices having out-eccentricity at most 2. So all of them have in-eccentricity at least 2r − 2. Let U be the set of these vertices. For every u, the vertices v for which d(v, u) = m for any 3 ≤ m ≤ 2r − 2 do not belong to U, as v ∈ U implies d(v, V ) ≤ 2. This implies that There are also at least n 2 pairs of vertices x, y ∈ V such that d(x, y) = 2. For b and n sufficiently large, this would lead to a contradiction with W (D) < 2 n 2 + an since 1 2 + 2r−2 i=3 (i − 1) = (r − 2)(2r − 1) + 1 2 > a when r ≥ 7 2 . Similarly there are less than b(r)a + 1 vertices z ∈ K k \S such that d(w, z) = 2 for a choice of w and d(w, v) = 1 for all vertices v = z. If n 0 (and b) is large enough to conclude k ≥ 32a 2 + 4a + 1 + 2 an k + 2(b(r)a + 2), we know there exists a vertex satisfying the conditions of the lemma.
The analog of Proposition 4.4 without characterization is immediate. Theorem 5.5. For r ≥ 7 2 , the minimum Wiener index among all digraphs with radius r and order n is of the form 2 n 2 + ⌊(r − 0.5) 2 ⌋n − Θ r (1). Proof. First we note that digraphs of the desired form do exist. When r ∈ N, we can take the blow-up of a vertex of a directed cycle C r+1 . When r ∈ 1 2 + N, we can take a directed cycle C r+1.5 with an additional directed edge in the opposite direction between two neighbours. Now take a blow-up of the startvertex of that additional directed edge.
Let a := a(r) = ⌊(r − 0.5) 2 ⌋. Choose n 0 as in Lemma 5.3. Then for n ≥ n 0 and any extremal digraph D or order n and radius r we know that there are n−n 0 vertices satisfying the conclusion of Lemma 5.3. Let H be the digraph induced by the other n 0 vertices. We now can compute the Wienerindex in reverse order again using Proposition 5.4. With a = ⌊(r − 0.5) 2 ⌋, we have Note that an 0 = Θ(r) to conclude.

Conclusion
The question of determining the minimum total distance among all graphs or digraphs of order n and (out)radius r and characterizing the extremal (di)graphs has been solved for n large enough compared with r. This partially solves the conjecture of Chen, Wu and An [4]. It might be very challenging to solve the question completely for every order, as there might be sporadic extremal graphs other than Q 3 which are also different from those conjectured in the initial conjecture. Also for the digraph version, there might be some counterexamples.
Note that a digraph with outradius r only needs n ≥ r + 1 instead of n ≥ 2r. For n = r + 1, the only digraph with outradius r is the directed cycle C r+1 . For r + 2 ≤ n ≤ 2r − 1, the extremal graphs may be blow-ups of C r+1 , but this is not verified. The analog for the radius in the digraph case was considered as well. Nevertheless, it seems hard to get the exact lowerbound and extremal digraph(s) for all values of r and n.
Open access statement. For the purpose of open access, a CC BY public copyright license is applied to any Author Accepted Manuscript (AAM) arising from this submission.