• Aucun résultat trouvé

A note on tree realizations of matrices

N/A
N/A
Protected

Academic year: 2022

Partager "A note on tree realizations of matrices"

Copied!
6
0
0

Texte intégral

(1)

RAIRO Oper. Res. 41(2007) 361–366 DOI: 10.1051/ro:2007028

A NOTE ON TREE REALIZATIONS OF MATRICES

Alain Hertz

1

and Sacha Varone

2

Abstract. It is well known that each tree metric M has a unique realization as a tree, and that this realization minimizes the total length of the edges among all other realizations ofM. We extend this result to the class of symmetric matricesM with zero diagonal, positive entries, and such thatmij+mkl≤max{mik+mjl, mil+mjk}for all distinct i, j, k, l.

Keywords.Matrices, tree metrics, 4-point condition.

Mathematics Subject Classification. 05C50, 05B20, 68R10, 68U99.

Introduction

Ann×nmatrixM = (mij) with zero diagonal is atree metricif it satisfies the following4-point condition:

mij+mkl≤max{mik+mjl, mil+mjk} ∀i, j, k, lin{1, . . . , n}.

By denotingsijkl=mij+mkl, the 4-point condition is equivalent to imposing that two of the three sumssijkl, sikjl and siljk are equal and not less than the third.

The 4-point condition entails the triangle inequality (for k = l) and symmetry (for i = k and j = l). There is an extensive literature on tree metrics; see for example [1–3, 7–10].

Received March 07, 2005. Accepted January 19, 2007.

This work has been partially funded by grant PA002-104974/1 from the Swiss National Science Foundation, received by the second author.

1 epartement de math´ematiques et de g´enie industriel, ´Ecole Polytechnique, Montr´eal, Canada;alain.hertz@gerad.ca

2Haute ´ecole de gestion de Gen`eve, ´Economie d’Entreprise, Gen`eve, Switzerland;

sacha.varone@hesge.ch

c EDP Sciences, ROADEF, SMAI 2007

Article published by EDP Sciences and available at http://www.rairo-ro.org or http://dx.doi.org/10.1051/ro:2007028

(2)

⎜⎜

⎜⎜

0 12 20 22 4

12 0 6 8 6

20 6 0 4 14

22 8 4 0 16

4 6 14 16 0

⎟⎟

⎟⎟

A matrixM.

12 8

22

4 14

6 6

1

4

4 2

3

5 16 20

Its associated complete graphKM.

4

1 3 5 6

4 1

2

3

5

A realization ofM as a tree.

Figure 1. A tree realization of a tree metric.

It is well known that a tree metricM = (mij) can be represented by an unrooted treeT such that{1, . . . , n}is a subset of the vertex set ofT, and the length of the unique chain connecting two verticesiandj inT (1≤i < j≤n) is equal tomij. LetG= (V, E, d) be the graph with vertex setV, edge setE, and wheredis a function assigning a positive lengthdij to each edge (i, j) of G. The length of the shortest chain between two verticesiandj inGis denoted dGij.

Definition 0.1. LetM be a symmetricn×nmatrix with zero diagonal and such that 0≤mij ≤mik+mkj for all i, j, k in {1, . . . , n}. A graphG= (V, E, d) is a realization ofM = (mij) if and only if{1, . . . , n}is a subset ofV, anddGij=mij

for alli, j in{1, . . . , n}.

As mentioned above, tree metrics have a realization as a tree. A realization Gof a matrix M is saidoptimal if the total length of the edges inGis minimal among all realizations ofM. Hakimi and Yau [7] have proved that tree metrics have a unique realization as a tree, and this realization is optimal. Culberson and Rudnicki [4] have designed anO(n2) time algorithm for constructing a realization as a tree of tree metrics.

We propose to extend the above definition to matrices whose entries do not necessarily satisfy the triangle inequality. Given a symmetricn×n matrixM = (mij) with zero diagonal and positive entries, letKM denote the complete graph onnvertices in which each edge (i, j) has lengthmij.

