New Bounds for Topological Indices on Trees through Generalized Methods

: Topological indices are useful for predicting the physicochemical behavior of chemical compounds. A main problem in this topic is ﬁnding good bounds for the indices, usually when some parameters of the graph are known. The aim of this paper is to use a uniﬁed approach in order to obtain several new inequalities for a wide family of topological indices restricted to trees and to characterize the corresponding extremal trees. The main results give upper and lower bounds for a large class of topological indices on trees, ﬁxing or not the maximum degree. This class includes the ﬁrst variable Zagreb, the Narumi–Katayama, the modiﬁed Narumi–Katayama and the Wiener index.


Introduction
A topological descriptor is a number computed from a molecular graph representing some information of the corresponding chemical compound. These descriptors are commonly used in mathematical chemistry, and in particular, in the QSPR/QSAR research. A topological index is a topological descriptor that correlates with a physicochemical property of some molecule. Topological indices are useful for predicting the physicochemical behavior of chemical compounds.
After this original work, many topological indices have been defined. A common strategy to define a topological index is to consider some computation with the end-vertex degrees of edges. This approach has given some particularly useful indices. Possibly the best known of them is the Randić connectivity index (see [10]). There are more than thousand papers and a couple of books dealing with this molecular descriptor (see, e.g., [11][12][13][14][15] and the references therein). Additionally, Gutman et al. defined the first and second Zagreb indices, denoted respectively as M 1 and M 2 (see [16]).
The first and the second variable Zagreb indices were introduced in [17] by Miličević and Nikolić as M α where α ∈ R, uv denotes the edge joining the vertices u and v in the graph G, and d u denotes the degree of u. There are many papers dealing with these indices; see, e.g., [18][19][20][21][22][23][24].
Note that M 0 1 is n, M 1 1 is 2m, M 2 1 is the first Zagreb index M 1 , M −1 1 is the inverse index ID [25], M 3 1 is the forgotten index F, etc.; additionally, M 0 2 is m, M −1/2 2 is the Randić index, M 1 2 is the second Zagreb index M 2 , M −1 2 is the modified Zagreb index [26], etc. Variable molecular descriptors were introduced to characterize heteroatoms in molecules (see [27,28]). Additionally, they are useful for studying structural differences in the molecule (for example, the role of carbon atoms in alkylcycloalkanes in [29]). In these descriptors, the variables can be fixed along the regression. This way, the error produced estimating some property can be reduced. For example, Gutman and Tosovic compared in [30] the correlation between 20 (vertex-degree-based) topological indices and the standard heat of formation and boiling points of octane isomers. They proved that the second variable Zagreb index M α 2 with exponent α = −1 improved the performance in this case from the Randić index (R = M −1/2 2 ). Ref. [31] shows that the second variable Zagreb index is used in the structure-boiling point modeling of benzenoid hydrocarbons. Several properties of these indices are discussed in several papers (see, e.g., [32][33][34][35][36][37]).
Among the many uses of topological indices we shall specially mention the medical and pharmacological applications. Moreover, in the 1990s, the field lived an important expansion with many published works. We may cite at least the publications by Erdös, [38,39].
A typical problem in this topic is finding good bounds for the indices, usually when some parameters of the graph (the diameter, the girth, the maximum or minimum degree, etc.) are known. The aim of this paper is to use a unified approach in order to prove new inequalities when the graph is a tree for a wide family of topological indices. Additionally, we try to characterize those trees which are extremal for them. The main results give upper and lower bounds for a wide class of topological indices when the graph is a tree, fixing or not the maximum degree. This class includes the first variable Zagreb, the Narumi-Katayama, the modified Narumi-Katayama and the Wiener index. Our unified approach allows us to obtain quite a few inequalities at once; some were already known, but many are new.
The outline of the paper is as follows. In Section 2 we obtain, by using Schur-convexity, the extremal trees with n vertices for a large family of topological indices (see Theorems 1-4); these results are applied for the first variable Zagreb, the Narumi-Katayama and the modified Narumi-Katayama indices in Theorems 5-8. The Schur-convexity also allows us to find the extremal trees with n vertices and maximum degree ∆ for the previous family of topological indices (see ; these results are applied for the first variable Zagreb, the Narumi-Katayama and the modified Narumi-Katayama indices in Theorems 13-16. Section 3 contains the results on extremal trees with n vertices for a large class of topological indices, including the Wiener index and many generalizations of this index (see Theorems 17 and 18); Theorems 19 and 20 provide similar results for trees with n vertices and maximum degree ∆.
Herein, G = (V(G), E(G)) will denote a non-oriented, finite, connected, simple (i.e., without multiple edges and loops), non-trivial (i.e., E(G) = ∅) graph. Notice that asking the graph G to be connected is not a relevant restriction, since any graph representing a molecule is connected. T denotes a tree; i.e., a graph without cycles. Throughout this work, m will denote the cardinality of E(G) and n the cardinality of V(G).

Remark 1.
Consider any tree T with n vertices v 1 , . . . , v n , ordered in such a way that if x = x T = (x 1 , . . . , x n ) is the n-tuple where x i is the degree of the vertex v i , then x i ≥ x i+1 for every 1 ≤ i ≤ n − 1. By handshaking Lemma, it is urgent to check that x ∈ S 2n−2 .
where we use the convention ∑ k i=j a i = 0 when j > k, as usual.
Given any function f : [1, ∞) → R, let us define the index Besides, if f takes positive values, then we can define the index Lemma 1 implies the following results.
Moreover, if f is a strictly convex function, then the lower bound is attained if and only if T is the path graph, and the upper bound is attained if and only if T is the star graph.
Moreover, if f is a strictly concave function, then the lower bound is attained if and only if T is the star graph, and the upper bound is attained if and only if T is the path graph.
Since the logarithm is a strictly increasing function, a tree is extremal for I I f (T) if and only if it is extremal for Thus, Lemma 1 and (3) imply the following results.

Theorem 3.
If T is a tree with n ≥ 2 vertices and f : [1, ∞) → R + is a function such that log f is convex, then Moreover, if log f is a strictly convex function, then the lower bound is attained if and only if T is the path graph, and the upper bound is attained if and only if T is the star graph.

Theorem 4.
If T is a tree with n ≥ 2 vertices and f : [1, ∞) → R + is a function such that log f is concave, then Moreover, if log f is a strictly concave function, then the lower bound is attained if and only if T is the star graph, and the upper bound is attained if and only if T is the path graph.

Theorem 5. If T is a tree with n ≥ 2 vertices and
Moreover, the lower bound is attained if and only if T is the path graph, and the upper bound is attained if and only if T is the star graph.
The lower bound in Theorem 5 appears in [40].
Theorem 6. If T is a tree with n ≥ 2 vertices and α ∈ (0, 1), then Moreover, the lower bound is attained if and only if T is the star graph, and the upper bound is attained if and only if T is the path graph.
The upper bound in Theorem 6 appears in [40].
Note that the cases α = 0 and α = 1 are trivial, since M 0 Theorem 5 has the following consequences.

Corollary 1.
If T is a tree with n ≥ 2 vertices, then the following inequalities hold:

Moreover, each lower bound is attained if and only if T is the path graph and each upper bound is attained if and only if T is the star graph.
The inequalities for M 1 (T) in Corollary 1 appear in [41].

Corollary 2.
If T is a tree with n vertices and α < 1, then The Narumi-Katayama index was defined in [42] as Based on this, it was defined in [43] the modified Narumi-Katayama index Since t log t is a strictly convex function and log t is a strictly concave function, Theorems 3 and 4 imply, respectively, the following results.

Theorem 7.
If T is a tree with n ≥ 2 vertices, then

Moreover, the lower bound is attained if and only if T is the path graph, and the upper bound is attained if and only if T is the star graph.
Theorem 8. If T is a tree with n ≥ 2 vertices, then Moreover, the lower bound is attained if and only if T is the star graph, and the upper bound is attained if and only if T is the path graph.
For any t ∈ R, we denote it as usual by t , the lower integer part of t; i.e., the greater integer less than or equal to t.
Additionally notice that, since j 0 ∆ ≤ n − 2 + j 0 , we have 2n Thus, y n−1 = 1 if ∆ ≥ 3. If ∆ = 2, then j 0 = n − 2, and we conclude y ∈ S ∆ 2n−2 . Since n − ∆ ≤ n − 2 and we have z ∈ S ∆ 2n−2 . Seeking for a contradiction assume that for some k ≤ n − ∆. Thus, x k = 1 and we conclude x i = 1 for every k ≤ i ≤ n, and so, leading to a contradiction. Hence, for every k ≤ n − ∆, For every k ≤ j 0 it is trivial to check that Additionally, since for every k > j 0 , x k ≥ y k = 1, it is readily seen that Thus, x ≺ y.
Lemma 2 has the following consequences.

Theorem 9.
If T is a tree with n ≥ 3 vertices and maximum degree ∆, j 0 = n−2 ∆−1 and f : [1, ∞) → R is a convex function, then Moreover, the lower bound is attained if and only if T has the degree sequence z in Lemma 2, and the upper bound is attained if and only if T has the degree sequence y in Lemma 2.
Theorem 10. If T is a tree with n ≥ 3 vertices and maximum degree ∆, j 0 = n−2 ∆−1 and f : [1, ∞) → R is a concave function, then Moreover, the lower bound is attained if and only if T has the degree sequence y in Lemma 2, and the upper bound is attained if and only if T has the degree sequence z in Lemma 2.
Theorem 11. If T is a tree with n ≥ 3 vertices and maximum degree ∆, j 0 = n−2 ∆−1 and f : [1, ∞) → R + is a function such that log f is convex, then Moreover, the lower bound is attained if and only if T has the degree sequence z in Lemma 2, and the upper bound is attained if and only if T has the degree sequence y in Lemma 2.

Theorem 12.
If T is a tree with n ≥ 3 vertices and maximum degree ∆, j 0 = n−2 ∆−1 and f : [1, ∞) → R + is a function such that log f is concave, then Moreover, the lower bound is attained if and only if T has the degree sequence y in Lemma 2, and the upper bound is attained if and only if T has the degree sequence z in Lemma 2.
Hence, the following results hold.

Moreover, the lower bound is attained if and only if T has the degree sequence z in Lemma 2, and the upper bound is attained if and only if T has the degree sequence y in Lemma 2.
Theorem 14. If T is a tree with n ≥ 3 vertices and maximum degree ∆, j 0 = n−2 ∆−1 and α ∈ (0, 1), then Moreover, the lower bound is attained if and only if T has the degree sequence y in Lemma 2, and the upper bound is attained if and only if T has the degree sequence z in Lemma 2.

Theorem 15.
If T is a tree with n ≥ 3 vertices and maximum degree ∆, and j 0 = n−2 ∆−1 , then Moreover, the lower bound is attained if and only if T has the degree sequence z in Lemma 2, and the upper bound is attained if and only if T has the degree sequence y in Lemma 2.

Theorem 16.
If T is a tree with n ≥ 3 vertices and maximum degree ∆, and j 0 = n−2 ∆−1 , then Moreover, the lower bound is attained if and only if T has the degree sequence y in Lemma 2, and the upper bound is attained if and only if T has the degree sequence z in Lemma 2.
Theorem 13 has the following consequence.

Corollary 3.
If T is a tree with n ≥ 3 vertices and maximum degree ∆, and j 0 = n−2 ∆−1 , then the following inequalities hold: Moreover, each lower bound is attained if and only if T has the degree sequence z in Lemma 2, and each upper bound is attained if and only if T has the degree sequence y in Lemma 2.

Wiener Index and Its Generalizations
The Wiener index of a graph G was defined in [1] as where {u, v} goes over every pair of distinct vertices in G.
In [7], Randić considered a sophisticated version for trees of the Wiener index. Later, this new index has been called the hyper-Wiener index. The generalization to graphs of this index appeared in [6] as For further results on the hyper-Wiener index, see [2][3][4]. In particular, WW(G) has shown good correlations with several properties (see, for example, [3] and the references therein). We are considering the following generalization of the Wiener index.
with λ ∈ R. Clearly, if λ = 1, then W λ is just the Wiener index. Additionally, if λ = −1, it is the reciprocal Wiener index, and if λ = −2, it is the Harary index. Moreover, the hyper-Wiener index satisfies that WW = (W 1 + W 2 )/2, and therefore it is a simple combination of W 1 and W 2 . In [8] there appears a topological index which can be defined as (2W 1 + 3W 2 + W 3 )/6-that is, a combination of W 1 , W 2 and W 3 . More relations of this type can be found in [5].
The following alternatives for the q-Wiener index (with q > 0 and q = 1) appear in [9].
where L denotes the diameter of G and Given any function h : Z + → R, we define the h-Wiener index of G as Through this generalized definition, all these indices and many more can be studied simultaneously.
Notice that if S n is the star graph with n vertices, then If P n is the path graph with n vertices, then Let us recall the following definitions from [45]. A major vertex of G is a vertex with degree at least three. A vertex v with degree one is called a terminal vertex of a major vertex w of G if d G (v, w) < d G (v, u) for any other major vertex u in G. The number of terminal vertices of a major vertex w is called the terminal degree of w. Let M(G) be the set of major vertices of G with terminal degree greater than one.

Lemma 3. If T is a tree, then M(T) = ∅ if and only if T is a path graph.
Proof. The if part is obvious. Suppose T is a tree different from a path graph. Then, T contains a major vertex v 1 . If v 1 / ∈ M(G), then at least two of the components of T \ {v 1 } must contain a major vertex. Let v 2 be a major vertex in the component C 1 ∈ T \ {v 1 }. Now, if v 2 / ∈ M(G) then at least two of the components of T \ {v 2 } must contain a major vertex, and at one of them, C 2 is contained in C 1 . Let v 3 be a major vertex in C 2 . Then, v 3 = v 1 , v 2 and the argument can be repeated. For every i either v i ∈ M(G) or there is a connected component C i ∈ T \ {v i } with C i ⊂ C i−1 and a major vertex v i+1 ∈ C i different from {v 1 , . . . , v i }. Since T is finite, there is some n such that v n ∈ M(G).
Given w ∈ M(G) and a terminal vertex u j of w, let us denote by [u j , w] the shortest path joining u j and w; note that d(u j , w) is the length of the path [u j , w]. Theorem 17. Let T be a tree with n vertices.
(1) If h is an increasing function, then

the lower bound is attained if and only if T is the star graph and the upper bound is attained if and only if T is the path graph.
(2) If h is a decreasing function, then the lower bound is attained if and only if T is the path graph and the upper bound is attained if and only if T is the star graph.

Proof.
Assume that h is an increasing function.
Since T is a tree with n vertices, there are n − 1 edges, and therefore, n − 1 pairs of adjacent vertices and ( n 2 ) − (n − 1) = 1 2 (n − 1)(n − 2) pairs of vertices at distance at least 2. Thus, W h (T) ≥ (n − 1) h(1) + 1 2 (n − 1)(n − 2) h(2). This bound is attained if and only if T does not contain a path of length 3; that is, if and only if T is the star graph.
Assume that T is a tree with n vertices such that W h (T) is maximal and suppose that T contains a vertex with degree at least 3. Then, by Lemma 3, there is a vertex w ∈ M(T) and two terminal vertices of w, u 1 , u 2 with d(w, u 1 ) = k. Consider new vertices {v i : 1 ≤ i ≤ k} and let Notice that the subgraph [u 1 , u 2 ] in T and the subgraph [w, v k ] in T 1 are both paths with the same length. Hence, the restriction of W h in these subgraphs is equal and it is urgent to check that W h (T 1 ) > W h (T) (since h is an increasing function), leading to a contradiction. Therefore, the maximum degree of T is less than 3, and so, T is the path graph.
If h is a decreasing function, then a similar argument gives the result.
Theorem 18. Let G be a graph with n vertices.
(1) If h is an increasing function, then the equality is attained in the upper bound if and only if G is the path graph.
(2) If h is a decreasing function, then the equality is attained in the upper bound if and only if G is the complete graph.

Proof.
Assume that h is an increasing function. Since G is a graph with n vertices, there are ( n 2 ) pairs of vertices at distance at least 1. Since h is an increasing function, we have W h (T) ≥ ( n 2 ) h(1), and the equality is attained if and only if every pair of vertices is at distance 1; i.e., G is the complete graph.
Let us prove now the upper bound. If G is a tree, then Theorem 17 gives the inequality. Assume now that G is not a tree. Thus, there exists an edge uv ∈ E(G) such that the graph G \ uv (defined by . By applying this argument a finite number of times, we obtain a tree T with W h (T) > W h (G), and so Theorem 17 gives the result.
If h is a decreasing function, then a similar argument gives the result.
Given any 2 ≤ ∆ ≤ n − 1, let T ∆ n be the tree with n vertices obtained from the star graph S ∆+1 and the path graph P n−∆ , where a vertex with degree 1 in each graph is identified. Note that T 2 n = P n and T n−1 n = S n .
(1) If h is an increasing function, then and the equality is attained if and only if T = T ∆ n .
(2) If h is a decreasing function, then and the equality is attained if and only if T = T ∆ n .
Proof. Assume that h is an increasing function. If ∆ = 2 or ∆ = n − 1, then T is the path graph or the star graph, respectively, and the inequality is, in fact, an equality. Hence, we can assume that 2 < ∆ < n − 1.
Let us consider a maximal T for W h . Since ∆ > 2, Lemma 3 gives k = |M(T)| ≥ 1. If k ≥ 2, the same argument from the proof of the upper bound in Theorem 17 shows that there exists a tree T such that W h (T ) > W h (T). Thus, |M(T)| = 1, and so, if w is the vertex with M(T) = {w}, then T is the union of ∆ paths [w, w 1 ], . . . , [w, w ∆ ]. Since ∆ < n − 1, there exists w i with d(w i , w) > 1. Seeking for a contradiction assume that d(w j , w) > 1 for some j = i (1 ≤ j ≤ ∆) with d(w, w j ) ≤ d(w, w i ) (relabeling if necessary). Let z be a new vertex and consider the graph T obtained from T ∪ {w i z} by removing the edge incident to w j . Hence, T is also a tree with n vertices and maximum degree ∆, and W h (T ) > W h (T). Thus, d(w j , w) = 1 for every j = i, and so, T = T ∆ n . If h is a decreasing function, then a similar argument gives the result.
Theorem 20. Let G be a graph with n vertices and maximum degree ∆ ≥ 2.
(1) If h is an increasing function, then and the equality is attained if and only if G = T ∆ n . (2) If h is a decreasing function, then and the equality is attained if and only if G = T ∆ n .

Proof.
Assume that h is an increasing function.
If G is a tree, then Theorem 19 gives the inequality. Assume now that G is not a tree. Fix a vertex w ∈ V(G) with degree ∆. Thus, there exists an edge uv ∈ E(G) such that w / ∈ {u, v} and G \ uv is connected. Note that the graph G \ uv has n vertices and maximum degree ∆, since the degree of w in G \ uv is ∆. Since d G\uv (w 1 , w 2 ) ≥ d G (w 1 , w 2 ) for every w 1 , w 2 ∈ V(G) and d G\uv (u, v) > 1 = d G (u, v), we conclude W h (G \ uv) > W h (G). By applying this argument a finite number of times, we obtain a tree T with n vertices, maximum degree ∆ and W h (T) > W h (G). Thus, Theorem 19 gives the result.
If h is a decreasing function, then a similar argument gives the result.

Conclusions
A typical problem in the study of topological indices is finding good bounds for some indices, when some parameters of the graph are known. In this paper we use a unified approach in order to prove new inequalities when the graph is a tree for a wide family of topological indices. Additionally, we characterize those trees which are extremal for them.
First of all we obtain, by using Schur-convexity, the extremal trees with n vertices for a large family of topological indices (see Theorems 1-4); these results are applied for the first variable Zagreb, the Narumi-Katayama and the modified Narumi-Katayama indices in Theorems 5-8. The Schur-convexity also allows us to find the extremal trees with n vertices and maximum degree ∆ for the previous family of topological indices (see Theorems 9-12); these results are applied for the first variable Zagreb, the Narumi-Katayama and the modified Narumi-Katayama indices in Theorems 13-16.
Additionally, we obtain similar results on extremal trees with n vertices for a large class of topological indices, including the Wiener index and many generalizations of this index (see Theorems 17 and 18); Theorems 19 and 20 provide similar results for trees with n vertices and maximum degree ∆.
Finally, we want to remark on a new direction for future research. We are studying how to extend these results for indices defined by ∑ uv∈E(G) F(d u , d v ), for an appropriate function F. These indices include, for instance, the case of the second variable Zagreb index.
Author Contributions: Both authors contributed equally with the ideas and writing of this paper. Both authors have read and agreed to the published version of the manuscript Funding: The first author was partially supported by a grant from Ministerio de Ciencia, Innovación y Universidades (PGC2018-098321-B-I00), Spain; the second author was partially supported by two grants from Ministerio de Economía y Competitividad, Agencia Estatal de Investigación (AEI) and Fondo Europeo de Desarrollo Regional (FEDER) (MTM2016-78227-C2-1-P and MTM2017-90584-REDT), Spain.