1. Introduction
Throughout this paper, we let be a graph with the vertex set and edge set . Let and be the order and the size of G. In that case, we use in place of G to emphasize the order and size of G. By a simple graph, we mean that the graph has no loops or multiple edges. If and are adjacent vertices of G and if the edge e connects them, this situation will be denoted by . In such a case, the vertices and are called adjacent vertices and the edge e is said to be incident with and . For any vertex , we denote the degree of v by or . The smallest and biggest vertex degrees in a graph will be denoted by and , respectively. If the degree of a vertex is 1, then this vertex is called a pendant vertex, and the edge incident to it is called a pendant edge. If the end vertices of an edge have degrees a and b, then this edge is said to be of type . If there is at least one path between every pair of vertices of a graph, then the graph is said to be connected. Also, the set of all adjacent vertices of a vertex v in a graph G is called the neighborhood of v in G and is denoted by .
Topological indices, also called molecular descriptors by chemists, are the mathematical formulae giving us an invariant number as a result for all isomorphic graphs. The first such index is known as the Wiener index, defined by Wiener in 1947, to compare the boiling points of some alkane isomers. Since then, over 3000 such indices have taken their place in chemical databases for several applications. In this paper, we shall consider one of these indices, called the second Zagreb index, and calculate its extremal values for all connected unicyclic realizations of a given degree sequence such that the cycle length of the unique cycle in these realizations is maximum. We use the recently introduced graph invariant called omega invariant to determine unicyclicness condition obtained in [
1] and the maximum cycle length formula obtained in [
2] to obtain our results.
Of course, if the graphs are given, then the calculation of Zagreb or any other indices of graphs is very easy. But there is no general way of finding the values of any index for all the realizations of a given degree sequence. So here, not being able to calculate the second Zagreb index, we algorithmically find the extremal values of this index for unicyclic graphs with maximum cycle length. In the future, we believe that there will be follow-up papers for other graph classes and for other index types.
The first and second Zagreb indices of a graph
G were defined by Gutman and Trinajstic in 1972 [
3] by
respectively. The first Zagreb index is also formulated by
, alternatively. Some properties of these two indices are studied in [
4,
5,
6,
7,
8,
9,
10].
The extremal values of topological indices are quite useful when we cannot obtain the exact values of them.
A recently defined graph invariant is called the omega invariant, see [
2], which is defined for a degree sequence
by
where
’s are non-negative integers and
denotes the biggest vertex degree. Although it has a close relation with these two earlier graph parameters mentioned in [
1,
2,
11], the omega invariant is still used in classifying several graph theoretical, topological and combinatorial properties, giving shorter proofs of the existing theorems such as Edmonds’ theorem which was proved in 1964 on the potential connectivity of realizations of a degree sequence and also in answering several open problems such as the connectivity of the realizations of a given degree sequence which was still an open problem before omega invariant was defined. The answer to this important open problem was given by the following statement: If
, then all the realizations are disconnected and cannot be drawn as a connected graph in any way. For all other values of
, the realizations could be connected or disconnected, which is briefly stated with the statement “potential connected”. Another example of open problems answered by the omega invariant is the cyclicness of the realizations of a degree sequence. In [
1], the conditions for the cyclicness, in particular, acyclicness, unicyclicness, bicyclicness, tricyclicness, etc., are all stated in terms of omega invariant. There are over 60 papers, hundreds of conference papers, and at least five PhD theses on the omega invariant in the literature so far, and many graph parameters are related to the omega invariant, making it an invaluable tool for many calculations. In the remaining parts of this manuscript, we shall make use of some fundamental properties of the omega invariant, in particular, with the unicyclic realizations of
D which are characterized by the statement that
. We could just use the word “unicyclic” for the realizations instead of using
, but as we leave some open problems for acyclic, bicyclic, tricyclic, etc., of the realizations as a generalization of the problem studied in this manuscript, we have to use omega invariant necessarily for this generalization possibility.
In many problems with graph parameters or topological graph indices, one cannot obtain the exact values of the required parameter or index. In such cases, we may go for the maximum and minimum values instead of the exact value. Similarly, we may be considering some property for a family of graphs that share a common property. Such problems are called extremal problems. A reasonable problem to consider would be the following:
Problem 1. Find the extremal values of and for all connected unicyclic realizations of a given degree sequence D having maximum cycle length .
Here, we answer this problem that we propose, and many similar results can be obtained for thousands of other graph indices. The methods that will be utilized could show slight changes from the ones here, according to the differences between topological graph indices.
One may wonder why we are dealing with the case of maximum cycle length. If we do not put this condition and the length of our unique cycle is shorter than , say of length k, then vertices have to be placed outside the unique cycle. The only places are the ends of pendant edges. So the situation becomes more complicated and needs further assumptions. Without new assumptions, there is a large number of possible realizations, making the situation difficult to handle.
As the first Zagreb index can be reformulated as the sum of squares of all vertex degrees, for a given degree sequence D, all values of where G is a realization of D will be the same. Therefore, the answer to our problem is quite obvious for the first Zagreb index:
Proposition 1. is fixed for all connected realizations G of a unicyclic degree sequence D having maximum cycle length .
Hence, the minimum and maximum values of for this class of graphs are equal to each other. Therefore, we can only study the extremal values of the second Zagreb index for the same class of graph realizations.
2. Minimum Values of Second Zagreb Index of Unicyclic Graphs Having Maximum Cycle Length
Let
. In [
2], it was shown that all connected realizations of
D must be unicyclic and also the maximum cycle length can be
in Theorem 3.3 in [
2]. Let
be a unicyclic graph with cycle length
k. By [
2],
. As we are dealing with unicyclic graphs, which have the maximum cycle length, we shall take
. We want to determine the smallest second Zagreb index of all
. In the case of maximum cycle length, all non-pendant vertices must be on the unique cycle. Also note that the placement of these vertices on the cycle does not affect the value of the second Zagreb index. We now have a useful result which will be needed later:
Observation 1. Let . The contribution of a pendant edge to the second Zagreb index is the same for all realizations .
Therefore, we may omit the contributions of pendant edges when comparing the second Zagreb indices of all unicyclic realizations having the maximum value of the . Henceforth, we shall denote the part of which is calculated only by means of non-pendant edges by . Of course, this argument is only valid for connected unicyclic graphs.
In the following result, we calculate the total contribution of all pendant edges to the second Zagreb index by subtracting the contribution of non-pendant edges from the contribution of all edges:
Lemma 1. Let G be a realization of a unicyclic degree sequence D with maximum cycle length. Then, the total contribution of all pendant edges to the second Zagreb index is Proof . We know that the graph is unicyclic by [
2]. The total contribution of all pendant edges to the second Zagreb index is
. Recall that there are
non-pendant vertices which are placed on the unique cycle of the graph
G. If these vertices have degrees
, then there are
pendant edges at each such vertex, as such a vertex is connected to two other neighboring vertices of the cycle, and as the graph is unicyclic. The contribution of each pendant edge, which will have vertex degrees 1 and
i is
and for each vertex, each of the
pendant edges will contribute this much. Finally, there are
times non-pendant vertices of degree
i. For the vertices of degree 2 on the cycle,
so no contribution is obtained from these vertices. So the sum is taken over all vertices of degree at least 3, and the required contribution is
□
We now give a useful result which will help us to prove our algorithm:
Lemma 2 ((Rearrangement inequality) [
12])
. Let and be two sequences of integers. For any permutation of , we have Note that the smallest value of the sum of the products of ’s and ’s appears when the larger values are multiplied by smaller values. This fact will be the key point in our algorithm.
Let be a realizable degree sequence with . Here are integers and is the biggest vertex degree. We relabel the vertex degrees that are greater than 1 by . The following algorithm gives us the realization of D with the minimum second Zagreb index.
Theorem 1 (Minimum second Zagreb index algorithm). Consider a realization of a unicyclic degree sequence D that has a maximum cycle length constructed as below. Then G has the minimum second Zagreb index amongst all unicyclic realizations of D having maximum cycle length.
Label the vertices on the cycle by in rotating order (clockwise or anticlockwise). Wlog, we choose anticlockwise orientation. Assign the largest vertex degree to .
Assign the smallest vertex degree to and the next smallest vertex degree to . That is, to both neighbors of the vertex with the largest vertex degree, we must place the two smallest vertex degrees.
Assign the next largest vertex degree to and the remaining next biggest vertex degree to .
Repeat the last two steps until all vertices are labeled by the remaining vertex degrees. Note that when is odd, we have to label the last remaining vertex with that final degree, creating no new edge products.
Proof . Our aim is to place positive integers to vertices on a cycle such that (and hence ) takes its minimum value. By the rearrangement inequality in Lemma 2, we must place two smallest degrees next to a large degree. So we start with the biggest degree and place the smallest two degrees to its adjacent vertices. At the next step, we must label the two adjacent vertices by the two largest degrees. The steps continue by placing the two largest and the two smallest degrees in a row, finishing the proof. □
Example 1. Let . Then, by the definition of omega invariant, we have . We shall form several realizations of D as a connected unicyclic graph with maximum cycle length and observe that the realization obtained according to the final algorithm gives us the smallest second Zagreb index.
To apply our algorithm (Theorem 1), we start with a cycle graph and label its vertices as in Figure 1a. Then we label one of the vertices, say by the largest vertex degree, which is 8, see Figure 1b. At the second step, we pick up the smallest two degrees at non-pendant vertices, which are 2 and 3 and assign them to two adjacent vertices of , say and as in Figure 1c. Then we follow the steps in the algorithm to reach the final labeling with minimum second Zagreb index, see Figure 2. Here, the pendant edges are omitted in all figures as they do not affect the value of the second Zagreb index of all realizations, and they make the figures crowded. Therefore, for example, in Figure 1c, there are normally pendant edges at and pendant edges at . But they are not drawn in the figures throughout the paper for the above reason. In Figure 3, three random examples of realizations are illustrated.