Services on Demand
Article
Indicators
 Cited by SciELO
 Access statistics
Related links
 Cited by Google
 Similars in SciELO
 Similars in Google
Share
Pesquisa Operacional
Print version ISSN 01017438
Online version ISSN 16785142
Pesqui. Oper. vol.28 no.1 Rio de Janeiro Jan./Apr. 2008
http://dx.doi.org/10.1590/S010174382008000100004
Ranking graph edges by the weight of their spanning arborescences or trees
Paulo Oswaldo BoaventuraNetto^{*}
Program of Production Engineering / COPPE  Federal University of Rio de Janeiro (UFRJ)  Rio de Janeiro – RJ, Brazil boaventu@pep.ufrj.br
ABSTRACT
A result based on a classic theorem of graph theory is generalized for edgevalued graphs, allowing determination of the total value of the spanning arborescences with a given root and containing a given arc in a directed valued graph. A corresponding result for undirected valued graphs is also presented. In both cases, the technique allows for a ranking of the graph edges by importance under this criterion. This ranking is proposed as a tool to determine the relative importance of the edges of a graph in network vulnerability studies. Some examples of application are presented.
Keywords: graphs; matrixtree theorem; vulnerability.
RESUMO
Um resultado baseado em um teorema clássico da teoria dos grafos é aqui generalizado para grafos valorados, permitindo a determinação do valor total das arborescências parciais com raiz dada que contenham um arco dado, em um grafo orientado valorado. Um resultado correspondente para grafos não orientados valorados é também apresentado. Em ambos os casos, a técnica descrita permite uma hierarquização por importância das ligações do grafo, sob este critério. Esta hierarquização é proposta como uma ferramenta para determinar a importância relativa das ligações de um grafo em estudos sobre vulnerabilidade de redes. Alguns exemplos aplicados são apresentados.
Palavraschave: grafos; teorema "matrixtree"; vulnerabilidade.
1. Introduction
The study of maximal acyclic structures in directed and undirected graphs, especially those with spanning arborescences and trees, is a classical subject of graph theory, which we follow in this work in order to propose a theoretical tool for network vulnerability analysis. The basic notions and results of graph theory used in the theoretical developments can be found in Harary (1971), Berge (1973), Bondy & Murty (1976) and Gross & Yellen (2005). We will use the notation and concepts as in Berge.
Since the publication by Tutte of the celebrated matrixtree theorem (see for instance [Be73] ), the theoretical interest of the theme, especially in its relationship with algebraic graph theory, brought to the literature a number of important works such as those of Kelmans (1997), who early in 1965 had already published in the field.
More recently, the interest contributed by applications such as communication networks and structural design has inspired a number of studies dedicated to the building of these structures, subject to various constraints such as total length of shortest paths, Wu et al. (2000), radius bounding, Serdjukov (2001), leaf degree, Kaneko (2001) and minimum diameter, Hassin & Tamir (1995). The structures of fullerene graphs, of interest in organic chemistry, discussed by Brown et al. (1996), also enhanced the interest in research on spanning trees.
The formulation of algorithms for finding graph parameters related to spanning trees and arborescences resulted in works concerning the problem of the k most vital edges, Liang (2001), the unranking of arborescences, Colburn et al. (1996), the counting of minimumweight spanning trees, Broder & Mayr (1997) and the reliability improvement of a network through a single edge addition, Fard & Lee (2001). A work on digraphs and graphs concerning the effect of link addition and removal on the number of spanning arborescences and trees is found in BoaventuraNetto (1984). Some questions concerning edgeweighted graphs, where the arborescence weight is the product of the weights of its arcs, were first presented by Bott & Mayberry (1954) and more recently discussed by Chung & Langlands (1996).
This work proposes a criterion for ranking the edges of a directed (undirected) graph based on the value of the spanning arborescences (trees) to which it belongs. To that end, we develop a technique using the approach of BoaventuraNetto (1984) and Colburn et al. (1996) to deal with edgeweighted graphs where the substructure weight is given by the sum of edge values.
It is fitting to observe that the total weight of the spanning arborescences (trees) of a graph, calculated for each one as the sum of its edges, could be obtained as shown in Chung & Langlands (1996), substituting exponentials e^{w(i,j)} for the link weights w(i,j) and taking logarithms at the end. While this calculation is theoretically very simple, it would easily cause overflow problems, unless both graph order and edge values were very small. On the other hand, the technique described in BoaventuraNetto (1984) and Colburn et al. (1996) is limited to equal values for every edge.
2. Some theoretical background
When considering directed graphs, they will always have a root and we will call arcs their directed edges. The calculations will be based on a given vertex r which we call a root, in the sense of the definition used with directed graphs. Throughout the text, we will use the shorthand rSPA for rrooted spanning arborescence(s) and SPT for spanning tree(s).
Def. 2.1: The Laplacian Q(G) = [q_{ij}] of a directed graph G = (X,U) is the matrix given by
q_{ij} = d^{}(j)  i = j 
q_{ij} = a_{ij}  i ¹ j, 
where A(G) = [a_{ij}] is the adjacency matrix of G and d^{}(j) is the indegree of vertex j.
With undirected graphs, we substitute the degree d(j) for the indegree d^{}(j).
Def. 2.2: The r^{th}vertex reduced Laplacian of G, Q_{r}(G), is the matrix obtained from Q(G) by the removal of its r^{th} line and column.
Theorem 2.1 (Matrixtree theorem): Given a directed (undirected) graph G and its Laplacian Q(G), the cardinality of the set H_{r}(G) of rSPA (of SPT) is the value of the determinant of Q_{r}(G) for a given r Î X (for any r Î X).
Proof. Berge (1973).
Def. 2.3: A subset R_{ij}(r) Í H_{r}(G) of rSPA from G is said to be associated with an ordered vertex pair (i,j) if we consider this set:

