Some minor stylistical changes against the published paper

Transformations of distances into adjacencies

MILAN KUNZ

Jurkovičova 13, 63800 Brno, The Czech Republic

(Received 14 July 1996)

The code matrices C of trees generate their distance matrices D, and they transform the incidence matrices of the complete graph K into the path matrix W with n(n-1)/2 rows. Adjacency matrices A and distance matrices D of all graphs are related by the transformation of distance moments (dij)k as aij = lim(k->∞) (dij)k. The effect of change moments k in d on eigenvalues of intermediate matrices is studied on examples of the linear chain L , the cycle C and the cube. The distance moments can be changed by different configurations of molecular graphs, too.

Key words: Adjacency matrix A, distance matrix D, code matrix C, incidence matrix S, walk matrix W, eigenvalues.

INTRODUCTION

Distance matrices D, where the element dij is the number of arcs between vertices i and j, were used in graph theory to characterize graphs1. Rutherford2 has found that at trees the distance matrix is a part of the left inverse of the incidence matrix ST. This was interpreted as the orthogonality of (n -1) arcs of the trees3,4.

An acyclic oriented graph is characterized in the space of vertices by its code (coordinate) matrix5C. The elements of C are c11 = 1, for the root vertex, cij = 1, if the vertex j is on the path i to the vertex i, cij = 0 otherwise. The inverse matrix C-1 is equal to the incidence matrix S (s = -1, if the arc i goes out the vertex j, s = 1, if the arc i goes into the vertex j, s = 0 otherwise) rooted by the element s11 = 1.

There appears the question, how to interpret this relation, since the graph algebra rows with a single element sij = 1 are used sometimes (inconsistently) in the graph algebra for marking loops. In the vector algebra, a row (column) vector is an arc going from the origin of the coordinate system (zero vector, not given explicitly) to the point with coordinates determined by the row. Thus, either we got the matrix with its first column deleted, since we delete the zero row from the code matrix, or we remove the singularity of the mx(m-1) code matrix with the zero row by adding the unit column J. This transform the matix S into mxm matrix, removes its singularity, but shifts the structure into the higher dimension. The element s11 = 1 in C-1matrix is then just the rooting arc-vector going from the additional vertex 0 to the vertex 1. The other rows are vectors parallel (isomorphic with) with corresponding arcs. An oriented loop leaves, according to the definition of an arc, an empty row.

If a tree is unoriented, then its incidence matrix G (gij = 1 if the arc i goes out or into the vertex j) rooted by the element g11 = 1, determines its code (coordinate) matrix C as its inverse. Some unit elements of C get negative signs in this case6. The rows of the matrix G are vectors orthogonal to corresponding edges.

The coordinate matrix C and the rooted matrix yield a complementary description, static and dynamic, of acyclic graphs. The relations are more complicated for cyclic graphs. Their topological coordinate matrices has not been defined.

Since all graphs are isomorphic, regardless their embeddings, it is possible to change their configurations. The code matrix C determines the standard topological configuration of a tree, other configurations are geometric ones. The distances between vertices can be extracted7 from the coordinate matrix C by framing its quadratic form CCTwith the incidence matrix of the complete graph (see later).

Geometric distance matrices were introduced by many authors8-15. These distance matrices are not comparable with the topological distance matrices, since they are using the first moments of geometric distances (Euclidean). The topological distance matrices use squared distances16 (Hilbert). Such distance matrices keep angles between arcs in differences SDST.

Another matrix defining a graph is the adjacency matrix A, which has identical unit elements as the distance matrix and zero elements on places where dij are greater than 1, and on the diagonal. It means16 that for i ≠ j

aij = lim(k->∞) (dij)-k

Shorter distances than 1 would lead to greater adjacencies, but the relation between the length of chemical bonds and their multiplicity is far from the above limit value7.

Schultz17,18 tried to combine both kinds of matrices as their sum D + A and to exploit their eigenvalues as topologicalal indices. It was found that the Schultz index is highly intercorrelated with the Wiener index for some classes of graphs, as at trees and cycles19-21.

