Abstract

Being building block of data sciences, link prediction plays a vital role in revealing the hidden mechanisms that lead the networking dynamics. Since many techniques depending in vertex similarity and edge features were put forward to rule out many well-known link prediction challenges, many problems are still there just because of unique formulation characteristics of sparse networks. In this study, we applied some graph transformations and several inequalities to determine the greatest value of first and second Zagreb invariant, and invariants, for acyclic connected structures of given order, diameter, and pendant vertices. Also, we determined the corresponding extremal acyclic connected structures for these topological indices and provide an ordering (with 5 members) giving a sequence of acyclic connected structures having these indices from greatest in decreasing order.

1. Introduction

The process of exploring the junctions and connections of a tree-like network is called network topology determination, where chemical compounds’ entities of a complicated chemical system are represented by vertices in acyclic graphic structures. This area of research is a well growing idea in investigation of dynamic tree-like networks because of its wide range of continuously spanning applications in different emerging fields of research. Devotion of a big amount of exploring material in literature to tree-like networks has attached great importance to acyclic graphic structures. Main idea behind consideration of tree-like network is that very often the targeting approach to trees can further be implemented or its extension can be applied to study more general and advanced networking structures. Aim of this work is to provide readers a technique to guess behavior of chemical invariants for complicated network by an easiest one tree-like network.

In this study, the term “graph” will always indicate a simple, finite, and undirected graph. In theoretical chemistry, topological indices are often used within the development of the two well-known relationships termed as quantitative structure property [1]. These descriptors are used to build the mathematical basis for relationship between molecular structure and physico-chemical properties. There are several topological indices exist in the literature. In a graph , and are the sets of vertices and edges, respectively. Let denote the degree of a vertex .

First time topological indices were used by Wiener launched them as, the Wiener invariant. Once having the favorable result of Wiener invariant, many other vertex degree- and edge degree-dependent invariants were proposed by several researchers, see details [24] that are given as follows:

The most studied and most applied index among all topological indices is the Randić index, defined by Randić [5]:

In 2004, Miličević et al. [6] redeveloped the Zagreb invariants using edge degrees and defined the and reformulated Zagreb indices as follows:

Here, given by sum of degrees of end points of edge decreased by 2 and shows that lines and are sharing a common node in . Moreover, the extreme values of and were represented in [7, 8].

In [9], authors put forward new graphic invariants defined below:

In 2012, Xu et al. [10] established some graph transformations that maximize or minimize the multiplicative sum Zagreb index of graphs and used these graph transformations to determine the extremal graphs from tree, unicyclic, and bicyclic graphs.

Two years later, Ji et al. [8] extended the work of Xu et al. [10] for reformulated Zagreb index. Shirdel et al. [11] put forward the hyper-Zagreb index which is a degree-based topological index given by

In 2017, Gao et al. [12] used the same graph transformations as given in [8] to compute the similar results as computed in [8] but for the hyper-Zagreb index.

The eccentricity of is the farthest distance from to any other vertex, i.e., . The value of the maximum eccentricity in a graph is called the diameter of , and it is denoted by diam(K). Two vertices are the diametral vertices of , for which the distance between the vertices and is equal to and the smallest path between vertices and is the diametral path. A path denoted as contains number of vertices. A caterpillar, that is a tree of order 3 or more, holds the property removal of whose pendant vertices generate a path. Mahapatraa et al. [13] determined a new technique of finding link prediction called RSM index; idea behind this motivation is to increase the users on a network. Shang et al. [14] proposed the model of networks that provide a common explanation for community of regular and acyclic networks. Shang et al. [15] put forward the method taking into account heterogeneity of networks and performed in a better way than the existing link prediction algorithms. Huge collection of bounds is evaluated for acyclic and general graphic structures via Zagreb group invariants. Borovicanin et al. [16], in an attempt to take overview of existing literature regarding lower and upper bounds of Zagreb invariants, provided the readers with a broad survey of such well-known estimates. Noureen et al. [17] evaluated the maximum values of Zagreb invariants for acyclic chemical structures with certain parameters of segments and branching nodes. Ali et al. [17] provided readers with a big collection of results regarding largest and smallest values for the invariant , taking into consideration already explored results for certain values of , e.g., . For further notations related to graph theory, we refer [18], and for networking dynamics, we refer [19, 20].

Plan of work and methodology of this work are looking at the behavior (increase or decrease) of first two Zagreb invariants after swapping certain lines from one node to other. Increase in the value of these invariants lead us to acyclic tree-like structures with biggest value of aforementioned invariants. During this increase, these operations of swapping lines enabled us to give an ordering of tree-like structure having first, second, till fifth maximum value of considered invariants.

2. First Zagreb Invariant and Graph Transformations

