Steiner Wiener index of block graphs

Let $S$ be a set of vertices of a connected graph $G$. The Steiner distance of $S$ is the minimum size of a connected subgraph of $G$ containing all the vertices of $S$. The Steiner $k$-Wiener index is the sum of all Steiner distances on sets of $k$ vertices of $G$. Different simple methods for calculating the Steiner $k$-Wiener index of block graphs are presented.


Introduction
All graphs in this paper are simple, finite and undirected. If G is a connected graph and u, v ∈ V (G), then the (geodetic) distance d(u, v) between u and v is the length of a shortest path connecting u and v, see also [6]. The Wiener index W (G) of a connected graph G is defined by The first investigations of this distance-based graph invariant were done by Harold Wiener in 1947, who realized in [21] that there exist correlations between the boiling points of paraffins and their molecular structure and noted that in the case of a tree it can be easily calculated from the edge contributions by the following formula: where n(T 1 ) and n(T 2 ) denote the number of vertices in connected components T 1 and T 2 formed by removing an edge e from the tree T .
The Steiner distance of a graph, introduced in [3] by Chartrand et al., is a natural generalization of the concept of the geodetic graph distance. For a graph G = (V, E) and a set S ⊆ V of at least two vertices, an S-Steiner tree or a Steiner tree connecting S (or simply, an S-tree) is a subgraph T = (V , E ) of G that is a tree with S ⊆ V . Let G be a connected graph of order at least 2 and let S be a nonempty set of vertices of G. Then the Steiner distance d(S) among the vertices of S (or simply the distance of S) is the minimum size of a connected subgraph (the number of edges) whose vertex set contains S. Note that if H is a connected subgraph of G such that S ⊆ V (H) and |E(H)| = d(S), then H is a tree. Clearly, In [4,5] Dankelmann et al. followed by studying the average k-Steiner distance µ k (G), which is related to the k-Steiner Wiener index via the equality µ k (G) = SW k (G)/ n k . In [16], Li, Mao and Gutman introduced a generalization of the Wiener index, by using Steiner distance. Thus, the k-th Steiner Wiener index SW k (G) of a connected graph G is defined by For k = 2, the Steiner Wiener index coincides with the ordinary Wiener index. It is usual to consider SW k (G) for 2 ≤ k ≤ n − 1, but the above definition also implies SW 1 (G) = 0 and SW n (G) = n − 1 for a connected graph G of order n. They obtained the exact values of the Steiner Wiener k-index of the path, star, complete graph, and complete bipartite graph and sharp lower and upper bounds for SW k (G) for connected graphs and for trees. In [10] the appplication of k-Steiner Wiener index in mathematical chemistry is reported, and it is shown that the term W (G) + λSW k (G) provides a better approximation for the boiling points of alkanes than W (G) itself, and that the best such approximation is obtained for k = 7. See [15,17,18,20] for recent results related to Steiner Wiener index and a survey on Steiner distance in [19]. In a graph G, a vertex u is a cut-vertex if deleting u and all edges incident to it increases the number of connected components. A block of a graph is a maximal connected vertex induced subgraph that has no cut vertices. A block graph is a graph in which every maximal 2-connected subgraph or block is a clique [1,6]. Block graphs are a natural generalization of trees, and they arise in areas such as metric graph theory [1], molecular graphs [2] and phylogenetics [8]. They have been characterized in various ways, for example, as certain intersection graphs [11], or in terms of distance conditions [2].
The windmill graph W d(p, n) is a block graph constructed for p ≥ 2 and n ≥ 2 by joining n copies of the complete graph K p at a shared vertex. A claw-free graph is a graph in which no induced subgraph is a claw, i.e. a complete bipartite graph K 1,3 . Claw-free block graphs are block graphs which are claw-free.
The interval I(u, v) between two vertices u and v consists of all vertices that are on shortest paths joining u and v. More generally for a subset A ⊂ V (G) the k-interval of A, denoted by I k (A), consist of all vertices of G that are on some k-Steiner tree joining vertices of A. A graph G is modular [12] if for every three vertices x, y, z there exists a vertex w that lies on a shortest path between every two vertices of x, y, z, i.e. |I(x, y) ∩ I(x, z) ∩ I(y, z)| ≥ 1 . It is easy to see that a modular graph is a bipartite graph. Examples of modular graphs are trees, hypercubes, grids, complete bipartite graphs, etc. The simplest examples of non-modular graphs are cycles on n vertices, for n = 4, and complete graphs.
In this paper we obtain simple methods for calculating the k-Steiner Wiener index of block graphs. We obtain exact values for k-Steiner Wiener index of windmill graphs and claw free block graphs. We generalise the relation between 3-Steiner Wiener index and Wiener index of a tree from [16] to modular graphs and obtain the corresponding similar relation for block graphs. We conclude with the Steiner Wiener decomposition formula for the special family of block graphs -trees via their subtrees.