It is possible to formulate sets of generalized distance matrices D(k) where k is the k-th power of the topological distance (dij)k. Then the adjacency matrix A appears as the generalized topological distance matrix D(- ∞), where in the brackets is the infinite inverse power of the distances. Inverse power distance matrices were first introduced by Balaban22. The matrix JTnJn- I where Jnis the unit column and JTn itstranspose, and where I is the unit diagonal matrix) corresponds to the distance matrix D(0). Note that D(0) is just the distance matrix of the complete graph Kn. Some from these generalized distance matrices D(k) may coincide with distance matrices of certain geometric conformations of the respective molecule.

To overcome the problem of the negative moments of the diagonal elements of distance matrices D, dii = 0, it is necessary to work with the matrix [D+I] and subtract I from the [D+I](k).

The changes of eigenvalues and eigenvectors between adjacency matrices A and matrices D are then continuous transformations produced by powers of given distances and/or changes of geometric conformations.

We will first show some relations of some graph matrices, and then work out a few examples, where changes of distance elements can be induced by aplication of different moments and/or different conformations.

FORMAL TRANSFORMATIONS OF GRAPH MATRICES

From the definition of inverses, we have the relation of quadratic forms of the rooted incidence matrix Sr and code matrix C:

Sr CCTSTr= In

The relation between distances of n vertices in a graph and their coordinates is given by the formal algorithm7, which generates the distance matrix from the coordinate matrix C in two steps:

1. The quadratic form CCTof the code matrix C is framed with the incidence matrix Sk of the complete graph K:

SkCCTST

The differences of diagonal elements of CCT(Hilbert distances of the given points from the center of coordinates) appear on the diagonal Δ(d) of the product as n(n-1)/2 distances dij between vertices. They are obtained as simple counts, but from the properties of code matrices they are square Euclidean distances in n dimensional cubes.

2. The matrix Δ (d) is transformed into the n x n matrix [Q-D], where Q is the diagonal matrix of distances sums, qij =   Sjdij, by the second framing: STkΔ(d)Sk.

This operation is identical with formation of the Laplace-Kirchhoff matrix L as the quadratic form of the incidence matrix S: L = STS. The arcs missing in the incidence matrix of a graph are deleted from Sk by the diagonal matrix Δ(a) of adjacencies. This Δ(a) is just the inverse moment product of corresponding topological distances.

Moreover, the code matrix C transforms the incidence matrix Sk of the complete oriented graph K, into the path6 matrix W with n(n-1)/2 rows and (n-1) columns, which characterizes all pathes in the space of arcs. Matrices W are defined for trees as

WTWSST= nIn- 1. The quadratic form WTW is the n- multiple of inverse SST. The rows of W represent paths between vertices of the respective tree. The columns correspond to arcs. Recall that the element wij = 1 if the arc j is incident with the path i and has the same orientation, wij = -1, if the arc j is incident with the path i and has the opposite orientation, wij = 0 otherwise. For unoriented trees were found walk matrices to obey the relation WTWGGT= nIn- 1.

As an example of this transformation we present matrix CTof the 2-methylbutane rooted in position 2:

STk

-1

-1

0

-1

0

0

-1

0

0

0

1

0

-1

0

-1

0

0

-1

0

0

0

1

1

0

0

-1

0

0

-1

0

0

0

0

1

1

1

0

0

0

-1

0

0

0

0

0

0

1

1

1

1

CT

0

1

0

0

0

0

1

1

0

0

0

1

CTSTk= WT

0

0

0

0

0

0

0

0

0

0

1

0

-1

0

-1

0

0

-1

0

0

0

1

1

0

0

-1

0

0

-1

0

0

0

0

1

1

1

1

1

1

0

0

0

0

0

0

0

1

1

1

1

The first row of CTis deleted in the product WTby all columns of ST. This decreases the dimension of the obtained matrix WTfrom n (number of vertices) to (n-1) (number of arcs). In other rows of WT, the arc is deleted, similar to the first row, provided that two corresponding unit elements in CTexist for its ends. Then the arc connects then starting and/or ending vertices of different paths from the root. If only one end matches, then the sign at the unit element in WTis either negative (if the arc i has the opposite orientation to the path j) or positive (if the arc i has an identical orientation as the path j). The elements of the path matrix WTregister, how many times the arc i was used in all pathes between all pairs of vertices of the tree.