Definition 0.2. Let M be a symmetric n×n matrix with zero diagonal and positive entries. A graphG= (V, E, d) is a realization of M = (mij) if and only if{1, . . . , n}is a subset ofV, and dGij =dKijM for alli, j in{1, . . . , n}.

Obviously, ifM satisfies the triangle inequality, thendKijM =mij, and Defini- tion 0.2 is then equivalent to Definition 0.1. Figure 1 illustrates this new definition.

Notice that the matrix in Figure 1 is not a tree metric, while it has a realization as a tree.

Let Mn denote the set of symmetric n×n matrices M = (mij) with zero diagonal, positive entries, and such thatmij+mkl≤max{mik+mjl, mil+mjk} for alldistinctpointsi, j, k, l in{1, . . . , n}.

(3)

⎜⎜

0 1 3 1

1 0 1 3

3 1 0 4

1 3 4 0

⎟⎟

⎠ A 4×4 matrixM

that does not belong toM4.

3

2

4 3

1

4 1

1 1

3

Its associated complete graph

KM.

3

1 2

1

4

1 1

A realization of M as a tree.

Figure 2. A tree realization of a matrix that does not belong toMn. Since we only impose the 4-point condition ondistinctpointsi, j, k, l, the entries of a matrix inMn do not necessarily satisfy the triangle inequality. While all tree metrics belong to Mn, the example in Figure 2 shows that a matrix having a realization as a tree does not necessarily belong toMn. However, we prove in this paper that all matrices inMn have a unique realization as a tree, and that this realization is optimal.

1. The main result

Let M = (mij) be any matrix in Mn, and consider the matrixM = (mij) obtained from M by setting mij equal to the length dKijM of the shortest chain between i and j in KM. Notice that the elements in M satisfy the triangle inequality. In order to prove that M has a realization as a tree, it is sufficient to prove that M is a tree metric. The proof is based on Floyd’s O(n3) time algorithm [6] for the computation ofM.

Floyd’s algorithm[6]

SetM0 equal toM; Forr:= 1 tondo

For alliandj in {1, . . . , n}do

Setmrij equal tomin{mr−1ij , mr−1ir +mr−1rj }; SetM equal toMn.

We shall prove that each matrixMr(1≤r≤n) is inMn. Since the entries of M=Mn satisfy the triangle inequality, we will be able to conclude thatM is a tree metric.

Theorem 1.1. Let M = (mij) be a matrix in Mn, and let M = (mij) be the n×nmatrix obtained from M by settingmij =dKijM for all iandj in{1, . . . , n}. Then M is a tree metric.

Proof. Following Floyd’s algorithm, define M0 = M and let Mr be the matrix obtained fromMr−1 by setting mrij =min{mr−1ij , mr−1ir +mr−1rj } for all iand j

(4)

in {1, . . . , n}. Given four distinct points i, j, k, l in {1, . . . , n}, we denotesrijkl = mrij +mrkl. We prove by induction that eachMr (r = 1, . . . , n) is in Mn. By hypothesis,M0= M is in Mn, so assume Mr−1 ∈ Mn. It is sufficient to show thatsrijkl ≤max{srikjl, sriljk} for all distincti, j, k, lin {1, . . . , n}, or equivalently, that two of the three sums srijkl, srikjl and sriljk are equal and not less than the third.

Notice thatmrri=mr−1ri andmrij ≤mr−1ij for all 1≤i≤j ≤n. Consider any four distinct points i, j, k and l. Sincer is possibly one of these four points, we divide the proof into two cases.

Case A: r∈ {i, j, k, l}, sayr=l.

SinceMr−1∈ Mn, we may assume, without loss of generality (wlog) that sr−1rijk sr−1rjik = sr−1rkij. If mrik = mr−1ik and mrij = mr−1ij , then srrijk srrjik =srrkij and we are done. So, we can assume wlogmrik < mr−1ik . It then follows that mr−1ri +sr−1rjik = mr−1ri +sr−1rkij < mr−1ik +mr−1ij , which means that mrij = mr−1ri +mr−1rj < mr−1ij . We therefore have srrijk mr−1ri +mr−1rj +mr−1rk =srrjik=srrkij.

Case B: r /∈ {i, j, k, l}.