Decomposition formula of k-Steiner Wiener index of block graphs
For a graph G, let n(G) denote the number of its vertices. For a forest F with p, p > 1, connected components T 1 , T 2 , . . . , T p denote by N k (F ) the sum over all partitions of k into at least two nonzero parts of products of combinations distributed among the p components of F : For a tree T and e ∈ E(T ), let T − e denote a graph obtained by removing edge e from T . Then the following formula has been shown in [15] For a given partition l 1 + l 2 + . . . + l p = k, let α(l 1 , l 2 , . . . , l p ) denote the number of nonzero summands minus 1. For a graph G with p, p > 1, connected components G 1 , G 2 , . . . , G p , we define N k (G) to be the sum over all partitions of k into at least two nonzero parts of products of combinations distributed among the p components of G multiplied by α(l 1 , l 2 , . . . , l p ) : For a connected graph G, we define N k (G) = 0. Note that by the definition n 0 = 1, and n k = 0 whenever n < k.

Steiner Wiener index of Windmill graphs
Theorem 3.1. Let W d(p, n) be windmill graph Then Proof. We prove the theorem by considering two cases.
Case 1. Set of k terminals includes the central vertex of the windmill graph.
Since the central vertex is adjacent to any other vertex, we get a star graph as Steiner tree of k vertices which has size k − 1. Then, the contribution of this case to SW k (G) is (k − 1) n(p−1) k−1 . Case 2. Set of k terminals does not contain the central vertex of the windmill graph.
Sub case 2.1: Set of k terminals are from the same clique. We get a path of length k − 1 as Steiner tree consisting of the set of k vertices and there are n p−1 k possible ways of choosing them. Therefore, the contribution of this case to SW k (G) is n(k − 1) p−1 k .
Sub case 2.2: Set of terminals are from at least two different cliques. Let l 1 + l 2 + . . . + l n = k be a partition. Since any path from K p i to K p j , i = j must pass through central vertex and the set of l i vertices in K p i form l i − 1 path, the Steiner distance is l 1 + l 2 + . . . + l n = k. Then, the contribution of this case to SW k (G) is

Vertex decomposition of Steiner Wiener index of block graphs
For a tree T and v ∈ V (T ), let T \ v denote a graph obtained by removing v from T . Note that T \ v may consists of several components and that their number equals the degree of v. In [15], the vertex version of Steiner Wiener index of a tree is given by Theorem 4.1. For a block graph G with set of cut vertices V c (G), Proof. N k (G \ v) counts number of times a cut vertex v is a non terminal vertex of Steiner tree. Since each such vertex adds 1 to Steiner distance of k vertex set, Steiner distance between k vertices is by k − 1 greater than the number of nonterminal vertices in the corresponding Steiner tree, adding k − 1 for each set of k vertices, we get the sum of Steiner distances between all k sets of vertices, and the equality in formula holds.
The line graphs of trees are exactly the block graphs in which every cut vertex is incident to at most two blocks, or equivalently these are the claw-free block graphs.

Corollary 4.2. For a claw-free block graph G, Steiner Wiener index is given by
Proof. Claw-free block graphs are graphs for which a cut vertex is adjacent to at most two blocks. Let the components of T \ v be T 1 and T 2 . Then formula follows by applying Theorem 4.1.
Therefore SW 3 (G) = 20 + 7 = 27.  I(a, b). Hence modular graphs are those graphs for which the 2-intersection interval of every triple of vertices is nonempty. The following result is from [13].