to be generated by the addition of (i,j) to G, if the arc (i,j) Ï U;

to be eliminated by the removal of (i,j) from G, if the arc (i,j) Î U.
The following theorem is an independent result of both BoaventuraNetto (1984) and Colburn et al. (1996).
Theorem 2.2: Let G = (X,U) be a directed stronglyconnected graph. Let (s,t), s, t Î X be a given ordered vertex pair and let G_{1} = G – (s,t) and G_{2} = G È (s,t) be the graphs obtained from G respectively by the removal of arc (s,t) if (s,t) Î G, or by the addition of arc (s,t) if (s,t) Ï G. Then the cardinality of R_{st}(r) as in Def. 2.3, is given by a matrix B_{r} = [] where
where the are the cofactors of Q_{r}(G) or, more precisely, the elements of the transposed adjoint matrix
Proof. Two graphs G and G* (where G* = G_{1} or G* = G_{2}) differing one from another by a single arc (s,t) will have their Laplacians differing by two elements on their t^{th} columns, that is, q_{st} (equal to 0 or –1) and q_{tt} (whose value will change by one unity). The corresponding reduced Laplacians will differ from one another, either by two elements if s ¹ r or by one element if s = r as in this case the line and the column r will not be present.
The number of rSPA in R_{ij}(r) will be the modulus of difference between the determinants of the two reduced Laplacians, Q_{r}(G) and Q_{r}(G*). We will then expand Q_{r}(G) and Q_{r}(G*) by their cofactors associated with the elements of their t^{th} columns.
Let us define K_{st} = (we wish to note that we are using the adjacency matrix of the original graph G) to take into account the sign of the expansion terms concerned with (s,t). For the sake of clarity, we will isolate from the general sum the elements which change from one expansion to the other.
We can correct the value of q_{tt} in the new matrix by adding K_{st} to it: if (s,t) doesnt exist then K_{st} = +1, else K_{st} = –1. For the new value of q_{st} we will have to subtract K_{st }, given the negative sign of q_{st }. Then we have, with X_{r} = X – {r},
The difference between (4ab) and (3), affected by the sign of K_{st}, corresponds to the thesis.
Def. 2.4: With G = (X,U) directed (undirected), we will call B_{r} = [], for every r Î X, the r^{th}spanning arborescence pertinence matrix, rAPM (B = [b_{ij}], for any r Î X, the spanning tree pertinence matrix, TPM).
Example 2.1: Let G be the graph represented in Fig. 2.1, where the alphabetic ordering of the arc labels corresponds to the lexicographic ordering of the corresponding pairs:
We have
where the underlined bold entries are associated with void pairs (nonexistent arcs in G). The addition of w = (1,4) to the graph, for instance, creates six new 1SPAs, which can be identified as acw, abw, bfw, agw, cfw and gfw. On the other hand (4,2) – that is, f – is in the graph but does not belong to any 1SPA.
The expressions (3) and (4ab) can be applied to undirected graphs, by considering their symmetric adjacency matrices, to obtain the TPM. But we have two differences:

