Acessibilidade / Reportar erro

Ranking graph edges by the weight of their spanning arborescences or trees

Abstracts

A result based on a classic theorem of graph theory is generalized for edge-valued 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.

graphs; matrix-tree theorem; vulnerability


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.

grafos; teorema "matrix-tree"; vulnerabilidade


Ranking graph edges by the weight of their spanning arborescences or trees

Paulo Oswaldo Boaventura-Netto* * Corresponding author / autor para quem as correspondências devem ser encaminhadas

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 edge-valued 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; matrix-tree 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.

Palavras-chave: grafos; teorema "matrix-tree"; 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 matrix-tree 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 minimum-weight 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 Boaventura-Netto (1984). Some questions concerning edge-weighted 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 Boaventura-Netto (1984) and Colburn et al. (1996) to deal with edge-weighted 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 ew(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 Boaventura-Netto (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 r-SPA for r-rooted spanning arborescence(s) and SPT for spanning tree(s).

Def. 2.1: The Laplacian Q(G) = [qij] of a directed graph G = (X,U) is the matrix given by

qij = d-(j) i = j qij = -aij i ¹ j,

where A(G) = [aij] 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 rth-vertex reduced Laplacian of G, Qr(G), is the matrix obtained from Q(G) by the removal of its rth line and column.

Theorem 2.1 (Matrix-tree theorem): Given a directed (undirected) graph G and its Laplacian Q(G), the cardinality of the set Hr(G) of r-SPA (of SPT) is the value of the determinant of Qr(G) for a given r Î X (for any r Î X).

Proof. Berge (1973).

Def. 2.3: A subset Rij(r) Í Hr(G) of r-SPA 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 Boaventura-Netto (1984) and Colburn et al. (1996).

Theorem 2.2: Let G = (X,U) be a directed strongly-connected graph. Let (s,t), s, t Î X be a given ordered vertex pair and let G1 = G – (s,t) and G2 = 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 Rst(r) as in Def. 2.3, is given by a matrix Br = [] where

where the are the cofactors of Qr(G) or, more precisely, the elements of the transposed adjoint matrix

Proof. Two graphs G and G* (where G* = G1 or G* = G2) differing one from another by a single arc (s,t) will have their Laplacians differing by two elements on their tth columns, that is, qst (equal to 0 or –1) and qtt (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 r-SPA in Rij(r) will be the modulus of difference between the determinants of the two reduced Laplacians, Qr(G) and Qr(G*). We will then expand |Qr(G)| and |Qr(G*)| by their cofactors associated with the elements of their tth columns.

Let us define Kst = (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 qtt in the new matrix by adding Kst to it: if (s,t) doesn’t exist then Kst = +1, else Kst = –1. For the new value of qst we will have to subtract Kst , given the negative sign of qst . Then we have, with Xr = X – {r},

The difference between (4a-b) and (3), affected by the sign of Kst, corresponds to the thesis.

Def. 2.4: With G = (X,U) directed (undirected), we will call Br = [], for every r Î X, the rth-spanning arborescence pertinence matrix, r-APM (B = [bij], 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 (non-existent arcs in G). The addition of w = (1,4) to the graph, for instance, creates six new 1-SPA’s, 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 1-SPA.

The expressions (3) and (4a-b) 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 tree-forming possibilities into account.

In the example below we have, for instance, b43 = 1 and b34 = 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 (1a-c) will be but our final answer will be 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 already-known result of 44 -2 = 16 trees, Harary (1971).

3. The generalization for valued graphs

Now let G = (X,U) be an arc-valued directed graph with value matrix V = [vij].

Def. 3.1: The valued Laplacian Q(G) = [qij] of a valued graph G = (X,U) is the matrix given by

A known result (see for instance Chung & Langlands (1996)) states that, if Hr(G) is the set of r-SPA 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 vij = 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 Rij(r) Ì Hr(G). Considering the entries of Br 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 Gst = G – (s,t) (Gst = G È (s,t)) and its adjacency matrix, whose reduced Laplacian matrix will be nd whose r-APM matrix we will call = []. (We note that the r-APM 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 r-SPA’s.

To define r-rooted spanning arborescence value matrices (r-APVM) , Sr = [], r Î X, of the r-SPA 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 Kst 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 r-rooted arborescences in the modified graphs, we have for Gst , according to (1a-c) and (2),

It follows immediately that

if they exist: if for Kst = -1 (edge removal) and for given r, s, t we have in =|Qr| in (8a,b), every r-SPA will contain (s,t), then || = 0 and there will be no inverse.

We have already obtained when calculating Br . As Qr 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 Est such that

Let us express both inverses through their column vectors,

On the other hand, Est can be written as

where [er]i (i ¹ r) is the ith unit column vector without the rth component and

the vector y being given by

To calculate h, we observe that the changes brought to Qr by the addition or the removal of an arc (s,t) can be written as

Then, premultiplying (15a,b) by we obtain, for the tth 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 = |Qr|, 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 time-consuming operations in the process are those associated with matrix inversions and products, which are at most O(n3). Each root r in a directed graph requires at most O(n3) operations for its r-APM 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 r-APVM’s and, as a consequence, of the TPVM. Therefore the complexity in this last case is O(mn3).

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 arc-valued) and for the corresponding undirected graph G’:

Let s = r = 1. To find S1 entries, we will first work by inspection.

The counting of 1-SPA given by Theorem 2.2 gives us |Q1| = 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 B1 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 1-SPA, 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 [q1]4 = [-1, 0, 1 ] and K14= +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 1-APVM is

We already have B1 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 1-APVM 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. Pedestrian-only 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 2-degree 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 cost-benefit 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 high-degree 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) edge-weighted 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 non-existent 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. Quentin-on-Yvelines, 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.

Recebido em 07/2006; aceito em 11/2007

Received July 2006; accepted November 2007

  • (1) Berge, C. (1973). Graphes et hypergraphes Dunod, Paris.
  • (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), 64-69, Society for Industrial and Applied Mathematics.
  • (3) Bott, R. & Mayberry, J. (1954). Matrices and trees. In: Economic activity analysis [edited by O. Morgenstern], John Wiley and Sons, New York, 391-340.
  • (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, 51-66.
  • (5) Broder, A.Z. & Mayr, E.W. (1997). Counting minimum weight spanning trees. Journal of Algorithms, 24, 171-176.
  • (6) Boaventura-Netto, P.O. (1984). La différence dun arc et le nombre darborescences partielles dun graphe. Pesquisa Operacional, 4(2), 12-20.
  • (7) Bulteau, S. (1997). Étude topologique des réseaux de communication: fiabilité et vulnerabilité. D.Sc. Thesis, University of Rennes 1, France.
  • (8) Chung, F.R.K. & Langlands, R.P. (1996). A combinatorial Laplacian with vertex weights. Journal of Combinatorial Theory (A), 75, 316-327.
  • (9) Colburn, C.J.; Myrwold, W.J. & Neufeld, E. (1996). Two algorithms for unranking arborescences. Journal of Algorithms, 20, 268-281.
  • (10) Fard, N. & Lee, T.H. (2001). Spanning tree approach in all-terminal network reliability expansion. Computer Communications, 24(13), 1348-1353.
  • (11) Gross, J.L. & Yellen, J. (2005). Graph theory and its applications 2nd ed., Chapman & Hall / CRC.
  • (12) Hadley, G. (1965). Linear Algebra Addison-Wesley, Reading, New York, London.
  • (13) Harary, F. (1971). Graph Theory Addison-Wesley, Reading, New York, London.
  • (14) Hassin, R. & Tamir, A. (1995). On the minimum diameter spanning tree problem. Information Processing Letters, 53, 109-111.
  • (15) Kaneko, A. (2001). Spanning trees with constraints on the leaf degree. Discrete Applied Mathematics, 115, 73-76.
  • (16) Kelmans, A.K. (1997). Transformations of a graph increasing its Laplacian polynomial and number of spanning trees. European Journal of Combinatorics, 18, 35-48.
  • (17) Liang, W. (2001). Finding the k most vital edges with respect to minimum spanning trees for fixed k. Discrete Applied Mathematics, 113, 319-327.
  • (18) Serdjukov, A.I. (2001). On finding a maximum spanning tree of bounded radius. Discrete Applied Mathematics, 114, 249-253.
  • (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, 273-289.
  • *
    Corresponding author / autor para quem as correspondências devem ser encaminhadas
  • Publication Dates

    • Publication in this collection
      23 June 2008
    • Date of issue
      Apr 2008

    History

    • Accepted
      Nov 2007
    • Received
      July 2006
    Sociedade Brasileira de Pesquisa Operacional Rua Mayrink Veiga, 32 - sala 601 - Centro, 20090-050 Rio de Janeiro RJ - Brasil, Tel.: +55 21 2263-0499, Fax: +55 21 2263-0501 - Rio de Janeiro - RJ - Brazil
    E-mail: sobrapo@sobrapo.org.br