3-Steiner Wiener index of modular and block graphs
Theorem 5.1. Let S = {u 1 , u 2 , . . . , u n } be a set of n > 2 vertices of a graph G. If the 2-intersection interval of S is nonempty and x ∈ I 2 (S), then d(S) = n i=1 d(u i , x).
Next we provide the connection between 3-Steiner Wiener index and Wiener index.
Theorem 5.2. Let G be a graph on n vertices. Then, with the equality if and only if G is a modular graph.
Proof. Let G be a connected graph. A triplet of vertices x, y, z ∈ V (G) is called a modular triplet if I(x, y) ∩ I(x, z) ∩ I(y, z) = ∅.
Let S = {a, b, c} ⊆ V (G), |S| = 3. and let G be a modular graph. Then there exist x ∈ I 2 (S). By Theorem 5.1 it follows d(S) = d(a, x) + d(b, x) + d(c, x). There are two possibilities: , c)). Each pair of vertices in a graph on n vertices belongs to n − 2 different triples of vertices, hence it follows.
For a non modular triplet x, y and z we always have d(x, y, z) > 1 2 (d(x, y) + d(x, z) + d(y, z)), hence we get the strict inequality, for any non modular graph.
Since trees are modular graphs, Theorem 5.2 generalises Corollary 4.5 from [16], where a special case for trees is proved. Theorem 5.3. Let G be a block graph with blocks B 1 , B 2 , . . . , B m . Then Proof. In a block graph G, any nonmodular triplet x, y, z must belong to the same clique. In this case d(x, y, z) = 2 = 1 2 (d(x, y) + d(x, z) + d(y, z)) + 1 2 . Let M (G) denote the set of all modular triplets of G. Then it follows Here the last sum counts the number of nonmodular triplets in a block graph.

The k-intersection intervals and k-Steiner Wiener index of trees
In this section we extend result on Wiener index of trees from Doyle and Graver [7], by generalizing the original notions and proof technique to obtain a formula for k-Steiner Wiener index of a tree, see also [9,14] for alternative proofs in the case when k = 2. For a subset of vertices A, let S(A) denote the Steiner tree connecting them. A subset of k distinct vertices {v 1 , v 2 , . . . , v k } = A ⊆ V (G) is said to be k-collinear if there exist i, 1 ≤ i ≤ k, such that a i ∈ S(A \ {a i }). Let τ k (G) denote the number of non-k-collinear subsets of G.
Theorem 6.1. Let G be a graph on n vertices, such that every subset of k vertices is connected by a unique k-Steiner tree. Then Proof. Let C be the collection of (k + 1)-collinear subsets of V (G) and let D be the collection of all k-subsets of V (G). Define φ : C → D by letting φ(A), A ⊂ C, be the k-subset of vertices whose Steiner tree includes all vertices from A.
None that for a B ⊂ D, φ −1 (B) is the collection of all (k + 1)-subsets of V (G) which contain vertices from B and a vertex on the unique Steiner tree between them. Therefore |φ −1 (B)| = d(B) − (k − 1), which is precisely the number of all inner vertices on a unique Steiner tree with k-terminal vertices, forming a set B. Hence Since |C| + τ k (G) = n k+1 the theorem is proved.
We can extend the definition of the 2-intersection interval as follows. For S ⊆ V (G), the k-intersection interval of S is the intersection of all k-intervals between k-subsets of vertices from S: I k (S) = A⊂S |A|=k I k (A).
Proof. In a tree, any subset of vertices is joined by a unique Steiner tree, hence we can use Theorem 6.1.
If v 1 , v 2 , . . . v k are k distinct non-(k − 1)-collinear vertices of T , joined by Steiner tree S, then there exist a unique minimal subtree S such that S \ S has exactly k components -this is exactly the k-intersection interval of v 1 , v 2 , . . . , v k .
The function M k (T − T ) , is precisely the number of non-collinear k-subsets of V (T ) with T as its k-intersection interval.