The Maximum Wiener Index of Maximal Planar Graphs

The Wiener index of a connected graph is the sum of the distances between all pairs of vertices in the graph. It was conjectured that the Wiener index of an $n$-vertex maximal planar graph is at most $\lfloor\frac{1}{18}(n^3+3n^2)\rfloor$. We prove this conjecture and for every $n$, $n \geq 10$, determine the unique $n$-vertex maximal planar graph for which this maximum is attained.


Introduction
The Wiener index is a graph invariant based on distances in the graph. For a connected graph G, the Wiener index is the sum of distances between all unordered pairs of vertices in the graph and is denoted by W (G). That means, Where d G (u, v) denotes the distance from u to v i.e. the minimum length of a path from u to v in the graph G.
It was first introduced by Harry Wiener in 1947, while studying its correlations with boiling points of paraffin considering its molecular structure [31]. Since then, it has been one of the most frequently used topological indices in chemistry, as molecular structures are usually modelled as undirected graphs. Many results on the Wiener index and closely related parameters such as the gross status [17], the distance of graphs [13] and the transmission [27] have been studied. A great deal of knowledge on the Wiener index is accumulated in several survey papers [9,10,11,21,32]. Finding a sharp bound on the Wiener index for graphs under some constraints, has been one of the research topics attracting many researchers.
The most basic upper bound of W (G) states that, if G is a connected graph of order n, then W (G) ≤ (n − 1)n(n + 1) which is attained only by a path [5,26,24]. Many sharp or asymptotically sharp bounds on W (G) in terms of other graph parameters are known, for instance, minimum degree [1,4,22], connectivity [7,14], edge-connectivity [6,5] and maximum degree [15]. For finding more details in mathematical aspect of Wiener index, see also results [8,16,18,19,20,23,25,28,29,30]. One can study the Wiener index of the family of connected planar graphs. Since the bound given in (1) is attained by a path, it is natural to ask for some particular family of planar graphs. For instance, the family of maximal planar graphs. The Wiener index of maximal planar graph with n vertices, n ≥ 3 has a sharp lower bound (n − 2) 2 + 2, the bound is attained by any maximal planar graph such that the distance between any pair of vertices is at most 2 (for instance a planar graph containing the n-vertex star). Z. Che and K.L. Collins [2], and independentlyÉ. Czabarka, P. Dankelmann, T. Olsen and L.A. Székely [3], gave a sharp upper bound of a particular class of maximal planar graphs known as Apollonian networks. An Apollonian network may be formed, starting from a single triangle embedded on the plane, by repeatedly selecting a triangular face of the embedding, adding a new vertex inside the face, and connecting the new vertex to each three vertices of the face. They showed that Theorem 1.1. ( [2,3]) Let G be an Apollonian network of order n ≥ 3. Then W (G) has a sharp upper bound It has been shown explicitly that the Wiener index is attained for the maximal planar graphs T n , we will give the construction of T n in the next section, see Definition 2.1. The authors in [2] also conjectured that this bound also holds for every maximal planar graph. It has been shown that the conjectured bound holds asymptotically [3]. In particular they showed the following result.
for every k-connected maximal planar graph of order n.
In this paper, we confirm the conjecture. Theorem 1.3. Let G be an n, n ≥ 6, vertex, maximal, planar graph. Then we have, . Equality holds if and only if G is isomorphic to T n for all n, n ≥ 10.

