The -index of a graph is defined as . In this paper, we use edge swapping transformations to find the extremal value of the F-index among the class of trees with given order, pendent vertices, and diameter. We determine the trees with given order, pendent vertices, and diameter having the greatest -index value. Also, the first five maximum values of F index among the class of trees with given diameter are determined.

1. Introduction

Mathematical chemistry is providing effective and time-saving methods for evaluating the properties of chemical compounds without having to go through tedious laboratory experimentations. Topological indices are function maps that identify key computational and topological aspects of a structure and evaluate chemical compound properties without using quantum mechanics as final production [1]. The total -electron energy [2] of a molecule was found to be related to its thermodynamic stability that depends on the structure of a molecule that is its topology. Relationship between and topology of a molecule was determined by its graphical structure [3]. Comparison was made between the original vertex degree-based indices and lately defined edge degree-dependent indices (termed as reformulated Zagreb indices), while relating the two versions of indices, the relation existing between the graph and its line graph was utilized. Yang et.al. [4] brought into consideration to researchers the relation between the subtree number index and the Weiner index in the class of spiro chains and polyphenyl hexagonal chains.

In this paper, we consider only simple finite and connected graphs. In a graph , we denote its vertex set and edge set by and , respectively. Let denotes the degree of a vertex . The distance between two vertices is denoted by and is defined as the length of the shortest path joining them. For more undefined terminologies related to graph theory, we refer [5].The first topological index were proposed by Weiner [6] (namely, the Weiner index), while he was working on the boiling point of paraffin. The Weiner index is denoted by and is defined as

Zagreb indices were introduced by Gutman et al. [2] that depend on degrees of nodes and are defined as

These terms were recognized to be a measure of the extent of branching of the carbon atom skeleton of the underlying molecule. Later, its additive version was brought into kind attention to researchers in [7], which as expected, revealed more hidden chemical properties of chemical compounds. This index is named as the general sum connectivity index, given as

Furtula et.al. [8] in 2015 introduced the -index, also referred as the forgotten topological index, which is defined as

This index is also a measure of branching and has same measure of predictability as that of the first Zagreb index. In case of the acentric factor and entropy, both and have a correlation coefficient greater than 0.95 [8].

Ali et al. [9] put forward the survey of work done on the Randic index for certain values of . Azari et al. [10] considered the forgotten topological index in detail and determined the bounds of this index in terms of other graphical parameters. They analyzed the relationship of this index with already exiting versions of Zagreb indices. Z. Che et al. [11] determined new bounds for the forgotten index in terms of graph irregularity, Zagreb indices, and many other existing graph invariants. Further they characterized the graphs attaining these bounds and proved that these newly attained bounds are sharper than the existing ones. Another version of the forgotten index namely the forgotten co-index was brought into attention by Ghalavand et al. [12]. The authors found bounds for this index and provided an ordering of graphs with respect to this index. Gutman et al. [13] provided a finite ascending sequence of the forgotten index for trees and moreover for graphs having some particular values of the cyclomatic number . Gutman et al. [14] proved two weighted inequalities of real nonnegative sequences and then used them to determine lower bounds of certain degree dependent indices.

The main motivation behind this work is the idea practiced in [15], in which authors introduced some edge swapping operations on graph structures and analyzed the behavior of generalized sum connectivity descriptor. The authors found the decreasing behavior of the descriptor and provided the least five values of this descriptor for trees. Further they also provided the trees that attain these least values. In this work, making use of certain graph transformations that involve the swapping of edges from one node to another and contraction of edges, we have observed the behavior of the -index. This enabled us to determine the decreasing sequence of values of -invariant and the corresponding trees attaining these values. Novelty of work lies behind the fact that solving a research problem that is not solved already is always a good addition to the existing literature. Thus, this problem of determining members in a certain family of graph with first, second up to fifth extremal values has become good source of attraction to researchers.

2. -Invariant under Certain Transformations

In this section, we first observe the increasing or decreasing behavior of -invariant under certain graph operations involving swapping of edges from one node to another. Our next results show that this descriptor exhibit increasing behavior.

Let be the connected tree and . For , , suppose and , where the vertices and have no common neighbors in . Let be the graph derived from by deleting edges and attaching new edges . We say that is a of (see Figure 1).

Lemma 1. Let be a tree derived from by -transform as depicted in Figure 1, then

For any .