Ifsrijkl=sr−1ijkl, srikjl=sr−1ikjl andsriljk =sr−1iljk, there is nothing to prove. So assume wlog thatmrij < mr−1ij . Notice that ifmrik =mr−1ik , mril =mr−1il , mrjk =mr−1jk and mrjl =mr−1jl , then we are done. Indeed, sinceMr−1 Mnandsrrkij < sr−1rkij, whilesrrjik=sr−1rjik andsrrijk=sr−1rijk, we know from case A that sr−1rjik = sr−1rijk. In a similar way, we also have sr−1rjil = sr−1rijl. Hence,sr−1rjik+sr−1rijl =sr−1rijk+sr−1rjil, which means thatsr−1ikjl =sr−1iljk. Since Mr−1∈ Mn, srikjl =sr−1ikjl, sriljk =sr−1iljk andsrijkl < sr−1ijkl we conclude that srijkl< srikjl=sriljk. Wlog, we can therefore assume mrik < mr−1ik .

The rest of the proof is divided into four subcases.

Case B1: mr−1jk < mr−1rj +mr−1rk andmr−1jl > mr−1rj +mr−1rl .

Since srrkjl =mr−1rk +mr−1rj +mr−1rl > srrljk, we know from case A that srrjkl = srrkjl, which means that mrkl = mr−1rk +mr−1rl . Hence, sriljk <

srijkl=srikjl.

Case B2: mr−1jk < mr−1rj +mr−1rk andmr−1jl ≤mr−1rj +mr−1rl .

We can assume mrkl = mr−1kl , else we are in case B1, where the roles of points j and k are exchanged. We can also assumemr−1il < mr−1ri +mr−1rl . Indeed, ifmr−1il ≥mr−1ri +mr−1rl thensrijkl=mr−1ri +sr−1rjkl,srikjl=mr−1ri + sr−1rkjl, and sriljk=mr−1ri +sr−1rljk and we are done since Mr−1∈ Mn.

But now, srrlik > srrkil, and we know from case A that srrikl = srrlik, which means thatmrkl=mr−1rk +mr−1rl . Hence,srrjkl> srrljk, and we know from case A thatsrrkjl=srrjkl, which means thatmrjl =mr−1rj +mr−1rl . We therefore havesriljk< srijkl=srikjl.

(5)

Case B3: mr−1jk ≥mr−1rj +mr−1rk andmr−1jl > mr−1rj +mr−1rl .

It follows from cases B1 and B2 thati, j, k and l satisfy the 4-point con- dition in Mr if mrij < mr−1ij , mrik < mr−1ik , and mr−1jk < mr−1rj +mr−1rk . By permuting the roles of points i and j as well as those of k and l, we also know that i, j, k and l satisfy the 4-point condition in Mr if mrij < mr−1ij ,mrjl < mr−1jl , andmr−1il < mr−1ri +mr−1rl . Sincemrij < mr−1ij andmrjl < mr−1jl in case B3, we can assumemr−1il ≥mr−1ri +mr−1rl . Hence, srijkl≤srikjl=sriljk.

Case B4: mr−1jk ≥mr−1rj +mr−1rk andmr−1jl ≤mr−1rj +mr−1rl .

Since Mr−1 ∈ Mn, andsr−1rijl < sr−1rlij we know that sr−1rjil =sr−1rlij, which means thatmril< mr−1il . Ifmr−1jl =mr−1rj +mr−1rl thensrijkl≤srikjl=sriljk. Else, mr−1jl < mr−1rj +mr−1rl , which implies srrkjl < srrljk. We then know from case A that srrjkl = srrljk, which means thatmrkl =mr−1rk +mr−1rl . We therefore havesrikjl< srijkl=sriljk.

Corollary 1.2. Each matrix in Mn has a unique realization as a tree, and this realization is optimal.

Proof. Let M be any matrix in Mn, and let M = (mij) be the n×n matrix obtained from M by settingmij = dKijM for all 1 i < j n. It follows from Definition 0.2 that a graph is a realization ofM if and only if it is a realization of M. We know from the above theorem thatMis a tree metric. To conclude, it is sufficient to observe that each tree metric has a unique tree realization, and this