there is only one TPM B for a given graph, regardless of the choice of the root;

the choice of a root implies a directed structure: we thus have to consider pairs of symmetric elements in order to take all treeforming possibilities into account.
In the example below we have, for instance, b_{43} = 1 and b_{34} = 4 but we will want to find in both entries the sum corresponding to the sole structure containing (4,3) and the four structures containing (3,4).
If we then consider the symmetric graph associated with the graph of Fig. 2.1, the matrix obtained from (1ac) will be B but our final answer will be B = B + (B)^{T}. Both matrices are shown below, with the entries referred to in bold underlined characters:
It is easy to calculate a reduced Laplacian determinant of the original undirected graph, whose value is 8. According to B, the addition of the edge (1,4) corresponds to 8 new trees, summing up to 16. But now we have a complete graph, for which we have the alreadyknown result of 4^{4 2} = 16 trees, Harary (1971).
3. The generalization for valued graphs
Now let G = (X,U) be an arcvalued directed graph with value matrix V = [v_{ij}].
Def. 3.1: The valued Laplacian Q(G) = [q_{ij}] of a valued graph G = (X,U) is the matrix given by
A known result (see for instance Chung & Langlands (1996)) states that, if H_{r}(G) is the set of rSPA on G, then the determinant of the valued reduced Laplacian verifies that
where the weight of any arborescence is defined as the product of the values of its arcs. (If v_{ij} = 1 for every (i,j) Î U we have the result already given by Theorem 2.1).
We want to define the weight of a given arborescence as the sum of its arc values, since it should be suitable for many applications and thus avoid going through exponentials as already discussed. As a consequence of Def. 2.3, we can observe that the exclusion (inclusion) of the arc (s,t) from (in) G implies the exclusion (inclusion) of arcs (s,t) on the elements of R_{ij}(r) Ì H_{r}(G). Considering the entries of B_{r} which are associated with arcs of G, the arc counting for the entire set of spanning arborescences will be
and we have, for the corresponding total value,
Now let us consider the valued graph G_{st} = G – (s,t) (G_{st} = G È (s,t)) and its adjacency matrix, whose reduced Laplacian matrix will be nd whose rAPM matrix we will call = []. (We note that the rAPM matrix is a structural result that does not depend on arc values). An expression similar to (6) can be derived for the total value of its rSPAs.
To define rrooted spanning arborescence value matrices (rAPVM) , S_{r} = [], r Î X, of the rSPA disconnected by the removal (created by the addition) of the arc (s,t), we write
where in the case of (s,t) removal (addition) we will evidently have = 0 ( = 0). The coefficient K_{st} has the same meaning as in the proof of Theorem 2.2.
In a similar way we can build a spanning tree value matrix (TPVM).
The counting matrices can be determined by applying Theorem 2.2, but to do that we will need the corresponding reduced adjoint matrices (). Since their determinants count the number of rrooted arborescences in the modified graphs, we have for G_{st }, according to (1ac) and (2),
It follows immediately that
if they exist: if for K_{st} = 1 (edge removal) and for given r, s, t we have in =Q_{r} in (8a,b), every rSPA will contain (s,t), then  = 0 and there will be no inverse.
We have already obtained when calculating B_{r }. As Q_{r} and differ one from another by at most two elements in the same column, we can use the product form of the inverse (see for instance Hadley (1965)) to obtain the inverses ()^{1} and their adjoints. To that end, we consider a transform matrix E_{st} such that
Let us express both inverses through their column vectors,
On the other hand, E_{st} can be written as
where [e_{r}]_{i} (i ¹ r) is the i^{th} unit column vector without the r_{th} component and
the vector y being given by
To calculate h, we observe that the changes brought to Q_{r} by the addition or the removal of an arc (s,t) can be written as
Then, premultiplying (15a,b) by we obtain, for the t^{th} column,
According to (14), the first member of these equations is equal to y; then, from (16a,b) we have
and
Then, with (14) we obtain
and finally, from (10) and (12),
from which we obtain the corresponding adjoints.
These expressions cannot be used in the removal case for any arc (s,t) such that = Q_{r}, as already discussed: in this case we will have, from (6),
For undirected graphs, the change in the original Laplacian affects the columns s and t: we thus have to use the proper indexing to apply the procedure once more.
The complexity
The most timeconsuming operations in the process are those associated with matrix inversions and products, which are at most O(n^{3}). Each root r in a directed graph requires at most O(n^{3}) operations for its rAPM to be obtained. (The same is required for the TPM of an undirected graph). These exigencies apply to each vertex pair (i,j) such that i ¹ j and j ¹ r for the determination of the rAPVMs and, as a consequence, of the TPVM. Therefore the complexity in this last case is O(mn^{3}).
4. Some examples
Example 4.1: Let us consider the following value matrices for the graph of Fig. 2.1 (which we will now denote G, since it is now arcvalued) and for the corresponding undirected graph G:
Let s = r = 1. To find S_{1} entries, we will first work by inspection.
The counting of 1SPA given by Theorem 2.2 gives us Q_{1} = 3. The three arborescences, with the values corresponding to V(G) and their total weights, are shown in Fig. 4.1 below:
We have, from (5) and (6), with B_{1 }as from Example 2.1,
We can see that this value is the total value of the nine arcs in Fig. 4.1, as 11 + 10 + 12 = 33.
The arcs (1,2) and (2,4) belong to every 1SPA, so their removal values are equal to this last result,
It is easy to find the remaining removal values, : we can see that each one of these arcs belongs to a single arborescence.
We will next examine the case of (s,t) = (1,4) Ï U addition to G, now working with the algebraic technique already discussed. We will be assigning the weight 1 to the new arcs.
Here s = r = 1: with [q_{1}]_{4} = [1, 0, 1 ] and K_{14}= +1 we apply (19a) to obtain h = [1/3, 0, 1/3 ]. Thus with t = 4, we have
From (8a) and (9a), = 9. Thus the 1APVM is
We already have B_{1 }from Example 2.2. Applying (7) with = 0 we obtain for (i, j) Î U, a total weight of = 51. It is easy to verify that this value corresponds to the 6 new arborescences in Fig. 4.2, where (1,4) is dashed and the arc orientations are to be taken from the root (in white) on.
For the addition of (3,2) to G we obtain one new arborescence, ((1,3),(3,2),(2,4)) with value 8 and for that of (3,4) (also to the original G), three new arborescences are created, with total value 9 + 7 + 10 = 26.
The complete 1APVM for this graph is S_{1} and the corresponding TPVM, obtained as already discussed, is S'_{1} below:Example 4.2:
We will consider a subset of the central region of the city of Rio de Janeiro, represented by a directed graph where we might be interested in studying the impact on traffic of blocking off a given street, for public works or as a consequence of an accident. The vertices will be associated with the corners and the arcs with street segments between two corners, with the direction corresponding to the traffic flow, as in Fig. 4.3 below:
The figure shows the graph and a table with weights given to different streets according to their importance to traffic flow. Pedestrianonly streets were suppressed. Table 4.1 shows the percentual values of the participation of some arcs in sets of arborescences with given roots. It is interesting to note that the arcs are chiefly the same in the examples shown, but the percentual values show significant changes from one root to another. This table does not include arcs (e.g. (1,5)) which are the unique exit for a vertex as they obviously belong to every partial arborescence.
Example 4.3:
This last example deals with the French commutation network TRANSPAC, Bulteau (1997). The vertices correspond to French cities. In Fig. 4.4 below, the position of vertices in the plane is approximately that of the corresponding cities. The more important edges have values equal to 2 or 3; the remaining ones have value 1.
Here we are interested both in the effect of an eventual edge failure and in the gain one could obtain by building a new connection. The evaluative measure in both cases will be the number of spanning trees associated with the concerned edge, which belongs to the network in the first case and is projected to be built in the second case.
Tables 4.2 and 4.3 below show, respectively, the number of spanning trees associated with fifty vertex pairs, both in the first and in the second case.
We can see that a number of the pairs giving a strong increase in the number of spanning trees contain 2degree vertices, which can be easily associated with the level of connectivity. From these it is interesting to observe that 1 and 3 are geographically near one another. Thus the building of an edge (1,3) should therefore have a good costbenefit ratio, since it would increase the number of spanning trees in the graph by a factor of 2.82.
On the other hand, the most critical edge in terms of failure is (10,22), which has value 3 and connects two highdegree points (10 is Paris). The participation of vertices in pairs which are important both for building new edges and in terms of edge failures is given by Table 4.4.
5. Conclusions
In this work, we have presented a technique for evaluating the relative importance of the edges in a directed (undirected) edgeweighted graph by using as a criterion the weights of the spanning arborescences (spanning trees) associated with each pair of vertices, as defined in the text. We consider this criterion to be a useful tool for ranking both existent edges according to the importance of their eventual failure in a network, and nonexistent edges according to their positive influence within the planning of network improvements.
When dealing with this subject, we took into account the needs of some applications related to the fields of communication and transportation, as we found them expressed by authors working in spanning arborescences and trees.
Acknowledgments
For the support for this work, we are indebted to Laboratoire PRiSM of Versailles University in St. QuentinonYvelines, particularly to Professor Catherine Roucairol.
We are also indebted to CNPq (Brazilian Council for Scientific and Technological Development) for their financial support of our visit to PRiSM.
References
(1) Berge, C. (1973). Graphes et hypergraphes. Dunod, Paris. [ Links ]
(2) Berman, K.A. (1980). A proof of Tuttes trinity theorem and a new determinant formula. SIAM Journal on Algebraic and Discrete Methods, 1(1), 6469, Society for Industrial and Applied Mathematics. [ Links ]
(3) Bott, R. & Mayberry, J. (1954). Matrices and trees. In: Economic activity analysis [edited by O. Morgenstern], John Wiley and Sons, New York, 391340. [ Links ]
(4) Brown, T.J.N.; Mallion, R.B.; Pollak, P. & Roth, A. (1996). Some methods for counting the spanning trees in labelled molecular graphs, examined in relation to certain fullerenes. Discrete Applied Mathematics, 67, 5166. [ Links ]
(5) Broder, A.Z. & Mayr, E.W. (1997). Counting minimum weight spanning trees. Journal of Algorithms, 24, 171176. [ Links ]
(6) BoaventuraNetto, P.O. (1984). La différence dun arc et le nombre darborescences partielles dun graphe. Pesquisa Operacional, 4(2), 1220. [ Links ]
(7) Bulteau, S. (1997). Étude topologique des réseaux de communication: fiabilité et vulnerabilité. D.Sc. Thesis, University of Rennes 1, France. [ Links ]
(8) Chung, F.R.K. & Langlands, R.P. (1996). A combinatorial Laplacian with vertex weights. Journal of Combinatorial Theory (A), 75, 316327. [ Links ]
(9) Colburn, C.J.; Myrwold, W.J. & Neufeld, E. (1996). Two algorithms for unranking arborescences. Journal of Algorithms, 20, 268281. [ Links ]
(10) Fard, N. & Lee, T.H. (2001). Spanning tree approach in allterminal network reliability expansion. Computer Communications, 24(13), 13481353. [ Links ]
(11) Gross, J.L. & Yellen, J. (2005). Graph theory and its applications. 2^{nd} ed., Chapman & Hall / CRC. [ Links ]
(12) Hadley, G. (1965). Linear Algebra. AddisonWesley, Reading, New York, London. [ Links ]
(13) Harary, F. (1971). Graph Theory. AddisonWesley, Reading, New York, London. [ Links ]
(14) Hassin, R. & Tamir, A. (1995). On the minimum diameter spanning tree problem. Information Processing Letters, 53, 109111. [ Links ]
(15) Kaneko, A. (2001). Spanning trees with constraints on the leaf degree. Discrete Applied Mathematics, 115, 7376. [ Links ]
(16) Kelmans, A.K. (1997). Transformations of a graph increasing its Laplacian polynomial and number of spanning trees. European Journal of Combinatorics, 18, 3548. [ Links ]
(17) Liang, W. (2001). Finding the k most vital edges with respect to minimum spanning trees for fixed k. Discrete Applied Mathematics, 113, 319327. [ Links ]
(18) Serdjukov, A.I. (2001). On finding a maximum spanning tree of bounded radius. Discrete Applied Mathematics, 114, 249253. [ Links ]
(19) Wu, B.Y.; Chao, K.M. & Tang, C.Y. (2000). Approximation algorithms for the shortest total path length spanning tree problem. Discrete Applied Mathematics, 105, 273289. [ Links ]
Recebido em 07/2006; aceito em 11/2007
Received July 2006; accepted November 2007
* Corresponding author / autor para quem as correspondências devem ser encaminhadas