#### Abstract

A connected graph in which no edge lies on more than one cycle is called a cactus graph (also known as Husimi tree). A bond incident degree (BID) index of a graph is defined as , where denotes the degree of a vertex of , is the edge set of , and is a real-valued symmetric function. This study involves extremal results of cactus graphs concerning the following type of the BID indices: , where , is a strictly convex function, and is a strictly concave function. More precisely, graphs attaining the minimum and maximum values are studied in the class of all cactus graphs with a given number of vertices and cycles. The obtained results cover several well-known indices including the general zeroth-order Randić index, multiplicative first and second Zagreb indices, and variable sum exdeg index.

#### 1. Introduction

All the graphs considered in this study are connected. The notation and terminology that are used in this study but not defined here can be found in some standard graph-theoretical books [6, 7].

Graph invariants of the following form are known as the bond incident degree (BID) indices :where denotes the degree of a vertex of the graph , is the edge set of , and is a real-valued symmetric function. In this study, we are concerned with the following type  of the BID indices:where , is a strictly convex function, and is a strictly concave function.

A connected graph in which no edge lies on more than one cycle is called a cactus graph (also known as Husimi tree ). In the present study, we study the graphs attaining the minimum and maximum values from the class of all cactus graphs with a given number of vertices and cycles. Our main results cover the general zeroth-order Randić index , variable sum exdeg index , multiplicative first Zagreb index , multiplicative second Zagreb index [1, 8, 10], and sum lordeg index [12, 14], where the aforementioned indices for a graph are defined as follows:

A graph in which every vertex has degree less than 5 is known as a chemical graph.

Although we cannot apply our main result on the Lanzhou index  for finding the extremal graphs from the class of all cactus graphs, we still are able to utilize one of our main results for finding the graphs having the minimum Lanzhou index among all chemical cactus graphs, where the Lanzhou index for a graph is defined as

We end this section with the remark that the Lanzhou index is same  as the graph invariant .

#### 2. Main Results

By an -vertex graph, we mean a graph of order . In a graph, a set of pairwise nonadjacent edges is called a matching. The elements of a matching are known as independent edges.

Theorem 1. The graph formed by adding -independent edges in the -vertex star (Figure 1) uniquely attains the maximum value and minimum value in the class of all -vertex cactus graphs having cycles, where and are the fixed integers satisfying the inequalities , , and .

Proof. We prove the result for the graph invariant . The result regarding the other invariant can be proved in a fully analogous way. Let be a graph having the maximum value in the given class of graphs. It is enough to show that has the maximum degree . Contrarily, we assume that that the maximum degree of is at most . Let be a vertex of maximum degree. Then, there exists at least one neighbor, say of which has at least one neighbor not adjacent to . Let be those neighbors of that are not adjacent to . If is the graph formed by adding the edges in and removing the edges from (Figure 2), then we haveNote that the cactus graphs and have the same number of cycles as well as order. By using Lagrange’s mean value theorem, we conclude that there exist real numbers and , such thatThe fact implies that , which further implies that the right hand side of equation (6) is negative because is a strictly convex function. Thus, one has , a contradiction to the maximality of .

Corollary 1. In the class of all -vertex cactus graphs having cycles, the graph formed by adding independent edges in the -vertex star uniquely attains the maximum general zeroth-order Randić index for or , maximum variable sum exdeg index for , maximum multiplicative second Zagreb index , maximum sum lordeg index , minimum general zeroth-order Randić index for , and minimum multiplicative first Zagreb index , where and are the fixed integers satisfying the inequalities , , and .

Proof. We observe that a graph attains its maximum value or minimum value in a class of graphs if and only if attains its maximum value or minimum value, respectively, in the considered class of graphs. We define with and ; with and or ; with ; with ; with ; and with and . It can be easily verified that for each , is strictly convex and for each , is strictly concave. Thus, the required conclusion follows from Theorem 1.
A graph of order and size is called an -graph.

Lemma 2 (see ). If attains the minimum value or maximum value among all connected -graphs and , then the minimum degree of is at least 2, where and are the fixed integers satisfying the conditions , , and .