Notations and Preliminaries
Let G be a graph. We denote vertex set and edge set of G by V (G) and E(G) respectively. For a vertex set S ⊂ V (G), the status of S is defined as the sum of all distances from S to all vertices of the graph. It is denoted by σ G (S), thus For simplicity, we may use the notation σ(S) instead of σ G (S) when the underlined graph is clear. We have, Here we are defining an Apollonian network T n on n vertices. We will prove later that it is the unique maximal planar graph which maximizes the Wiener index.
Definition 2.1. The Apollonian network T n is the maximal planar graph on n ≥ 3 vertices, with the following structure, see Figure 1.
If n is a multiple of 3, then the vertex set of T n can be partitioned in three sets of same size, A = {a 1 , a 2 , · · · , a k }, B = {b 1 , b 2 , . . . , b k } and C = {c 1 , c 2 , · · · , c k }. The edge set of T n is the union of following three sets )} forming paths in each vertex class, see Figure 1a. Note, that there are two triangular faces a 1 , b 1 , c 1 and a k , b k , c k .
If 3|n − 1, then T n is the Apollonian network which may be obtained from T n−1 by adding a degree three vertex in the face a 1 , b 1 , c 1 or a n−1 If 3|n − 2, then T n is the Apollonian network which may be obtained from T n−2 by adding a degree three vertex in each of the faces a 1 , b 1 , c 1 and a n−1  The following lemmas will be used in the proof of Theorem 1.3.
Lemma 2.2. Let G be a s-connected, maximal planar graph. Then every cut set of size s contains a Hamiltonian cycle of length s.
Proof. Let us assume that a cut set of size s is S = {v 1 , v 2 , . . . , v s }. Let u and w be two vertices such that any path from u to w contains at least one vertex from S. Since G is s-connected, by Menger's Theorem, there are s vertex disjoint paths from u to w. Each of the paths intersects S in disjoint nonempty sets, therefore each of the paths contain exactly one vertex from S. We may assume, that in a particular planar embedding of G, those paths are ordered in such a way that one of the two regions determined by the cycle obtained from two paths from u to w containing v ix and v i x+1 has no vertex from S (where indices are taken modulo s), see Figure 2. Then we must have the edges {v ix , v i x+1 }, otherwise, from the maximality of the planar graph, there is a path from the vertex u to the vertex w that does not contain a vertex from S, a contradiction. Therefore we have a cycle of length s on the vertex set The following definition would be particularly helpful. Given a set S ⊆ V , we define the Breadth First Search partition of V with root S, P G S or simply P S when the underline graph is clear, by P S = {S 0 , S 1 , . . . }, where S 0 = S, and for i ≥ 1, S i is the set of vertices at distance exactly i from S. We refer to those sets as levels (of P s ), S 1 is the first level, and if k is the largest integer such that S k = ∅, the we refer to S k as the last level. We refer to S 0 and the last level as terminal level. Note that by definition every level beside the first and last is a cut set of G. We denote by P v the Breadth First Search partition from v, that is the partition P {v} . Lemma 2.3. Let G be an n + s vertex graph and S, S ⊂ V (G), be a set of vertices of size s. Such that each non-terminal level of P S has size at least 3. Then we have Similarly we can prove the following Lemmas.
Lemma 2.4. Let G be an n + s vertex graph and S, S ⊂ V (G), be a set of vertices of size s. Such that each non terminal level of P S has size at least 4. Then we have Lemma 2.5. Let G be an n + s vertex graph and S, S ⊂ V (G), be a set of vertices of size s. Such that each non terminal level of P S has size at least 5. Then we have if n ≡ 0 (mod 5); 1 10 (n 2 + 5n + 4), if n ≡ 1, 4 (mod 5); 1 10 (n 2 + 5n + 6), if n ≡ 2, 3 (mod 5).