TRANSFORMATIONS OF EIGENVALUES

As an the first example we use linear chains (path graph) L5. It was shown that distance matrices D of all linear chains in the form of stiff rods have only three nonzero eigenvalues16. The coordinate matrix C of this conformation of L5 corresponds to this (or equivalent) position of the vertices

(1/2)x

0

0

0

0

1

1

1

1

2

2

2

2

3

3

3

3

4

4

4

4

Squared Euclidean distances appear in the corresponding distance matrix. For obtaining proper distances, we must either change moments of all elements of D, or the conformation of the chain. All angles between arcs are 1800.

Coordinate matrix C corresponding to the distance matrix D with topological distances is following (the rooting column J has been omitted):

0

0

0

0

1

0

0

0

1

1

0

0

1

1

1

0

1

1

1

1

The linear chain is winded consecutively onto the edges of the unit cube. The proper distances are, in fact, squared Euclidean (Hilbert) distances. All angles between arcs are 900.

The third basic conformation of the linear chain L5 is obtained by winding it onto the unit cube through diagonals of its 2-dimensional sides, or by finding a path in the topological conformation of the complete graph. (Our imagination ends here, unfortunately, with the regular tetrahedron.) The corresponding code matrix C (normalized for the unit distances) is:

21/2 x

1

0

0

0

0

0

1

0

0

0

0

0

1

0

0

0

0

0

1

0

 

0

0

0

0

1

All distances between vertices of the linear chain in this conformation are equal. It is equivalent as the zero-th moments of all distances have been inserted into D(k). All angles between consecutive arcs are 600, otherwise 900. This folding of a chain can be checked on three arcs on the tetrahedron.

The adjacency matrix A of the linear chain L5 corresponds to the lowest negative moments of distances between vertices, because A = D(-∞).

It is well known, that the eigenvalues of the adjacency matrix A of the linear chain Ln are expressed in terms of cosines. They are symmetric, therefore their sum is zero. The eigenvalues of the adjacency matrix A, and simultaneously the distance matrix D of the complete graph, are assymmetric, one eigenvalue is (n- 1), n-1 other ones are -1. In Table I, eigenvalues of different power distance matrices of L5 are tabulated. This chain is long enough to show the main properties of such a system, where second power geometric distance matrices of straight line chains have always only 3 nonzero eigenvalues.

Table 1

Eigenvalues of linear chain L5 distance matrices D(k) with different moments and/or conformations

Eigenvalue

1

2

3

4

5

k

-  

1.7321

1

0

-1

-1.7321

-2

2.1109

0.7376

- 0.3024

-1.0501

-1.4960

-1

2.6166

0.3036

- 0.5607

-1.0536

-1.3056

-1/2

3.1292

-0.1686

- 0.7526

-1.0387

-1.1649

0

4

-1

-1

- 1

-1

1/2

5.5279

-0.7959

- 0.9187

-1.3178

-2.4955

*

7.1403

-0.7278

- 0.7604

-1.4215

-4.2304

1

8.2882

-0.5578

- 0.7639

-1.7304

-5.2361

**

16.3971

-0.0020

- 0.5358

-2.1513

-13.7080

2

23.0384

0

0

-3.0384

-20

3

77.1665

2.2099

0.5776

-5.7441

- 74.2099

* The eigevalues of the geometric distance matrix of the n-pentane in the optimal conformation . They were normalized to the unit length of C-C bond dividing by the factor 1.54.

** The eigevalues of the Hilbert distance matrix of the n-pentane in the linear conformation13. The distances were normalized to the unit length of C-C bond dividing by the factor 1.53.

All diagonal elements of distance matrices are zero, therefore the sums of eigevalues must be zero, too. It is already well known, that eigenvalues of adjacency matrices of linear chains are 2cos(k2π/n). They form the lowest limit to distance matrices with negative moments k. The highest eigevalue is continuously growing with k. The other pole of eigenvalues is given by k = 0, when all negative eigenvalues are -1. For the nonnegative eigenvalues of A, it is the minimum, for the lowest eigenvalue the maximum. The third pole forms at k = 2, where always only three nonzero eigenvalues exist. Therefore, the fuctional relation λk = f(k) has three distinct regions, the parameters of which could be found by linear regressions.

