Abstract

Let be a graph with edge set and . Define and to be the number of vertices of closer to than to and the number of edges of closer to than to , respectively. The numbers and can be defined in an analogous way. The Mostar and edge Mostar indices of are new graph invariants defined as and , respectively. In this paper, an upper bound for the Mostar and edge Mostar indices of a tree in terms of its diameter is given. Next, the trees with the smallest and the largest Mostar and edge Mostar indices are also given. Finally, a recent conjecture of Liu, Song, Xiao, and Tang (2020) on bicyclic graphs with a given order, for which extremal values of the edge Mostar index are attained, will be proved. In addition, some new open questions are presented.

1. Introduction

In this paper, graph means undirected and connected finite graph without loops or multiple edges. The vertex and edge sets of such a graph will be denoted by and , respectively. We use the notations and for the degree of a vertex and the set of all vertices adjacent to , respectively. Suppose is an edge and are two nonadjacent vertices of . Then, is the subgraph of obtained by deleting the edge and is a graph obtained from by adding an edge connecting and .

If and are graphs such that and , then we call to be a subgraph of . The subgraph with vertex set and edge set is called a pendent path of if , and , when . While, a subgraph with vertex set and edge set is called an internal path if and , when . An edge incident to a pendent vertex is called a pendent edge.

Suppose is a connected graph with two vertices and . The distance is defined as the number of edges in a shortest path connecting and . The cyclomatic number of , , is defined to be + 1. If , then the graph is said to be tree, unicyclic, bicyclic, tricyclic, tetracyclic, and pentacyclic, respectively. We refer the readers to consult the famous book of West [1] for our graph theory notions and notations.

In a recent paper, Doli et al. [2] introduced a new bond-additive structural invariant as a quantitative refinement of the distance nonbalancedness and also a measure of peripherality in graphs. They used the name Mostar index for this invariant which is defined as , where is the number of vertices of closer to than to , and similarly, is the number of vertices closer to than to . They determined the extremal values of this invariant and characterized extremal trees and unicyclic graphs with respect to the Mostar index. Arockiaraj et al. [3] introduced the edge Mostar of the graph as , where and are the number of edges of lying closer to the vertex than and the number of edges of lying closer to the vertex than to the vertex . They computed the Mostar and edge Mostar indices of the family of coronoid and carbon nanocones. Imran et al. [4] computed the edge Mostar index of some graph operations. As a consequence of these calculations, they obtained the edge Mostar index of several classes of chemical graphs and nanostructures.

Deng and Li [5] determined the catacondensed hexagonal systems with the least and the second-least Mostar indices. In another paper [6], these authors computed the extremal trees with respect to the Mostar index. Ghorbani et al. [7] proved that a graph with has no cut edge and computed the Mostar index of the pentagonal nanocones. A connected graph with this property, in which any two graph cycles have no edge in common, is called a cactus graph. Hayat and Zhou [8] determined all vertex cacti with maximum Mostar index and gave a sharp upper bound for the Mostar index of vertex cacti containing cycles. The same authors in [9] constructed vertex trees with maximum Mostar index and fixed the maximum degree, diameter, or number of pendent vertices. Huang et al. [10] found the extremal hexagonal chains with respect to Mostar index, and Xiao et al. [11] computed the first three minimum of Mostar index in the class of hexagonal chains. Finally, Tepeh [12] proved a conjecture of Dolić et al. [2] about the characterization of bicyclic graphs with a given number of vertices, for which extremal values of the Mostar index are attained.

Our calculations are done with the aid of Nauty [13] and Matlab [14]. Our codes are accessible from the authors upon request.

2. Mostar Index

A vertex in a given graph is called a starlike vertex if and . The set of all such vertices is denoted by , and we use the name starlike set for .

Transformation 1. We assume that is a tree and . We also assume that , , and . Define . The resulting tree has been illustrated in Figure 1.

Lemma 1. Let and be the vertex trees described in Transformation 1. Then, .

Proof. By definition, . Since , , and . Therefore, .
A caterpillar is a tree in which all the vertices are within distance 1 of a central path [15]. Let be a caterpillar with the central path and , , be the number of pendent vertices that are in distance 1 of a vertex . Then, we use the notation instead of . Note that if , , then we refuse to write in , see Figure 2.

Transformation 2. We assume that is a caterpillar with the longest path . We also assume that , , is an internal path in such that and . DefineThe resulting tree has been illustrated in Figure 3.

Lemma 2. Let and be two trees in Transformation 2 with vertices. Then, .

Proof. We consider two cases as follows:(1). By definition of and , we have(2). Again by definition of and , we haveproving the lemma.

Transformation 3. We assume that , , , and are defined in Transformation 2. We also assume that and . DefineThe resulting tree has been illustrated in Figure 3.

Lemma 3. Let and be two trees in Transformation 3 with vertices. Then, .

