Research Article | Open Access

Ali Ghalavand, Ali Reza Ashrafi, Mardjan Hakimi-Nezhaad, "On Mostar and Edge Mostar Indices of Graphs", *Journal of Mathematics*, vol. 2021, Article ID 6651220, 14 pages, 2021. https://doi.org/10.1155/2021/6651220

# On Mostar and Edge Mostar Indices of Graphs

**Academic Editor:**Ismail Naci Cangul

#### 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.

**(a)**

**(b)**

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.

**(a)**

**(b)**

**(c)**

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,

**(a)**

**(b)**

**(c)**

**(d)**

**(e)**

**(f)**

**(g)**

**(h)**

**(i)**

**(j)**

*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.

**(a)**

**(b)**

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 1â€“ 5, 7, Theorems 1â€“3, 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,