Topological distance matrices, where the number of arcs in a path determines the distance between vertices, which are simultaneously the first moments of the geometric distance matrices of straight rods. The number of nonzero eigenvalues of topological distance matrices corresponds to the symmetry of embedding of the linear chain in the n dimensional space. The singularity at k = 2 wherer all linear chains always only three nonzero eigenvalues is given by the symmetry of the stiff rod.

The three nonzero eigenvalues can be identified with symmetry elements. The largest positive eigenvalue corresponds to the identity E (all elements of the eigenvector are positive). The lowest eigenvalue corresponds to the rotation axis C2 (the elements of the eigenvector go regularly from -1 to 1). Its value is the sum of topological distances dij and coincides with the Wiener index W. The third nonzero eigenvalue is produced by the reflexion plane (elements of the eigenvector are symmetrical with the respect to the center of the chain)

a = [ S dij4 - 3/4W2] - W/2.

The eigenvectors at any power k are symmetric according to the center, except eigenvectors of zero at k = 2, and degenerate -1 eigenvectors at k = 0, which are assymmetric.The symmetry can be reflective (vj = vn-j, noted as  σ) or rotational (vj = -vn- j, noted as C). These symmetries alternate at positive and negative powers k, see Table II

Table II Symmetries of distance eigenvectors

Eigenvector

1

2

3

4

5

k negative

 σ

C

 σ

C

 σ 

k positive

 C

 σ

C

 σ

C

The positive unnormalized eigenvector is the deformed unit column (row) vector. At adjacency matrices A, the values corresponding to the unit vector are decreased on both ends. At positive distance moments k, they decrease in the center.

The eigenvalues of the geometric distance matrix of n-pentane, introduced by Trinajstic and others, fit between moments 1/2 and 1, with one exception. The eigenvalues of Hilbert distance matrix of the linear conformation of n-pentane fit excelently between moments 1 and 2. This corresponds to the increasing of the distances by stretching the molecule from the topological conformation to the geometric one. One eigenvalue nearly vanishas due to the planarity of the conformation.

SPECIAL CASES: CYCLE C4

Another case is the cycle C4, which can be bent from the plane square shape to the regular tetrahedron shape by decreasing both diagonal distances, or till to a rod by decreasing one diagonal distance and increasing the other. Its topological distance matrix D is thus undistinguishable from the second moment geometric distance matrix of the square. The matrix JJT- I corresponds to one of possible geometric conformations, the regular tetrahedron (similar to the chain L4, but there the adjacency matrix is different). By decreasing d13 and d24 distances of the regular tetrahedron, the cycle is folded, untill positions of opposite vertices coincide.

Therefore at the cycle C4, the adjacency matrix A is simultaneously the distance matrix of this cycle, when vertices 1 and 3, 2 and 4 are identified and the cycle is folded. It is also possible to identify only a pair of vertices and fold all arcs of this cycle onto a line, if only one from the distances of 1 and 3, or 2 and 4 is zero.

The eigenvalues of the distance matrix with the elements d13 = d24 are obtained simply by adding or subtracting these elements from the eigenvalues of A:

Eigenvalues of A

2

0

0

-2

Effect of distances change

+d

-d

- d

+d


Examples: dij 0.25

1.75

-0.25

-0.25

-1.75

1

3

-1

-1

-1

1.414

3.414

-1.414

-1.414

-0.586

2

4

- 2

- 2

0

8

10

-8

-8

6

This scheme leads to the change of ordering of eigenvalues, at positive k the second eigenvalue is obtained as the fourth one. The distance 8 is geometrically impossible, it must be therefore the sixth moment of 21/2. All distance matrices of C4 have the same set of eigenvectors, corresponding to the matrix of the Vierergruppe:

1

1

1

1

1

1

-1

-1

1

-1

-1

1

1

-1

1

-1

If we fold C4 as the rhomb, we get two different diagonals. Their squares appear again as eigenvalues, but in a complicated pattern, as in the following examples:

Distances

Eigenvalues

dij

dij

1

2

3