Proof. By definition of and ,proving the lemma.

Lemma 4. Let , , and be three positive integers such that and . If , then .

Proof. By definition, , as desired.

Proposition 1. Let be a tree on vertices. If , where , , and , then

Proof. Suppose . By definition of caterpillar,and by simple calculations,proving the lemma.

Theorem 1. Let be a tree with vertices. Then,with equality if and only if , where , , and .

Proof. If , where , , and , then Proposition 1 gives the result. Otherwise, we assume that is the longest path in . At first, by repeated applications of Transformation 1 on vertices of , we arrive at a caterpillar with central path . We now apply Lemma 1 to deduce that . Next, by the repeated applications of Transformations 2 and 3 on the internal paths in , we arrive at a caterpillar , where , , and . Apply Lemmas 2 and 3 to prove that . Finally, by Lemma 4,with equality if and only if , where , , and .

Lemma 5. Let and be two positive integers. If , then,

Proof. By definition, .

Theorem 2. Let be an vertex tree and

See Figure 4, for details. Then,

Proof. By definition,so . Since , . If , then, by Lemma 5, . If , then, by repeated applications of Transformation 1 on elements of , we arrive at a tree with . By Lemma 1, , and by Theorem 1, . The equality holds if and only if , as desired.

Lemma 6. Let , , and be three positive integers such that . Then, .

Proof. Suppose . Then, .

Transformation 4. (see [16]). Suppose that is a vertex in a connected graph with at least two vertices and . In addition, we assume that and , are two paths of lengths and , , respectively. Let be the graph obtained from , , and by attaching edges , , and . The graphs and have been illustrated in Figure 5.

Lemma 7. Let and be two graphs in Transformation 3 on vertices. Then, .

Proof. Suppose . By definition of and , we haveand Lemma 6 gives the result.

Remark 1. In Transformation 4, if we replace the path by a tree on vertices, then again Lemma 7 is valid.

Corollary 1. The path and the caterpillar have the first and second minimum Mostar index among all trees on vertices, respectively.

Proposition 2. Let be a positive integer.(1)If is odd, then , , , , , , , and .(2)If is even, then , , , , , , , and .

Theorem 3. Let be a tree on vertices. Ifthen

Proof. By Proposition 2,We now apply repeated applications of Transformation 4 on the pendent paths in to arrive at a caterpillar in the set (Figure 4). Now, by Lemma 7, . Therefore, by Proposition 2,and this gives the result.

3. Edge Mostar Index

The aim of this section is to compare the Mostar and edge Mostar indices of trees and unicyclic graphs. We also present a proof for Conjecture 5.5 of Liu et al. [17]. In the end of this section, conjectures on the minimum of edge Mostar index of tricyclic, tetracyclic, and pentacyclic graphs are presented. Suppose is a connected graph and . Define and .

Proposition 3. If is a tree, then .

Proof. Suppose and the trees and are components of such that and . By definition, , , , and . The result follows from these facts that and .

Remark 2. Suppose is a tree. In Proposition 3, it is proved that the Mostar and edge Mostar indices of trees are equal. This shows that the edge version of all results in Section 2 containing Lemmas 15, 7, Theorems 13, and Corollary 1 are correct.
Note that the converse of Proposition 3 is not generally correct. For example, , for each cycle of length .
Suppose is connected graph which is not a tree, is a cut edge of and and are components of . If one of or is a tree, then the edge is said to be a tree-like cut edge of and the number of vertices in the acyclic component of is denoted by . Furthermore, the set of all tree-like cut edges of is denoted by . A tree-like cut edge of is said to be strong (weak), if the number of vertices in the acyclic component of is greater than (less than) the number of vertices in another component of . The set of all strong and weak tree-like cut edges of are denoted by and , respectively.

Proposition 4. If is not acyclic graph, and , then

Proof. Suppose and are two components of and and are two components of . Without loss of generality, we can assume that and are trees. Since , is a subgraph of or is a subgraph of , as desired.

Proposition 5. If is not an acyclic graph and , then is a path.

Proof. Suppose and . We also assume that and are two components of . Without loss of generality, we can assume that is a tree. Since all edges of a tree is a cut edge, and , it can be proved that or . Choose the edge and repeat this process to complete the proof.

Proposition 6. If is not acyclic, then .

Proof. Suppose and . We also assume that and are two components of . Without loss of generality, it can be assumed that is a tree. Since , . On the contrary, and implies that . Apply Proposition 5 and the fact that a cut edge cannot be on a cycle to complete our argument.

Corollary 2. Suppose is the cyclomatic number of a connected graph with ; then,(1)If , then .(2)If , then .

Lemma 8. Let be cyclic graph such that ; then,(1)If , then .(2)If , then .