realization is optimal.

2. A related problem

Given twon×nmetricsL= (lij) andU = (uij), thematrix sandwich problem[5]

is to find (if possible) a tree metric M = (mij) such that lij mij uij for all i, j ∈ {1, . . . , n}. Typically, the information concerning the distance matrix associated with a network may be inaccurate, and we are only given lower and upper bound matricesLandU.

We prove here below that a solution to the matrix sandwich problem can be obtained by first finding a matrixM ∈ Mn that lies betweenL andU, and then constructing the tree metric M = (mij) with mij = dKijM. Finding a matrix M ∈ Mn that lies betweenLand U is possibly easier than finding a tree metric with the same lower and upper bound matrices, the reason being that the triangle inequality is not imposed on matrices inMn.

Proposition 2.1. Let M = (mij)be a matrix in Mn, and let M= (mij)be the n×nmatrix obtained from M by settingmij =dKijM for all iandj in{1, . . . , n}.

If lij mij uij for all i, j ∈ {1, . . . , n}, then M is a solution to the matrix sandwich problem.

(6)

Proof. Let M = (mij) be a matrix in Mn, such that lij mij uij for all i, j ∈ {1, . . . , n}, and let M = (mij) be the n×n matrix obtained fromM by setting mij = dKijM for all 1 ≤i < j n. We know from Theorem 1 that M is a tree metric. Moreover, since L is a metric, we havelij ≤mij ≤mij for all

i, j∈ {1, . . . , n}.

References

[1] H.-J. Bandelt, Recognition of tree metrics.SIAM J. Algebr. Discrete Methods3(1990) 1–6.

[2] J.-P. Barth´el´emy and A. Gu´enoche, Trees and proximity representations. John Wiley &

Sons Ltd., Chichester (1991).

[3] P. Buneman, A note on metric properties of trees.J. Combin. Theory Ser. B 17(1974) 48–50.

[4] J.C. Culberson and P. Rudnicki, A fast algorithm for constructing trees from distance ma- trices. InInf. Process. Lett.30(1989) 215–220.

[5] M. Farach, S. Kannan and T. Warnow, A robust model for finding optimal evolutionary trees.Algorithmica13(1995) 155–179.

[6] R.W. Floyd, Algorithm 97.Shortest path. Comm. ACM5(1962) 345.

[7] S.L. Hakimi and S.S. Yau, Distance matrix of a graph and its realizability.Q. Appl. Math.

22(1964) 305–317.

[8] A.N. Patrinos and S.L. Hakimi, The distance matrix of a graph and its tree realization.Q.

Appl. Math.30(1972) 255–269.

[9] J.M.S. Sim˜oes-Pereira, A note on the tree realizability of a distance matrix. J. Combin.

Theory6(1969) 303–310.

[10] S.C. Varone, Trees related to realizations of distance matrices.Discrete Math.192(1998) 337–346.

To access this journal online:

www.edpsciences.org

Références

Documents relatifs

[2] Andrew Acker, Antoine Henrot, Michael Poghosyan, Henrik Shahgholian, The multi-layer free boundary problem for the p-Laplacian in convex domains, Interface.. Sabidussi

The tobacco industry is unrelenting in its attempts to draw in new customers, grow its profits and undermine tobacco control efforts.. It monitors our activities and efforts so that

Bound-bound transitions (line transitions) between the lower energy level i and the upper energy level j may occur as radiative excitation, spon- taneous radiative

First introduced by Faddeev and Kashaev [7, 9], the quantum dilogarithm G b (x) and its variants S b (x) and g b (x) play a crucial role in the study of positive representations

They showed that the problem is NP -complete in the strong sense even if each product appears in at most three shops and each shop sells exactly three products, as well as in the

That is what happens in quasi- belief, according to Sperber: the representation which is embedded in a validating meta- representation ('Lacan says that...' or 'The teacher

We use the framework and results developed by Meyer in [7] to establish for general irreducible Markov processes some properties of quasi-stationary distri- butions well known in

All the rings considered in this paper are finite, have an identity, subrings contain the identity and ring homomorphism carry identity to identity... Corbas, for