4

3

1

2+51/2

-3

-1

2-51/2

4

0

2+81/2

-4

0

2-8

1

0

(1+171/2)/2

-1

0

(1-17 1/2)/2

The second case is the extreme, all vertices lie on a straight line. The third case represents two double bonds bended to 600, or the adjacency matrix of the graph (K4 - L2), or the distance matrix of one of its conformations with identified positions of two vertices. The eigenvectors are deformed, too, going to lover values and to higher ones again (in the third case it is 0.7808, respectively) and having zero values, which are possible for other conformations or moments, too:

0.6180 (0.4142)

1

0.6180 (0.4142)

1

0

1

0

-1

1

0

-1

0

1

- 0.6180 (0.4142)

1

- 0.6180 (0.4142)

There exists the third possible deformation, corresponding to changes of two distances, the square transforms into a rectangle, which is a model of the formation of the cycle from two chains L2. Here the zero distances give a permuted adjacency matrix, the second conformation is a permuted square and other changes are expressed as

Distances d2

Eigenvalues

0

2

0

-2

0

1

4

0

-2

-2

4

10

0

-2

-8

8

18

0

-2

-16

All eigenvectors remain the same as for C4. It can be conjectured that the distance matrix D of the graph consisting of two components L2 entirely separated has two infinite eigenvalues, the other two are 0 and -2. This follows from its eigenvectors which remain identical without regard on distances of both components. The eigenvalues are again determined by symmetry elements. Nonzero eigenvalues are three for the square and two at the configuralation corresponding to L2.

SPECIAL CASES: TWO CYCLE C (A CUBE)

Here we study the formation of the cube from two cycles C4. The adjacency matrix A of two cycles C4 can be written similarly as for two chains L2 in the block form as

C

0

0

C

The adjacency matrix of the cube is

C

I

I

C

The distance matrix D of two squares has the form

D

D+dJJT

D+dJJT

D

Only the half of eight eigenvalues is tabulated in Table III. The other four eigenvalues are either zero, or, in the case of matrices A, they have inverse signs.

Table 3

Eigenvalues of two unit squares in distance d2

 

Eigenvalues

Distance d

1

2

3

4

A(C4)

2.618

1.618

0.618

0.382

A[2C4 ]

2

2

0

0

0

8

0

-4

-4

1

12

-4

-4

-4

4

24

-16

-4

- 4

8

40

-32

-4

-4

Eigenvalues of two squares in zero distance between them are just twice eigenvalues of one square. The distance in the third direction adds four times to the first eigenvalue and subtracts four times from the second one.

There seems to exist a pattern, how spectra of lattice graphs are formed. The spectrum of the square lattice formed by 3 L3 is 25.4164, -12, -1.4164, -12, whereas 3 identified L3 have spectrum 13.3485, -1.3485, 12. This are 3x(4.4495, -0.4495, -4), the eigenvalues of D[L4].

Generalizing distance matrices D(k) to adjacency matrices is ambiguous at topological distance matrices of graphs which are embedded differently from their standard configuration. For example, on a cube many different graphs can be embedded, which adjacency matrices are subgraphs of the cube.

DISCUSSION

Some things appear to be obvious and trivial. Graphs were considered to be dimensionless, one dimensional or at most two dimensional mathematical notions which are isomorphic with some real objects, as molecules are. Then they must be spanned into the third dimension3.

I realize only now, that I interpreted textbooks differently: Graphs are multidimensional objects which must be squeezed and deformed, if we try to imagine them. As molecules, they are embedded in a lower dimension.

Coding of trees by matrices5 is probably unknown in chemical literature. Specialists overlooked, that the rooting of incidence matrices removes the singularity of quadratic form STof cyclic graphs, too. This can be exploited for solving the Kirchhoff problem23.

Distance matrices of acyclic graphs are involved in the problem of embedding of molecules into crystalline latices2, what is still an open problem. Acyclic molecules there form higher structures with many cycles and circuits.

Changes of a conformation of a graph from the standard topological configuration to geometric configurations lead to the change of eigenvalues of the distance matrix D. It can influence the eigenvalues of the adjacency matrix, too, if we admit partial adjacencies when k in d-kij is not infinite. The relation between eigenvalues and moments is quadratic (and/or exponential, the correlation coefficients are excellent, but the number 4 of correlated points is low, to decide between both possibilities).