Proof of Theorem 1.3
Proof. We are going to prove Theorem 1.3 by induction, on the number of vertices. In [3] it is shown that Theorem 1.3 holds, for n ≤ 18. Therefore, we may assume n ≥ 19. Let G be a maximal planar graph. The proof contains three cases depending on the connectivity of the graph G. Since G is a maximal planar graph, it is either 3, 4 or 5 connected. Thus, we may consider three different cases.
Since G is 5-connected, and each of the non-terminal levels of P v is a cut set, we have that each non-terminal level has size at least 5. Therefore from Lemma 2.5, we have, for all n ≥ 4. Therefore we are done if G is 5-connected, since n ≥ 19. Case 2. Let G be 4-connected and not 5-connected. Then G contains a cut set of size 4, which induces a cycle of length four, by Lemma 2.2. Let us denote the vertices of this cut set as v 1 , v 2 , v 3 and v 4 , forming the cycle in this given order. The cut set divides the plane into two regions, we will call them the inner and the outer regions respectively. Let us denote the number of vertices in the inner region by x. Let us assume, without loss of generality, that x is minimal possible, but greater then one. Obviously x ≤ n−4 2 or x = n − 5. From here on, we deal with several sub-cases depending on the value of x.
Case 2.1 In this case we assume x ≥ 4 and x = n − 5. Let us consider the sub-graph of G, say G ′ , obtained by deleting all vertices from the outer region of the cycle v 1 , v 2 , v 3 , v 4 in G. The graph G ′ is not maximal, since the outer face is a 4-cycle. The graph G is 4-connected, therefore it does not contain the edges {v 1 , v 3 } and {v 2 , v 4 }, consequently we may add any of them to G ′ , to obtain a maximal planar graph. Adding an edge decreases the Wiener index of G ′ . In the following paragraph, we prove that one of the edges decrease the Wiener index of G ′ by at most x 2 16 .
Let A be the subset of vertices of G ′ not contained in any of the A i 's. So A, A 1 , A 2 , A 3 , A 4 is a partition of vertices of G ′ . It is simple to observe that, adding the edge {v i , v i+2 }, for i ∈ {1, 2}, decreases the distance between a pair of vertices, then these vertices must be from A i and A i+2 . If there is a vertex u which has three neighbours from the cut set, without loss of generality say v 1 , v 2 , v 3 , then A 2 = ∅, since G is 4-connected. therefore we are done in this situation. Otherwise, for each pair 4 , v 1 }, there is a distinct vertex which is adjacent to both vertices of the pair. Therefore the size of A is at least 4. Hence the size of the vertex set ∪ 4 i=1 A i , is at most x. By the AM-GM inequality, we have that one of |A 1 | · |A 3 | or |A 2 | · |A 4 | is at most x 2 16 . Therefore we can choose one of the edges {v 1 , v 3 } or {v 2 , v 4 }, such that after adding that edge to the graph G ′ , the Wiener index of the graph decreases by at most x 2 16 . Let us denote the maximal planar graph obtained by adding this edge to G ′ by G x+4 .
Similarly, we denote the maximal planar graph obtained from G, by deleting all vertices in the inner region and adding the diagonal which decreases the Wiener index by at most (n−x−4) 2 Consider the graph G n−x and a sub-set of it's vertices S = {v 1 , v 2 , v 3 , v 4 }. Since the graph G is 4-connected, each non-terminal level of P G n−x S has at least 4 vertices. Therefore we get that Recall that G ′ is the graph obtained from G by deleting the vertices from the outer region. For each i ∈ {1, 2, 3, 4}, consider the BFS partition P G ′ v i . Note that, x ≥ 4, G is 4-connected, and by minimality of x, x > 1, we have that every non-terminal level of P G ′ v i has at least 5 vertices, except for the first level which may contain only four vertices and the level before the last, which may also contain four vertices in this case the last level has size exactly one. Status of the v i is maximised, if number of vertices in the first and before the last level are four, last level contains only one vertex and every other level contains exactly five vertices.
To simplify calculations, of the status of the vertex v i , we may hang a new temporary vertex on the root and we may bring a vertex from the last level to the previous level. This modifications do not change the status of the vertex, but it increases number of vertices. Now we may apply Lemma 2.5 for this BFS partition considering that number of vertices in all levels is exactly 5. Therefore we have σ G ′ (v i ) ≤ (x+4) 2 +5(x+4) 10 . Observe that this status contains distances, from v i to other vertices from the cut set, which equals to four. Note that this is an uniform upper bound for the status of each of the vertices from the cut set.
Finally we may upper bound the Wiener index of G in the following way, In the first line we upper bound all distances between pairs of vertices on the cut set and outer region, and between pairs of vertices on the cut set and inner region. We take minus 8 since distances between the pairs from the cut set was double counted. In the second line we upper bound all distances from the outer region to the inner region. This distances are split in two, distances from the outer region to the cut set and from the fixed vertex, without loss of generality say v 1 , of the cycle to the inner region.
We are going to prove that W (G) ≤ 1 18 (n 3 + 3n 2 ) − 1, therefore we will be done in this sub-case.
We need to prove the following inequality After we simplify, we get We know that 4 ≤ x ≤ n−4 2 and if we set x = 4, we get 2176 + 528n − 75n 2 ≤ 0 which holds for all n, n ≥ 10. Therefore, if the derivative of the right hand side of the inequality is negative for all {x | 4 ≤ x ≤ n−4 2 }, then the inequality holds for all these values of x. Differentiating the LHS of the Inequality (2), with respect to x, we get δ δx If we set x = 4 in Equation 3, we get 1 120 (96+57n−5n 2 ), which is negative for all n, n ≥ 13. If we set x = n−4 2 in Equation 3, we get 1 160 (−n 2 +8n+128), which is negative for all n, n ≥ 17. Therefore Equation 3 is negative in the whole interval. Since n ≥ 19, we have W (G) ≤ 1 18 (n 3 + 3n 2 ) − 1, and this sub-case is settled.
Case 2.2 In this case, we assume 2 ≤ x ≤ 3. From the minimality of x, we have x = 2. Let us consider the maximal planar graph, denoted by G n−2 , obtained from G by deleting these two vertices from the inner region and adding an edge which decreases the Wiener index by at most (n−6) 2 16 . By the choice of x, we have that for a vertex inside the cut set v, each level of P G v contains at least 5 vertices, except the first one which contains only 4 and the level before last may contain 4 vertices too followed by one vertex in the last level. Therefore the status of the vertex v is maximized, if the last level contains one vertex, the level before the last and the first level contain four vertices and every other level contains five vertices. Therefore status of the vertices inside can be bounded by σ 5 (n) = 1 10 (n 2 +5n). This bound comes from Lemma 2.5, after similar modifications of the BFS partition as in previous case. Finally we have, The last inequality holds for all n ≥ 10. Therefore we have settled this sub-case too since n ≥ 19.
Case 2.3 In this case we assume x = n − 5. Therefore we have a cut set of size one. With similar reasoning, as in previous case we get The last inequality holds for all n ≥ 9. Therefore, we have settled this sub-case too since n ≥ 19.
We have considered all sub-cases when G is 4-connected. We proved that in this case Wiener index is strictly less than the desired upper bound. Case 3. Let G be 3-connected and not 4-connected.
Since G is not 4-connected and it is a maximal planar graph, it must have a cut set of size 3, say {v 1 , v 2 , v 3 }. Which induces a triangle from the Lemma 2.2. Let us assume, without loss of generality, that number of vertices in the inner region of the cut set is minimal, say x.
Case 3.1. Assume x ≤ 2. From the minimality of x, we have x = 2, therefore x = 1. Let us denote this vertex as v. Let G n−1 be a maximal planar graph obtained from G by deleting the vertex v. From the Lemma 2.3, we have σ G (v) ≤ 1 6 (n 2 + n) − 1 3 1 3|(n−1) . Finally we have, In this case the equality holds if and only if the graph obtained after deleting the vertex v is T n−1 .
We can observe that, if we add the vertex v to the graph T n−1 , the choice that maximize the status of v is only when we get the graph T n . Hence we have the desired upper bound of the Wiener index and equality holds if and only if G = T n . Case 3.2. Assume x = 3. Let us denote vertices in the inner region as x 1 , x 2 and x 3 . From the minimality of x and maximality of G, the structure of G in the inner region is well defined, see Figure  3a. If we remove these three inner vertices, the graph we get is denoted by G n−3 and is still maximal. Hence we may use the induction hypothesis for the graph G n−3 . Consider the graph G n−3 and a vertex set has at least three vertices except the terminal one. Therefore we may apply Lemma 2.3, then we have σ G n−3 ({v 1 , v 2 , v 3 }) ≤ 1 6 ((n − 6) 2 + 3(n − 6) + 2). To estimate distances from the vertices in the outer region to the vertices in the inner region we do the following. We first estimate distances from the outer region to the cut set and from the fixed vertex on the cut set to all x i . The distances from the vertices in the outer region to the The sum of distances from v i to the vertices {x 1 , x 2 , x 3 } is 4. Note that, if we take a vertex in the outer region which has at least two neighbours on the cut set, then for this vertex we need to count 3 for the distances from the cut set to the vertices {x 1 , x 2 , x 3 }. Since we have at least two such vertices, all cross distances can be bounded by 3σ G n−3 ({v 1 , v 2 , v 3 }) + 4(n − 5) + 6. Then we have, Therefore, this case is also settled.
Therefore, this case is also settled. Case 3.4 Assume x = 5. From the minimality of x and maximality of the planar graph G, there are three configurations of the inner region, see Figure 4. Consider a maximal planar graph on the n − 5 vertices, say G n−5 , which is obtained from G by deleting 5 vertices from the inner region. We will apply the induction hypothesis for this graph G n−5 , to bound the sum of the distances between the vertices of V (G n−5 ) in the graph G. By applying Lemma 2.3 for G n−5 and S = {v 1 , v 2 , v 3 }, we get σ G n−5 ({v 1 , v 2 , v 3 }) ≤ 1 6 ((n − 8) 2 + (n − 8) + 2). The sum of the distances between five inner vertices is at most 13. The sum of the distances from v i to all of the vertices inside is at most 8. Finally we have, W (G) ≤ 1 18 ((n − 5) 3 + 3(n − 5) 2 ) + 13 + 5 6 ((n − 8) 2 + (n − 8) + 2) + 8(n − 5) Therefore this case is also settled. Case 3.5 Assume x ≥ 6. First we settle for x ≥ 7 and then for x = 6. Consider the maximal planar graph on n−x vertices, say G n−x , which is obtained from G by deleting those x vertices from the inner region of the cut set {v 1 , v 2 , v 3 }. Consider the maximal planar graph on x + 3 vertices, say G x+3 , which is obtained from G, by deleting all n − x − 3 vertices from the outer region of the cut set {v 1 , v 2 , v 3 }. We know by induction that W (G x+3 ) ≤ 1 18 ((x + 3) 3 + 3(x + 3) 2 ). There are at least two vertices from the cut set {v 1 , v 2 , v 3 }, such that each of them has at least two neighbours in the outer region of the cut set. Without loss of generality, we may assume they are v 1 and v 2 . Hence if we consider P G n−x v 1 and P G n−x v 2 , we will have 4 vertices in the first level of and at least three in the following levels until the last one. Therefore we have σ G n−x (v 1 ) ≤ σ 3 (n − x − 2) + 1 ≤ {v 1 ,v 2 } contains at least 4 vertices. Therefore by applying Lemma 2.4, we get σ G x+3 ({v 1 , v 2 }) ≤ 1 8 (x 2 + 6x + 9). We have, The first term of the sum is an upper bound for the sum of all distances which does not cross the cut set. The second and the third terms upper-bounds all cross distances in the following way-we may split this sum into two parts for each crossing pair sum from inside to {v 1 , v 2 } set and from v i , i ∈ {1, 2} to the vertex outside, those are the second and the third terms of the sum accordingly. Therefore applying estimates, we get After simplification we have − x 3 + x 2 (n + 3) + x(21 − 6n) − (15 + 3n) ≥ 0. (12) where δ δx − x 3 + x 2 (n + 3) + x(21 − 6n) − (15 + 3n) = −3x 2 + (2n + 6)x + 21 − 6n.
The derivative is positive when x ∈ [7, n 2 ]. Hence since the inequality (12) holds for x = 7, it also holds for all x, x ∈ [7, n 2 ]. Therefore, if x ≥ 7 we are done. Finally if x = 6, then distances from v 1 and v 2 to all vertices inside is 9 instead of 73 8 as in 11. Thus we get an improvement of Inequality (11), which shows that W (G) < 1 18 (n 3 + 3n 2 ) even for x = 6. Therefore we have settled 3-connected case too.

Concluding Remarks
There is the unique maximal planar graph T n , maximizing the Wiener index, Theorem 1.3. Clearly T n is not 4-connected. One may ask for the maximum Wiener index for the family of 4-connected and 5-connected maximal planar graphs. In [3], asymptotic results were proved for both cases. Moreover, based on their constructions, they conjecture sharp bounds for both 4-connected and 5-connected maximal planar graphs. Their conjectures are the following.