Proof. Suppose ; and are components of such that , , and is a tree. By definition, , , , and . Our main proof will consider two cases as follows:(1). In this case, and . Thus,Now, by Corollary 2, .(2). In this case, and . Hence,Again by Corollary 2, .This completes the proof.Suppose is a positive integer and , , is a tree with a given vertex . Define the unicyclic graph with vertex set and edge set .

Lemma 9. Let be the graph defined above. If , then .

Proof. Suppose is an arbitrary edge in . Consider the following two cases:(1) is even. In this case, there exists a unique edge as such that . Therefore, and .(2) is odd. There exists a unique vertex in such that . We construct the tree from the graph by removing the vertices of . Then, and .Now, the proof follows from cases (1), (2), and Proposition 3.

Theorem 4. If is a unicyclic graph, then with equality if and only if .

Proof. The proof follows from Lemmas 8 and 9.

Proposition 7. Let be an vertex bicyclic graph, , depicted in Figure 6. Then, .

Proof. if , then, by the structure of , . We first assume that is even. If , then . If and , then . Next, we assume that is odd. If and , then . If and , then . Now, the result follows from above discussions and some easy calculations.
The following result is an immediate consequence of the pendent path and some easy calculations.

Proposition 8. Let be pendent path in an vertex bicyclic graph . If , we choose the edge and if , we choose . Then, and .

Corollary 3. Let be an vertex bicyclic graph. If has at least two pendent path of order or one pendent path of order , then .
Suppose , and are positive integers. Consider , , and to be trees with these properties that , , , , , and . Define four classes of bicyclic graphs denoted by , , , , , , and , and , with the following vertex and edge sets:If, for each in the set , , then we use the notation as .

Lemma 10. If , then .

Proof. Define . If, for trees , we have , then the result follows from Corollary 3. If these exists a tree such that , then . On the contrary, there are at most three edges such as in such that . So, in this case, . We now assume that, for every , . Then, there are at most three edges such as such that , there are at most two edges as with , there are at most two edges such as such that , there are at most two edges such as such that , and for other edges such as , . Therefore, , proving the lemma.

Lemma 11. If , then .

Proof. Suppose . If for two trees in , , then the result follows from Corollary 3. If there exists a tree in such that , then . Since there are at most two edges such as such that , . We now assume that, for every , . Then, there are at most two edges as such that and for other edges this value is . Therefore, .

Lemma 12. If , then .

Proof. Suppose . If, for trees , , then the result follows from Corollary 3. If there exists a tree such that , then . Also, for and , we have and . Since there are at most three edges as such that , .
We now assume that, for each , . If , thenas desired. Suppose . We consider two cases as follows:(1) is even. Since , and . Again, there are at most three edges such as such that , there are at most four edges such that , and, for other edges, this quantity is at most 2. Thus, .(2) is odd. Since , and . There are two edges such as such that , there are at most two edges as such that , and, for other edges, this value is at most 2. Hence, .Hence, the result.

Lemma 13. If , then , with equality if and only if .

Proof. Suppose that . If, for trees , , the proof follows from Corollary 3. If there exists a tree with , then . On the contrary, there are at most three edges such that . Thus, . Next, we assume that, for each , . Suppose are the number of distinct edges as such that . Then, there are exactly edges such as such that . Also, for , we have and for other edges, this quantity is . Therefore, , with equality if and only if .
We are now ready to prove Conjecture 5.5 in [17], see Figure 6.

Theorem 5. If is a bicyclic graph of order , then and equality is occurred if and only if .

Proof. The proof follows from Lemmas 1013.
In Figure 7 and Table 1, the data of the bicyclic graphs with minimum edge Mostar index of order are given.

4. Concluding remarks

The aim of this section is to compute some examples about invariants presented in Sections 13 and then suggest some conjectures.

Example 1. Let , , and be three graphs depicted in Figures 810, such that , , , and . Then,By Example 1, and

Remark 3. Let be a positive integer.(1)If , then, in Figure 11 and Table 2, all tricyclic graphs with minimum edge Mostar index are given.(2)If , then, in Figure 12 and Table 3, all tetracyclic graphs with minimum edge Mostar index are given.(3)If , then, in Figure 13 and Table 4, all pentacyclic graphs with minimum edge Mostar index are given.Our calculations with Nauty [13] on graphs with at most 22 vertices suggest the following conjecture.

Conjecture 1. Suppose is a graph with vertices.(1)Suppose is a tricyclic graph and . If is odd, then , and the equality holds if and only if , see Figure 14. If is even, then , and the equality holds if and only if , see Figure 14, for details.(2)Suppose is an vertex tetracyclic graph, . If is odd, then , and the equality holds if and only if , see Figure 15. If is even, then , and the equality holds if and only if , see Figure 15, for details.(3)Suppose is a pentacyclic graph and . If is odd, then , and the equality if and only if , see Figure 16. If is even, then , with equality if and only if , see Figure 16, for details.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors are indebted to Ms. Narges Shahavand for checking many of our calculations involved in this research.