In this section, we make use of some graph transformations introduce by Tomescu et al. [21] to compute the Zagreb index for acyclic connected graphs of given diameter, order, and pendant vertices. These transformations are listed in Figure 1.

-transform: let be a nontrivial connected graph having vertices , such that and , where and have no common neighbors in , and . Let be the graph derived by deleting edges and attaching new lines . We say that is a -transform of (see Figure 1).

Lemma 1. Let be an acyclic connected graph derived from by , as depicted in Figure 1; then,for any .

Proof. We have and . Also, and . By the definition of Zagreb index, we obtainSince the degree of decreases in -transform, the degrees of the nodes and remain unchanged.

Lemma 2. Let and be two acyclic connected graphs, as presented in Figure 2, where . Then,for any and .

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

Lemma 3. Let be an acyclic connected graph obtained from by applying , as depicted in Figure 3, where and . If and , then

Proof. Like previous lemma and by definition of , we obtainHence, the proof is complete.

Lemma 4. Let be the graph derived from after applying on , as shown in Figure 4. For any , we have

Proof. Since . If , then , and by definition of , we haveIf , then

2.1. Acyclic Connected Structures with Greatest Invariant

First, we identify the extremal graphs among acyclic connected graphs or (trees) with Zagreb index and provide an ordering of these trees from greatest in decreasing order for Zagreb index, see Figure 5.

Theorem 1. Let be a set of acyclic connected graphs with vertices and diameter of is ; then, attains the maximum value only for .

Proof. Applying in Lemma 1 at nodes not related to diametral path of , we conclude that, between acyclic connected graphs of diameter , the maximum of achieves exactly in the set of multistars .
After applying transformations explained in Lemmas 2, 3, and 4, we deduce that maximum of attains only for , and , i.e., for .

Corollary 1. (a) Let be a set of acyclic connected graphs with order , and we haveif .
(b) Acyclic connected graphs with greatest arein set of acyclic connected graphs and having diameter .

Proof. (a) This result follows from Lemma 1; after applying many times , reduces to .
(b) Using Lemmas 1-3 in order to deduce this ordering, then we use Lemma 4 to multistars of order , having .

Theorem 2. For every , the acyclic connected graphs possessing the greatest Zagreb index are in the following order:

Proof. The star is a unique acyclic connected graph of diameter two, which, by Corollary 1, attains the maximum value of . Another maximum value of reaches for , which maximizes in the set of acyclic connected graphs having diameter three. The next maximum values are attained by , which is corresponding to for and by in the class of acyclic connected graphs of diameter three, and the maximum of is obtained by in the class of acyclic connected graphs of diameter four. We haveSince this inequality indicates that we can derive from by a , it leads that, for every , the acyclic connected graphs holding maximum values of are and . Next, we contrast with to get the term in the required series. We havewhich means that , for every .
We also haveFor every , here gets the next maximum value of in the set of acyclic connected graphs with diameter four after . After applying , we see that the acyclic connected graph attaining maximum of in the set of acyclic connected graphs with diameter five performs , which terminates the proof.

2.2. Example

Now, we will see that, for ,where

So, we are done.

Table 1 supports the ordering given in Theorem 2.

Theorem 3. Let be an acyclic connected graph having nodes and pendant nodes, where . Then,attains equality by the graph .

Proof. First, we prove for vertex of degree 1, attached to a node ; we havebound attained by the graph and . We note that there exists a vertex of degree since in the other way is a star having center and pendant nodes, which conflict with the theorem. We obtainFor vertices, , where . It implies thatSince , this impliesEquality attains, by , a vertex adjacent to is of degree two, and the remaining nodes are pendants, i.e., , and there is a vertex of of degree to which is adjacent.
Using induction technique for , for , we have and , as shown in Figure 5, which is the only one acyclic connected graph with order five and three pendant nodes. Let , and assume that, for every acyclic connected graph of order and with pendant nodes, the theorem is true, where . For end node linked with , now investigation of two subcases is done: (a) degree of is 2 and (b) degree of is at least 3.
(a) Here the unique node attached to has , which meansIn this situation, has pendant nodes. Using induction, for , we get , which attains equality by the graph . In this situation,and equality is attained by the graph and , i.e., . If , order of is , having vertices of degree one, i.e., is the star graph of order deducing .
(b) The graph consists of nodes and pendant nodes if . Then, by this property and using induction for , we obtainEquality attained by the graph is and , i.e., .

3. Second Zagreb Invariant and Graph Transformations

In this section, we make use of some graph transformations introduced by Tomescu et al. [21] to compute the Zagreb index for acyclic connected graphs of given diameter, order. and pendant vertices. These graph transformations are described in Section 3.

Lemma 5. Let be an acyclic connected graph derived from by , as depicted in Figure 1; then,for any .