The next result is a direct consequence of Lemma 2.

Corollary 3. If is a graph attaining the minimum value or maximum value in the class of all -vertex cactus graphs having cycles, then the minimum degree of is 2, where and are the fixed integers satisfying the inequalities , , and .

Denote by the set of neighbors of a vertex of a graph .

Theorem 2. If is a graph attaining the minimum value or maximum value in the class of all -vertex cactus graphs having cycles and , then the minimum degree of is 2 andwhere and are the fixed integers satisfying the inequalities , , and .

Proof. We prove the result for the graph invariant . The result regarding the other invariant can be proved in a fully analogous way. Let be a graph having the minimum value in the given class of graphs.
From Corollary 3, it follows that the minimum degree of is 2. Next, we prove thatFirst, assume that lies one some cycle of . Suppose to the contrary that . Let , where denotes the set of vertices of the cycle . For , denote by the component of the graph containing the vertex . It is claimed that no more than two vertices of lie on the same component of the graph ; if , , and lie on the same component of the graph , then the vertices , , , and lie on a cycle whose each edge belongs to more than one cycle of , which contradicts the definition of .

Case 1. There exists at least one , such that the component contains a unique vertex of .
Suppose, without loss of generality, that the component contains none of . We note that there exists at least one component with , such that contains at least one vertex satisfying . Certainly, both the graphs and have the same number of cycles and vertices. On the other hand, we haveBy using Lagrange’s mean value theorem, we conclude that there exist real numbers and , such thatThe assumption implies that , which further implies that the right hand side of equation (2) is positive because is a strictly convex function. Thus, one has , a contradiction to the minimality of .

Case 2. For each , exactly two vertices of the set lie on the component .
Suppose, without loss of generality, that . It is clear that for each , and there exists at least one component with , such that contains at least one vertex satisfying . It is obvious that both the graphs and have the same number of cycles and vertices. On the other hand, we haveBy using Lagrange’s mean value theorem, we conclude that there exist real numbers and , such thatWe note, for the present case, that the degree of is at least 6, which implies that , which further implies that the right hand side of (12) is positive because is a strictly convex function. Thus, one has , a contradiction to the minimality of .
Thus, when lies on some cycle of .
It is still left to prove that when does not belong to any cycle of . Suppose to the contrary that and that does not belong to any cycle of . As before, we take , and for , we denote by the component of the graph containing the vertex . We observe that whenever ; if the components and are the same for some , then the path from to in together with the path yields a cycle in containing , which is a contradiction. We note that there exists at least one component with , such that contains at least one vertex satisfying . It is obvious that both the graphs and have the same number of cycles and vertices. On the other hand, we haveBy using Lagrange’s mean value theorem, we conclude that there exist real numbers and , such thatThe assumption implies that , which further implies that the right hand side of equation (4) is positive because is a strictly convex function. Thus, one has , a contradiction to the minimality of . Thus, when does not belong to any cycle of .

Corollary 4. If is a graph attaining the minimum general zeroth-order Randić index for or , minimum variable sum exdeg index for , minimum multiplicative second Zagreb index , minimum sum lordeg index , maximum general zeroth-order Randić index for , and maximum multiplicative first Zagreb index , in the class of all -vertex cactus graphs having cycles and , then the minimum degree of is 2 andwhere and are the fixed integers satisfying the inequalities , , and .

Proof. We observe that a graph attains its minimum value or maximum value in a class of graphs if and only if attains its minimum value or maximum value, respectively, in the considered class of graphs. We define with and ; with and or ; with ; with ; with ; and with and . It can be easily verified that for each , is strictly convex, and for each , is strictly concave. Thus, the required conclusion follows from Theorem 2.
We observe that the function is strictly convex for . Thus, we have the next corollary regarding the Lanzhou index.

Corollary 5. If is a graph attaining the minimum Lanzhou index in the class of all -vertex chemical cactus graphs having cycles and , then the minimum degree of is 2 andwhere and are the fixed integers satisfying the inequalities , , and .

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This research was funded by Scientific Research Deanship at University of Ha’il, Saudi Arabia, through project number RG-20 031.