Proof. Observe that and .Consider thatThe decreases the degree of by and increases the degree of by , while the degrees of the nodes and remain unchanged.

Lemma 2. Let be a tree derived from as depicted in Figure 2, where . Then

For any and .

Proof. Since and , we haveHence, the result holds.

Lemma 3. Let be a tree obtained from by applying -transform (see Figure 3), where and . If and then

Proof. By definition of we getHence the proof is complete.

Lemma 4. Letbe a tree obtained fromafter applying-transform (see Figure 4). For any, we have

Proof. If , then . Now by using the definition of index, we have

2.1. Greatest Value of for Trees of Given Diameter

The multistar graph denoted by , where and for , , is the caterpillar involving a path of length having pendant vertices that are adjacent to for . The diameter of is equal to , and can be derived by connecting the centers of with edges. A bistar graph of order denoted by , where , is formed by connecting the central vertices of and by an edge. A tree that has diameter 3 is also a bistar. For integers with , is tree derived by connecting pendant vertices to the end node of the path , with diameter .

Theorem 1. Letbe a tree onvertices and diameter. Then the maximum value ofis attained for.

Proof. Applying -transform on the vertices that are not attached on the diametral path of , we get that the maximum value of is attained in the class of multistars . Now applying the transformations presented in Lemma 2–Lemma 4, it follows that the maximum value of is attained if and only if and . Hence .

Corollary 1. (i)In the set of treesonvertices, we have(ii)for .(iii)In the set of trees of order and diameter with , the graphs with the greatest value are (in this order) as follows:

Proof. (i)Let be a tree on vertices with diameter . By Theorem 1 the maximum value of is attained for . The result follows by applying many times -transform on .(ii)Applying Lemma 1–Lemma 3 to yields the multistar with . Now using Lemma 4 to , we get the required ordering.

Theorem 2. For tree of order , the maximum value of -index is attained in the following order (see Figure 5).

Proof. Let be tree of order . By Corollary 1, the maximum value of is achieved in the set of trees of diameter 2. It follows that the trees with the maximum value of is star . The second maximum is attained for in the set of trees of diameter 3. The next maximum is reached by and in trees of diameter 3. Since can be obtained from by a transformation, we get . In the set of trees of diameter 4, the maximum value is attained by . To get the fourth maximum value we compare with . We haveHence for every . Also,This shows that the second maximum value of -index is achieved by after in the set of trees of diameter 4. Using a -transform, it is easy to see that reaches the maximum value in the set of trees of diameter 5 and , which completes the proof.

Example 1. Let be a tree on 10 vertices, thenThis shows that

Theorem 3. In the set of treesof orderwithpendant vertices, where, we have

The above equality holds if and only if .

Proof. First we prove that if is a pendant vertex adjacent to , thenWith equality holds if and only if and . Since , it follows that there exists a vertex , such that . Otherwise is a star having central vertex . We obtainSince, and for the remaining nodes , where , we haveWe also get because includes of trees. Now giveswith equality holds if , the adjacent vertex of has degree 2 and the remaining vertices are of degree 1. Hence and is adjacent to one of the vertex of of degree .
Now we use induction to prove the required result. If , then and we have a bistar (see Figure 5), the only tree of order 5 having 3 pendant vertices. Let and suppose the result is true for all trees of order and pendant vertices, where . Let be a pendant vertex adjacent to , then we have two cases: (i) has degree 2 and (ii) is of degree at most 3.(i)The only vertex adjacent to has degree . Then(ii)In this case the graph has pendant vertices. Applying induction, for , we get , with equality holds for . It follows that(iii)with equality holds for . Therefore, we have . If , then is a star with one vertex of degree 1. Hence, .(iv)Let is of order with s pendant vertices. If , then by using induction on , we getwith equality holds for and . Hence .

3. Conclusion

In this paper, our main focus is to obtain the greatest value of F-index for trees of given order, diameter, and pendent vertices. Also, we determine the ordering of corresponding extremal trees for F-index. We make use of some graph transformations to determine the greatest value of F-index for trees of given order, diameter, and pendent vertices. These transformations involves contraction and swapping of pendant edges from one vertex to other resulting in increase in the value of the forgotten index. Using these transformations continuously on a graph lead us to the desired extremal graph with respect to the forgotten index. On the way of obtaining extremal graphs, we also obtained some other members having the second, third, fourth, and fifth maximum value of the forgotten index.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.