Proof. We have and . By the definition of Zagreb index, we obtainSince the degree of decreases in , the degrees of the nodes and remain unchanged.

Lemma 6. Let and be two acyclic connected graphs, as presented in Figure 2, where . Then,for some and .

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

Lemma 7. Let be an acyclic connected graph obtained from by applying , as depicted in Figure 3, where and . If and , then

Proof. Like previous lemma and by definition of , we obtainHence, the proof is complete.

Lemma 8. Let be the graph derived from after applying on , as shown in Figure 4. For any , we have

Proof. Since . If , then , and by definition of , we haveIf , then

3.1. Acyclic Connected Graphs with Greatest

First, we identify the extremal graphic structures among acyclic connected graphs with Zagreb index and provide an ordering of these acyclic connected graphs from greatest in decreasing order for Zagreb invariant (see Figure 6).

Theorem 4. Let be a set of acyclic connected graphs with vertices and diameter of is ; then, attains the maximum value only for .

Proof. Applying in Lemma 5 at nodes not related to diametral path of , we conclude that, between acyclic connected graphs of diameter , the maximum of achieves exactly in the set of multistars .
After applying transformations explained in Lemmas 6, 7, and 8, we deduce that maximum of attains only for , and , i.e., for .

Corollary 2. (a) Let be a set of acyclic connected graphs with order ; we obtainif .
(b) Acyclic connected graphs having diameter with greatest are in this decreasing sequence:where .

Proof. (a) This result follows from Lemma 5; after applying many times , reduces to .
(b) Lemmas 5, 6, and 7 are used in order to deduce this ordering, and then, we use Lemma 8 to multistars of order , having .

Theorem 5. For every , the acyclic connected graphs possessing the greatest Zagreb index are in the following order (as shown in Figure 6):

Proof. The star is a unique acyclic connected graph of diameter two, which, by Corollary 2, attains the maximum value of . Another maximum value of reaches for , which maximizes in the set of acyclic connected graphs having diameter three. The next maximum values are attained by , which is corresponding to , for and by in the class of acyclic connected graphs of diameter three, and the maximum of is obtained by in the class of acyclic connected graphs of diameter four. We haveSince this inequality indicates that we can derive from by a , it leads that, for every , the acyclic connected graphs holding maximum values of are , and . Next, we contrast with to get the term in the required series. We have which means that , for every .
We also holdfor every , where gets the second maximum value of in the set of acyclic connected graphs with diameter four after . After applying , we see that the acyclic connected graph attaining maximum of in the set of acyclic connected graphs with diameter five perform , which terminates the proof.

3.2. Example

Now, we will see that, for ,where

So, we are done.

Table 2 is an illustration of Theorem 5.

Theorem 6. Let be an acyclic connected graph having nodes and pendant nodes, where . Then,with equality for the structure .

Proof. For end vertex , linked to a node , first, we prove and . There exists of degree ; otherwise, is a star having center and pendant nodes, which conflict with the theorem. We obtainSince and for left over points , where , it implies thatWe also get since includes acyclic connected graphs. Since , this meansEquality attains by , a vertex adjacent to is of degree two, and the remaining nodes are pendant, i.e., , and there is a vertex of of degree to which is adjacent.
Making use of induction technique for , gives and is a bi-star with pendant nodes, as shown in Figure 6, which is the only one acyclic connected graph with order five and three pendant nodes. Let , and assume that, for every acyclic connected graph of order and with pendant nodes, the theorem is true, where . For end node attached to node , investigation of two subcases is made: (a) degree of is 2 and (b) degree of is at least 3.
(a) Here, the unique node attached to has , which meansIn this situation, has pendant nodes. Using induction, for , we get , which attains equality by the graph . In this situation,and bound is attained for . Order of is , and cardinality of pendant nodes is , for , i.e., is a star graph of order , deducing .
(b) The graph consists of nodes and pendant nodes if . Then, by this property and using induction for , we obtainEquality attains by the graph and , i.e., .
Since Shigehalli Kanabur invariants are scalar multiple of Zagreb invariants, so results related to ordering tree-like structures with respect to Zagreb invariants give parallel results for and invariants which just differ by positive scalar multiple.

4. Conclusion

In chemical graph theory, in this work, we make use of some graphic transformations and several inequalities to determine the greatest value of first Zagreb invariant, second Zagreb invariant, and and invariants for acyclic connected structures of given order, diameter, and pendant vertices. Also, we determined the corresponding extremal acyclic connected structures for these chemical invariants and provided an ordering giving a sequence of acyclic connected structures having these indices from greatest in decreasing order. Calculations of topological invariant of any graphic structure are significant as it exhibits many of its chemical characteristics. However, much work still needs to be done in this area [22].

Data Availability

The data used to support the findings of this study are cited at relevant places within the article as references.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Authors’ Contributions

All authors contributed equally to this work.