Pentane eigenvalues moments are 0.688-0.683 for the geometric distance matrix (the lowest and highest eigenvalue, respectively) and 1.64-1.62 for the second moment geometric distance matrix. The interpretation of these numbers is a puzzle. But the position of the geometric distance matrix is not compatible with stretched angles between bonds of n-pentane.

That the second-moment distance matrices have specific properties is not too surprising. It follows from their relations with the adjacency matrices A and the Laplace- Kirchhoff matrices STS, which, on the other hand, are quadratic forms of incidence matrices S. Eigenvalues and eigenvectors of the graph matrices seem to correspond to the elements of symmetry of graph embeddings.

The Wiener index is the sum of elements of the topological distance matrix. Its value surprisingly appeared as the lowest eigenvalue of the second moment geometric Hilbert distance matrices of straight chains. It seems reasonable to expect similar relations for other molecules as well.

The linear change of eigenvalues of the geometric Hilbert distance matrices was observed in the studied special cases, when distances were changed. This could explain why molecules prefer some configurations, especially in crystaline state. Eigenvalues and eigenvectors of adjacency matrices A correlate well with energy of bonding electrons of aromatic compounds, but eigenvalues and eigenvectors of distance matrices change with the configuration, as our examples showed.

Topological indices based on matrix elements should be not only practical, it means correlate well with physicochemical properties of chemical compounds, but should also be consistent with mathematical properties of matrices. The geometric Wiener index disappointed expectations8-15. The present study of eigenvalue transformations indicates that the second moment geometric Wiener index could perform better, at least theoretically.

Acknowledgement. Thanks the Guest Editor for his constructive comments of the first version of the paper.

REFERENCES

1. D.H.Rouvray, in: A.T.Balaban (Ed.), Chemical Applications of Graph

Theory, Academic Press, London 1975, 175

2. J.S.Rutherford, Acta Crystallogr. B46 (1990) 289

3. M.Kunz, J.Math.Chem. 9 (1992) 297

4. M.Kunz, J.Math.Chem. 13 (1993) 145

5. M.Aissen, B.Shay, in: M.F.Capobianco, M.Guan, D.F.Hsu, F.Tian (Eds.), Graph Theory and Its Applications: East and West, New York Academy of Sciences, New York 1989, 1

6. M.Kunz, Coll.Czech.Chem.Commun. 54 (1989) 2148

7. N.Bo\njak, Z.Mihalic, N.Trinajstic, J.Chromat. 540 (1991) 30

8. S.Nikolic, N.Trinajstic, Z.Mihalic, S.Carter, Chem.Phys.Letters 179 (1991) 21

9. Z.Mihalic, N.Trinajstic, J.Mol.Struct. (THEOCHEM) 78 (1991) 65

10. Z.Mihalic, S.Nikolic, N.Trinajstic, J.Chem.Inf.Comput.Sci. 32 (1992)28

11. K.Balasubramanian, Chem.Phys.Letters 169 (1990) 224

J.Math.Chem. 11 (1992) 223

13. B.Bogdanov, S.Nikolic, N.Trinajstic, J.Math.Chem. 3 (1989) 299

14. M.Randic, B.Jerman-Blazic, N.Trinajstic, Comput.Chem. 14 (1990) 237

15. M.Kunz, J.Chem.Inf.Comput.Sci. 34 (1994) 957

16. M.Kunz, Commun.Math.Chem. (MATCH) 32 (1995) 193

17. H.P.Schultz, J.Chem.Inf.Comput.Sci. 29 (1989) 227

J.Chem.Inf.Comput.Sci. 30 (1990)27

19. D.Plav\ic, S.Nikolic, N.Trinajstic, Croat.Chem Acta 66 (1993) 345

20. D.J.Klein, Z.Mihalic D.Plav\ic, N.Trinajstic, J.Chem.Inf.Comput.Sci.32(1992) 304

21. O.Ivanciuc, T.S.Balaban, A.T.Balaban, J.Math.Chem. 12 (1993) 309.