Abstract
A graph is a block graph if its blocks are all cliques. In this paper, we study the average eccentricity of block graphs from the perspective of block order sequences. An equivalence relation is established under the block order sequence and used to prove the lower and upper bounds of the eccentricity on block graphs. The result is that the lower and upper bounds of the average eccentricity on block graphs are 1 and , respectively, where n is the order of the block graph. Finally, we devise a linear time algorithm to calculate the block order sequence.
MSC:
05C12
1. Introduction
We consider connected simple undirected graphs in this paper. and are the vertex set and the edge set of a graph G, respectively. The size of a graph is the cardinality of its edge set. In a graph G, the set of neighbors of v is , while the degree of v is . The distance between u and v is the length of a shortest path between then. The eccentricity of a vertex v is the maximum distance from v to all the other vertices in a graph. The diameter and the radius of a graph G are, respectively, the maximum and the minimum eccentricity over all vertices in G.
Topological indices are tools to character entire graphs, especially in chemical graph theory. The average eccentricity of a graph G is the mean value of eccentricities over all vertices in G, i.e., . The average eccentricity is another distance metric on a graph and introduced by [1]. Directly relying on a polynomial algorithm for the All-Pairs Shortest Paths Problem [2], the average eccentricity can be calculated in time complexity where n is the order of the graph. The properties, formulas, and bounds on the average eccentricity have recently been studied intensely [3,4,5,6,7,8,9,10,11,12]. Several other topological indices have also been well studied, such as Steiner (revised) Szeged index [13], Wiener Polarity Index [14], connective eccentricity index [15], and eccentric connectivity index [16]. Recently, Mao et al. [17] surveyed the progress of Steiner-type topological indices. On chemical graphs, Ahmad et al. [18] studied the chemical graphs of copper oxide and carbon graphite. They computed and gave close formulas of eccentricity based topological indices, such as total eccentricity index and average eccentricity index for chemical graphs of carbon graphite and copper oxide.
This paper is organized as follows. Basic terminologies and formulas are stated in Section 2. We establish the equivalence relation and bounds of the average eccentricity on block graphs with order n in Section 3. As supports for Section 3, Section 4 and Section 5 study the bounds over the set of block graphs with the same block order sequence and the set of path-like block graphs, respectively. In addition, we devise a linear time algorithm to extract the block order sequence for a block graph G in Section 6. Finally, we conclude our paper by looking forward to future work in Section 7.
2. Preliminaries
In a path P, a vertex is named as an endpoint of P if its degree is exactly one in P. Otherwise, it is called an internal vertex in P. If u and v are the two endpoints of a path P, we shortly use or to stand for the path P. A path P is simple if every vertex is distinct from the other vertices of P. A vertex v is said to be a cut-vertex of a graph G if its deletion increases the number of connected components of G. Otherwise, it is said to be a non-cut-vertex. If every block of a graph is a clique, then the graph is named as a block graph.
A block graph is said to be a trivial block graph if and only if it has only one block. In a non-trivial block graph, a block is said to be a pendent block if it interacts with a unique block. Therefore a pendent-block has exactly one cut vertex. The other vertices in a pendent block must be non-cut-vertices. We call the non-cut-vertices of a pendent block pendent vertices of the block graph.
Lemma 1.
There are at least two pendent blocks in a non-trivial block graph.
Proof.
Let G be a non-trivial block graph. Let be the set of blocks in G where is the total number of blocks in G. Let C be the set of cut-vertices in G. We construct a new graph H as follows. The vertex set is where A is a new vertex set such that and there is a bijective function from the vertex set A to the block set . Two vertices are adjacent if and only if the following two situations occur simultaneously.
- u and v are in A and C, respectively.
- There is a vertex such that w and v are adjacent in the graph G.
Now, we show that H is exactly a tree. H is connected due to the connectedness of G. Suppose on the contrary that there is a cycle Q in H. As every vertex in A is not adjacent with the other vertices of A, and every vertex in C is also not adjacent with the other vertices of C, the vertices on the cycle Q come from A and C alternatively. Hence, at least two vertices, say u and v, of Q are from A. Therefore, the two blocks and are in the same block of G, which is a contradiction. Therefore, H is a tree.
According to the construction of H, the degree of every vertex from C must be at least two in H. So every leaf of H must be a vertex in A. As G is a non-trivial block graph, A must has at least two vertices, so H must has at least three vertices. Hence, H has at least two leaves [19]. Therefore, G has at least two pendent blocks. □
Let and be an ordered pair set on the positive integer set . The set S is named as a block order sequence if for each ordered pair , is not less than two. Then, for every integer i ( ), stands for the order of some block and stands for the number of blocks with order . Therefore, k represents the cardinality of block orders. Let be the set of all block graphs with the block order sequence S.
By the above definitions, for a block graph , the number of blocks , the order n and the size m of G are presented in the following Theorem 1.
Theorem 1.
Let be a block graph. Then we have:
- The number of blocks in G is
- The order of G is
- The size of G is
Proof.
By the definition of in a block order sequence, stands for the number of blocks with order . To sum all, there are, in total, blocks in block graphs with the given block order sequence. For every block with order , the number of edges in such a block is . Therefore, on the whole, there are edges in all blocks. This value is equal to the size of the block graph. In the following, we calculate the order of G.
By the definition, for every , the total number of vertices in all blocks with order is . In total, then, there are vertices in all blocks. However, this value is larger than the order of G, as some vertices are shared by more than one block.
Now we prove that there are shared vertices in a block graph with blocks. If , the block graph has just one block. Trivially, there are no shared vertices. Suppose ; there are shared vertices. We are going to prove that when , there are p shared vertices.
Let G be a block graph with blocks. By Lemma 1, let Q be a pendent block. Let v be the unique cut vertex in Q. Delete all vertices from G. Then we obtain a graph with exactly p blocks. By the induction, there are shared vertices in . Now we add Q to in order to obtain G. Q and must share exactly one vertex, so there are p shared vertices in G. Therefore, in total there are shared vertices in a block graph with blocks.
So the order of a block graph is . □
In particular, a block graph is said to be a star-like block graph if and only if there is a unique cut-vertex in it. By the definitions, we have,
Theorem 2.
Let be a star-like block graph. The average eccentricity of G is
where α is the number of blocks in G and calculated by Equation (1).
Proof.
If , there is a unique block in G. The unique block is a complete graph. So the eccentricity of every vertex is 1. Hence, the average eccentricity of G is 1.
If , by definition, there is only one cut-vertex in a start-like block graph. Therefore, the eccentricity of the unique cut-vertex is 1, while the eccentricity of each of the other vertices is 2. Hence, the average eccentricity of the star-like block graph is . □
In terms of contributions, this paper achieves the following two main results.
- The lower and upper bounds of the average eccentricity on block graphs. We established an equivalence relation on the set of graphs with order n from the perspective of block order sequence, which is going to be presented in Theorem 3. The equivalence relation naturally partitions the set of block graphs with order n into several equivalent classes. Recall that all graphs in every such equivalent class have the same block order sequence. Thus, to bind the average eccentricity on block graphs with order, n is transformed to bind the value on every equivalent class. This transformation seems independently interesting.
- A linear time algorithm to find out a block order sequence. Algorithm 1 is devised to find out the block order sequence of a block graph. The algorithm is proven to be in linear time by Theorem 16. This result shows that it is practicable and available to study the eccentricity on block graphs from the perspective of its block order sequence.
3. Extremal Values on Block Graphs with Order n
Let be the set of block graphs with order n. We define a binary relation over the set where, for every two graphs, , if and only if G and H have the same block order sequence. We name the relation the sequence-equivalence relation.
Theorem 3.
The sequence-equivalence relation on is an equivalence relation.
Proof.
It is easy to verify that the relation is reflexive, symmetric, and transitive as follows.
- For every graph , , so it is reflexive.
- if and only if for every two graphs , so it is symmetric.
- for , if and , then must be in the relation , so it is transitive.
Therefore the sequence-equivalence relation is reflexive, symmetric and transitive. So it is an equivalence binary relation. □
As the sequence-equivalence relation is an equivalence relation, it partitions the graph set into several equivalence classes. Let be the set of all equivalence classes where each is an equivalence class formed by and is the cardinality of . The set is also named as the quotient of by [20].
Recall that all graphs in every equivalent class of have the same block order sequence. Therefore, the minimum lower bound among all equivalent classes is the lower bound of the block graphs with order n, while the maximum upper bound among all equivalent classes is the upper bound of the block graph with order n. Therefore, the lower and upper bounds are written as:
Therefore, the problem of bounding the average eccentricity on block graphs with order n is transformed to the problem of bounding the average eccentricity on block graphs with the same block order sequence.
By Theorem 8 in Section 4, for any block order sequence S, the lower bound on block graphs with block order sequence S is either for , or 1 for . Recall that, if , then the block graph is a complete graph with order n, so the lower bound on block graphs with order n is 1.
In addition, by Theorem 10 in Section 4, for a given block order sequence S, the upper bound of the average eccentricity on block graphs with block order sequence S is , where is a path-like block graph with the maximum average eccentricity among the set of path-like block graphs with block order sequence S which is defined in Theorem 13 in Section 5. Therefore, the upper bound on block graphs with order n is . Thus, the average eccentricity of block graphs with order n can be bounded by Theorem 4.
Theorem 4.
Let G be a block graph of order n. Then we have
Theorem 14 in Section 5 decides the value of and shows that the upper bound is .
Integrating Theorems 4 and 14, we achieve the bounds of average eccentricity on block graphs with order n in the following Theorem 5.
Theorem 5.
Let G be a block graph of order n. Then we have
4. Bounds on Block Graphs with a Fixed Block Order Sequence
Now we study the bounds and corresponding extremal graphs over the set of block graphs having the same block order sequence. Before establishing bounds and extremal graphs, we define a notations as follows. Let be an ordered vertex pair where u is a cut vertex of G and . Let be a graph obtained by removing the edges, each of which is not only incident with u but also on a simple path from u to v in G. Let be a connected component of such that contains the vertex u (see Figure 1 as an example). In particular, if , then let .
Figure 1.
The kinds of neighbors of v and the subgraphs in a block graph G.
To obtain the lower bound and the corresponding extremal graph, we define a block-slide transformation on a graph in Section 4.1. A graph which is obtained by a block-slide transformation on G satisfies both and . For the upper bound, we define a block-shift transformation on a graph in Section 4.2. A graph which is obtained by a block-shift transformation on G satisfies both and .
4.1. The Lower Bound and Corresponding Extremal Graphs
Block-slide transformation: Let be a block in a block graph G depicted in Figure 2, where u and v are two distinct cut-vertices of . Let and be two subgraphs in G (see Figure 2). Let . The transformation from G to is named as a block-slide transformation on G. On the other side, the transformation from to G is named as an inverse block-slide transformation on , i.e., .
Figure 2.
is obtained by a block-slide transformation from G, where u and v are on the same block and are two distinct cut-vertices of .
Theorem 6.
Each block-slide transformation eliminates exactly one cut-vertex from a block graph.
Theorem 7.
Let be a block graph which is obtained by a block-slide transformation on a block graph G (see Figure 2). Then holds.
Proof.
Let be a block with order in G. Put the vertices of on a cycle and label its vertices clockwise as , , ,…,, (see Figure 3). Without loss of generality, let . There are parts in the graph G. They are , , ,…,, and , where , , and each is the subgraph for . Let . There are mainly cases of the relationship over , , and L. For each case, we consider the behavior of the average eccentricity on G in the following.
Figure 3.
The configuration of a block graph G, when we focus on the block .
Case 1: . For every vertex , we have . For every vertex , . For every vertex , . Hence, the average eccentricity of the whole graph does not increase after a block-slide transformation.
Case 2: . It is easy to verify that the eccentricity of every vertex in G does not change under the transformation. So the average eccentricity of the whole graph remains the same after a block-slide transformation.
Case 3: . It is easy to verify that if there is a subgraph such that , then the average eccentricity of the whole graph remains the same after the transformation. Let us consider the case that there is no integer such that .
- holds for every vertex .
- holds for every vertex .
- holds for every vertex .
- .
As holds, we have .
Above all, the block-slide transformation does not increase the value of average eccentricity of a block graph. Hence, the theorem holds. □
Corollary 1.
Let G be a block graph which is obtained by an inverse block-slide transformation on a block graph (see Figure 2). Then holds.
Theorem 8.
Every block graph G with a fixed block order sequence satisfies
where α is the number of blocks in G and calculated by Equation (1).
Proof.
Let and be the block order sequence of the block graph G. We repeatedly apply the block-slide transformation on G until no more such transformation can be applied. As each block-slide transformation eliminates one cut-vertex, the transformation procedure must stop at a state in which there is a unique cut-vertex in the graph. In other words, we achieve a star-like block graph when no more block-slide transformation could be applied to the graph. By Theorem 7, the whole transformation procedure does not increase the average eccentricity. Hence, an n-order star-like block graph reaches the minimum value of the average eccentricity among all block graphs with order n. Finally, by Equation (4), if there is more than one block in G, then . Otherwise, the lower bound is exactly one. □
4.2. The Upper Bound and Corresponding Extremal Graphs
In this section, we define a block-shift transformation on a block graph and then we present an upper bound on a graph under the help of such a transformation.
Let t be a cut-vertex of a block graph G and be the set of edges which are all incident with t. Let be a partition of such that two edges belong to the same element of if and only if u and v are in the same block of G. For every element , the petal corresponding to a is defined as follows. is a connected component of such a graph which is obtained by deleting the edges in from G, and contains the cut-vertex t.
In this section, we will see a special kind of block graph which is named a path-like block graph. A block graph G is named a path-like block graph if it either is a complete graph or has exactly two pendent blocks while each of the other blocks contains exactly two cut-vertices.
Block-shift transformation: Let be a block in a block graph G where t, v, and w are all cut-vertices in as depicted in Figure 4. Note that the three cut-vertices t, w, and v do not need to be distinct to each other. Let C be a petal at the vertex t such that C is a path-like block graph and does not contain the block . Let be a pendent vertex of G. Let A and B be two sets of petals corresponding, respectively, to vertices w and v, such that holds. Let . Then the transformation from G to is said to be a block-shift transformation on graph G, while the transformation from to G is said to be an inverse block-shift transformation on graph , i.e., .
Figure 4.
is obtained by a block-shift transformation from G where v, t, and w are all cut-vertices on the same block . Note that the three cut-vertices v, t, and w are not restricted to be distinct. The longest path which ends with w in the subgraph A is not longer than the longest path which ends with v in the subgraph B. Moreover, the subgraph C is a path-like block subgraph.
Theorem 9.
Let be a block graph which is obtained by a block-shift transformation on a block graph G (see Figure 4). Then holds.
Proof.
It is obvious that the eccentricity of every vertex in A and B does not decrease under the block-shift transformation. As , the eccentricity of every vertex in the set also could not be decreased by the block-shift transformation. Above all, after a block-shift transformation, the average eccentricity of a block graph does not decrease. □
Corollary 2.
Let G be a block graph which is obtained by an inverse block-shift transformation on a block graph (see Figure 4). Then holds.
Repeatedly apply the block-shift transformation on a block graph G. Finally we will reach a state that the graph G turns into a path-like block graph. By Theorem 9, the transformation does not decrease the average eccentricity, so the upper bound on block graph set must be achieved by a path-like block graph in . Let be a path-like block graph with the maximum average eccentricity among all path-like block graphs in . The upper bound on the set can be written in the following Theorem 10.
Theorem 10.
Let be a block graph with the set S as its block order sequence. Then,
The following Section 5 is to present a method to obtain a .
5. Bounds and Extremal Graphs for Path-like Block Graphs
This section settles bounds and extremal graphs for path-like block graphs. Initially, formulas are established to calculate the average eccentricity on a path-like block graph. Then, we set up bounds and their corresponding extremal graphs for the set of path-like block graphs, where every path-like block graph has the same block order sequence S. Finally, we prove lower and upper bounds on the set of path-like block graphs, where each path-like block graph has order n.
5.1. Formulas for the Average Eccentricity on Path-like Block Graphs with Given Block Order Sequence
Let be the set of path-like block graphs with the block order sequence . For a path-like block graph , we straighten G on a horizontal line from left to right as in Figure 5. Then, we label the blocks as , , ,…, and label the cut-vertices as , , ,…, in G from left to right, one by one, where is the number of blocks in G as calculated by Equation (1) in Theorem 1. In particular, we choose a non-cut-vertex from and a non-cut-vertex from , and then label them and , respectively. In the following, every path-like block graph has already been straightened and labeled this way. In order to make it clear, in the following, we use to stand for the order of each block , i.e., . Let .
Figure 5.
A path-like block graph G is straightened on a horizontal line from left to right and labeled , , ,…, one by one, where is the number of blocks in G.
Theorem 11.
Let where is a block order sequence. Then, the average eccentricity of G is,
Proof.
If is even, then in block and for every , there are exactly vertices, each of which contributes the value to the average eccentricity. The middle cut vertex exactly contributes the value . To sum all, the average eccentricity of G is
If is odd, then in block and for every , there are exactly vertices, each of which contributes the value to the average eccentricity. In addition, each vertex in the middle block contributes the value . To sum all, the average eccentricity of G is
□
5.2. Extremal Graphs for Path-like Block Graphs with Given Block Order Sequence
In order to set up bounds and study extremal graphs for path-like block graphs, we need to establish a graph transformation operation which is named as block-exchange transformation. To make the transformation clear, we define a mapping function to map the subscript index i of into a new integer as follows.
- If is even, then
- If is odd, then
Lemma 2.
For every block () in a path-like block graph G, there are exactly vertices, each of which has the eccentricity equal to .
Proof.
We prove this lemma by considering the case that is even. It is the same way to give proof for the case that is odd. There are three cases.
Case 1: . The eccentricity of every vertex is , while the vertex has its eccentricity equal to the value of . Hence, the lemma holds on this case.
Case 2: . The eccentricity of every vertex is equal to , while the vertex has the eccentricity as . Hence, the lemma holds on this case.
Case 3: . The eccentricity of every vertex is , while the vertex has the value of . Hence, the lemma holds on this case.
Above all, there are exactly vertices each of which has the eccentricity equal to for every block () in a path-like block graph G. □
Block-exchange transformation: Let G be a path-like block graph with labeled blocks and cut-vertices as depicted in Figure 5. If there are two distinct blocks , () such that both and hold, then we construct a new graph by exchanging the two blocks and in G, i.e., (see Figure 6). The transformation from G to is called a block-exchange transformation on G. On the other side, the transformation from to G is said to be an inverse block-exchange transformation on . Note that, after the block-exchange transformation, and holds in graph .
Figure 6.
is obtained by a block-exchange transformation from G, where , , and for . Moreover, for every .
Theorem 12.
Let be a path-like block graph which is obtained by a block-exchange transformation on a block graph G (see Figure 6). Then holds.
Proof.
Let and be two blocks such that both and hold in a path-like block graph G. Let be the new graph obtained by a block-exchange transformation on these two blocks. By the definition of the eccentricity, the eccentricity of every vertex in does not change under the block-exchange transformation. As , by Lemma 2, the eccentricity of each vertex in decreases , while the eccentricity of each vertex in increase after the block-exchange transformation. On the whole, relying on Equations (5) and (6), the change of the average eccentricity under such a transformation is
As and hold, must hold. Therefore, the block-exchange transformation increases the average eccentricity of a path-like block graph. □
Corollary 3.
Let G be a path-like block graph which is obtained by an inverse block-exchange transformation on a block graph (see Figure 6). Then holds.
Let and be path-like block graphs having, respectively, minimum and maximum average eccentricity on the set of block graphs with block order sequence S. In other words, let be a path-like block graph with the block order sequence S where every two distinct blocks and of satisfies that both and hold. Let be a path-like block graph with the block order sequence S where every two distinct blocks and of satisfies that both and hold.
Theorem 13.
The average eccentricity of every graph with block order sequence S is not less than that of and not larger than that of , i.e.,
Proof.
Repeatedly applying the block-exchange transformation on graph G until there is no pair of blocks and such that both and hold, we obtain a graph . By Theorem 12, every block-exchange transformation on graph G increases the average eccentricity. Hence, holds.
Repeatedly applying the inverse block-exchange transformation on graph G until there is no pair of blocks and such that both and hold, we obtain a graph . By Corollary 3, every block-exchange transformation on graph G increases the average eccentricity. Hence, holds. □
5.3. Bounds on Path-like Graphs with Order n
Theorem 14.
Let G be a path-like block graph with the order n. Then we have
Proof.
We straighten the graph G relying on the method stated in Section 5.1. The blocks are labeled , , ,…, and the cut-vertices are labeled , , ,…, in G from left to right, one by one, where is the number of blocks in G as calculated by Equation (1) in Theorem 1. We regard each non-cut-vertex of and as an empty block graph, where an empty block graph is a graph having exactly one vertex. Then, we pick just one non-cut-vertex of and label it , while one non-cut-vertex of is labeled , see Figure 7.
Figure 7.
A path-like block graph G is straightened on a horizontal line from left to right and labeled , , ,…, one by one, where is the number of blocks in G, where the two non-cut-vertices and are labeled and , respectively.
Considering the additional labels and , we slightly modify the mapping function as follows, where is the mapping function defined in Equations (7) and (8). A new mapping function , which maps the subscript index i of into a new integer, is defined in the following Equation (9).
In the following proof, we still use to stand for the order of block for every . If there is a non-cut vertex and a block such that , , , and , then let . Repeatedly apply this vertex-moving operation on the vertices of G until no more such operation can be achieved. Then we obtain a path . Recall that every such vertex-moving operation increases the average eccentricity. Therefore, the average eccentricity of G could not exceed that of a path . Recall that the average eccentricity of an n-order path is [4].
On the other hand, if there is a non-cut-vertex and a block such that , , , and , then let . Repeatedly apply this vertex-moving operation on the vertices of G until no more such operation can be achieved. We will subsequently obtain either a block graph with only one block or a block graph with exactly two blocks. If the final graph has only one block, then it is a complete graph . Recall that every such vertex-moving operation decrease the average eccentricity. If the final graph has exactly two blocks, say and , then we delete all edges in and add an edge between each vertex and . Then we still obtain a complete graph , and this process decreases the average eccentricity. It is easy to verify that the average eccentricity of a complete graph is exactly one [4].
Above all, we have , where G is a path-like block graphs with order n. □
6. Extracting the Block Order Sequence of a Block Graph
In this section, we devised a linear time algorithm to extract the block order sequence of a block graph. This indicates that it is possible to study the eccentricity on block graphs via its block order sequence.
6.1. To Decide a Cut-Vertex
Our algorithm needs to test whether a vertex is a cut-vertex The idea benefits from a property of cut-vertices in a block graph, which is stated in Lemma 3 and realized by Algorithm 2. We should emphasize that Lemma 3 is fit for the block graphs rather than the general undirected simple graphs.
Lemma 3.
Let G be a block graph and . Let u be a neighbor of v in G. Then u is a cut-vertex of G if and only if there is a vertex such that .
Proof.
Let be the graph obtained by deleting vertex u from G. We prove this lemma from the following two sides.
On the one hand, if there is a vertex such that , then v and w is also not adjacent in . We claim that w and v are disconnected in . Otherwise, both in graph G and , there must be a path P from v to w such that . The path is another path from w to v in G and is vertex-internally-disjointed with the path P. Hence, there is a cycle in G which contains the three vertices u, v, and w, so the three vertices u, v, and w are all in the same block of G. As G is a block graph, every block is a clique, so there is an edge incident with both v and w, which comes to a contradiction. Hence, u must be a cut-vertex of G.
On the other hand, if u is a cut-vertex of G, then must be a disconnected graph. Recall that the graph G is connected. Moreover, there must be two distinct vertices and such that every simple path from a to b in G must go through the vertex u [19], as u is a cut-vertex. Let be an arbitrary simple path from a to b in G. Without loss of generality, let and satisfy and , and the sub-path of from a to do not contain the vertex u. Then the path can be marked as . Assume that every vertex is adjacent to v in the graph G. Then the path is another path from a to b. Then is another simple path, while not containing u at all. This comes to a contradiction.
Above all, the vertex u is a cut-vertex of G if and only if there is a neighbor of u such that . □
By Lemma 3, it is exciting to find that, in order to decide whether u is a cut-vertex of a block graph G, one just needs to access all edges which are incident with u rather than decide the connectivity of G. It would therefore take far less time to decide whether a vertex is a cut-vertex in a block graph by use of the property stated in Lemma 3. We realize this decision method in the following Algorithm 2.
Theorem 15.
Given a vertex v of a graph G and a neighbor of v, it spends time to decide whether u is a cut-vertex by Algorithm 2.
Proof.
In step 2–2 of Algorithm 2, each neighbor of u is either adjacent to v or not adjacent to v. Moreover, every neighbor of u is visited once and only once. Hence, the time complexity is . □
6.2. To Obtain a Block Order Sequence
To find the block order sequence of a block graph G we must first to find every block and then calculate the order for each block, which is realized in Algorithm 1.
Lemma 4.
Let u be a non-cut-vertex in a block of a block graph G, then the order of is equal to .
Proof.
As u is not a cut-vertex, u and all its neighbors must be in the same block . As every block in a block graph must be a clique, there is no vertex such that . Therefore, the vertex set is equal to . Hence, the order of is . □
Now let us turn to Algorithm 1. The algorithm is to find the block order sequence of a block graph by means of searching the cut-vertices one by one, as every block must associate with some cut-vertex. The whole Algorithm is a recursive depth-first search (DFS) procedure [2] beginning with an arbitrary vertex of a block graph. The process to search for the cut-vertices is an “up-to-bottom” recursive method. The process to calculate the order for each block is performed the back-trace way during the recursive process from bottom to up.
By Lemma 1, the algorithm can always meet with a pendent block, say , at the bottom of a recursive process. Let w be the unique cut-vertex in . By Lemma 4, the algorithm calculate the order of by means of where is not a cut-vertex and adjacent to w. After all the pendents block corresponding to w has been processed, the algorithm marks w as an non-cut-vertex by step 1. Then, the algorithm traces back to search another block. By this way going up, finally, we can obtain a block order sequence of a block graph.
| Algorithm 1: Seq(G, v, visit, B) |
![]() |
| Algorithm 2: Is_CutVertex(G, v, u) |
![]() |
Theorem 16.
It takes time for the Algorithm 1 to find the block order sequence of a block graph G where n and m are the order and the size of G, respectively.
Proof.
Without loss of generality, let Algorithm 1 execute beginning with the vertex v. Let be the time taken by Algorithm 1 on the subgraph . Let C be the set of cut-vertices in G. Then we have,
□
7. Conclusions
We study the average eccentricity of block graphs from the perspective of their block order sequences. A block order sequence could provide useful structural information on block graphs and can be obtained in linear time from Algorithm 1. Moreover, via Theorem 3, the perspective of block order sequences naturally provides an equivalence relationship on the set of block graphs. It may be interesting to study some other computational problems and mathematical properties on block graphs from the perspective of block order sequences. Recall that the blocks in the other graph classes may not be all cliques. Moreover, an entire graph can be characterized by applying several criteria [21,22]. In particular, in chemical graph theory, several connections between graph structure and properties have been established [23]. This paper characterizes a block graph from block order sequence. Are there any ways to deal with problems on the other graph classes, also from the perspective of block order sequence?
Author Contributions
Conceptualization, X.L. and G.Y.; Methodology, X.L. and G.Y.; Writing-Original Draft Preparation, X.L.; Writing-Review and Editing, G.Y. and K.C.D. Supervision, G.Y. and K.C.D.; Validation, X.L., G.Y. and K.C.D. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by Science Foundation of Guizhou University of Finance and Economics (2020XYB16), Science Foundation of Guizhou University of Finance and Economics (2019YJ058).
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Not applicable.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Buckley, F.; Harary, F. Distance in Graphs; Addisson-Wesley: Redwood City, CA, USA, 1990. [Google Scholar]
- Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithme; MIT Press: Cambridge, UK, 2001. [Google Scholar]
- Ali, P.; Dankelmann, P.; Morgan, M.J.; Mukwembi, S.; Vetrik, T. The average eccentricity, spanning trees of plane graphs, size and order. Util. Math. 2018, 107, 37–49. [Google Scholar]
- Dankelmann, P.; Goddard, W.; Swart, C.S. The average eccentricity of a graph and its subgraphs. Util. Math. 2004, 41, 41–51. [Google Scholar]
- Dankelmann, P.; Mukwembi, S. Upper bounds on the average eccentricity. Discret. Appl. Math. 2014, 167, 72–79. [Google Scholar] [CrossRef]
- Dankelmann, P.; Osaye, F.J. Average eccentricity, k-packing and k-domination in graphs. Discret. Math. 2019, 342, 1261–1274. [Google Scholar] [CrossRef]
- Dankelmann, P.; Osaye, F.J.; Mukwembi, S.; Rodrigues, B. Upper Bounds on the average eccentricity of K3-free and C4-free graphs. Discret. Appl. Math. 2019; in press. [Google Scholar] [CrossRef]
- Du, Z.; Ilić, A. On AGX conjectures regarding average eccentricity. MATCH Commun. Math. Comput. Chem. 2013, 69, 597–609. [Google Scholar]
- Du, Z.; Ilić, A. A proof of the conjecture regarding the sum of the domination number and average eccentricity. Discret. Appl. Math. 2016, 201, 105–113. [Google Scholar] [CrossRef]
- Ilić, A. On the extremal properties of the average eccentricity. Comput. Math. Appl. 2012, 64, 2877–2885. [Google Scholar] [CrossRef] [Green Version]
- Smith, H.; Székely, L.A.; Wang, H. Eccentricity sum in trees. Discret. Appl. Math. 2016, 207, 120–131. [Google Scholar] [CrossRef] [Green Version]
- Tang, Y.; Zhou, B. On average eccentricity. MATCH Commun. Math. Comput. Chem. 2012, 67, 405–423. [Google Scholar]
- Ghorbani, M.; Li, X.; Maimani, H.R.; Mao, Y.; Rahmani, S.; Rajabi-Parsa, M. Steiner (revised) Szeged index of graphs. MATCH Commun. Math. Comput. Chem. 2019, 82, 733–742. [Google Scholar]
- Lei, H.; Shi, Y.; Yue, J. A Survey on the Wiener Polarity Index. MATCH Commun. Math. Comput. Chem. 2021, 86, 289–318. [Google Scholar]
- Yu, G.; Feng, L. On the connective eccentricity index of graphs. MATCH Commun. Math. Comput. Chem. 2013, 69, 611–628. [Google Scholar]
- Zhou, B.; Du, Z. On eccentric connectivity index. MATCH Commun. Math. Comput. Chem. 2010, 63, 181–198. [Google Scholar]
- Mao, Y.; Furtulab, B. Steiner Distance in Chemical Graph Theory. MATCH Commun. Math. Comput. Chem. 2021, 86, 211–287. [Google Scholar]
- Zaheer Ahmad, A.Q.; Baig, M.; Azhar, M. Imran Total eccentricity and average eccentricity indices of some chemical graphs: Carbon graphite and copper oxide. J. Inf. Optim. Sci. 2020, 41, 905–924. [Google Scholar]
- Bondy, J.A.; Murty, U.S.R. Graph theory with applications. In Great Britain; The Macmillan Press: Stuttgart, Germany, 1976. [Google Scholar]
- Goddard, W.; Rosen, K.H.; Shier, D.R. Handbook of Discrete and Combinatorial Mathematics, 2nd ed.; Chapman and Hall: London, UK; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
- Jäntschi, L.; Diudea, M. Subgraphs of pair vertices. J. Math. Chem. 2019, 45, 364–371. [Google Scholar] [CrossRef]
- Jäntschi, L.; Balan, M.C.; Bolboacă, S. Counting Polynomials on Regular Iterative Structures. Appl. Med. Inform. 2009, 24, 67–95. [Google Scholar]
- Diudea, M.V.; Gutman, I.; Jantschi, L. Molecular Topology; Nova Science Publishers: New York, NY, USA, 2001. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).








