Angles between graphs

In many applications of the graph theory, especially of chemical ones, much interest has been paid to the problem of recognition of graphs - how to find if two graphs are equivalent or if they have at least a common subgraph.

Two graphs, G1 and G2 are called equivalent, if there exists a group of cyclic permutations Sn which transforms one graph into another

G1 = PTG2P (1)

P represents all unit permutation matrices of the group. At least one from them should be effective.

In this paper, we will study the problem of the spectra of graph matrices, and therefore we will need another definition of the similarity, according to the definition of the relation of two vectors by the angle at which they cross.

Essentially, there are following main possibilities, how two graphs can be related:

  1. Two graphs G1 and G2 are identical (collinear), if both their vertex and edge (arc) sets are identical.

  2. Two graphs G1 and G2 are different, if their vertex and edge sets are different. But they can still be equivalent according to the definition (1).

  3. The vertex and edge sets of two graphs G1 and G2 can have some common elements.

  4. The vertex sets of two graphs G1 and G2 are identical. In this case their edge sets can be identical, as in the case (1), or they can have only some common elements or none common elements. The graph G2 can be eventually the complement of the graph GK1 of the graph G1to the complete graph K or some of the subgraphs of GK1.

We define the angle between two graphs G1 and G2 similarly as defined for two vectors

(2)



where Tr(Mj) is the trace of the matrix characterizing the graph Gj.

To clear the definition more, we must at first discuss the convention of multiplication of matrices.

In textbooks of the linear algebra, the multiplication of matrices of different formats is forbidden. Nevertheless, it is possible to add zero columns and rows to any matrix and to change its format.

If we try to multiply two matrices, both with different zero columns and rows (corresponding to different vertices), then in the product appear zero blocs with a great probability. It means that both matrix vectors are orthogonal. Nevertheless, the operation is possible, even if has no sense.

The definition of the graph angle will be applied to the Laplace-Kirchhoff matrices STS, where ST is the transpose of the incidence matrix S of an oriented graph which rows are differences of two unit vectors (ej - ei) corresponding to the arc ij.

For example, two arcs with one common vertex form an angle with cos 1/4, 4 being the trace of (STS)2.


0

0

0

0

1

-1

0

-1

1

1

-1

0

0

-1

1

-1

1

0

0

1

-1

0

0

0

0

0

0


Using the trace criterion, the linear chains L(4), obtained from the complete graph K (4), are arranged as follows


Chain

Common arcs with 1234

TrM1M2

1234

4321

3

16

2341

1432

2

13

3214

4123

2

13

1243

3421

2

13

2134

4312

2

13

3412

2143

2

12

1324

4231

1

12

1342

2431

1

11

3124

4213

1

11

2314

4132

1

11

1423

3241

1

11

2413

3142

0

8


The first and the last chains are complementary, nevertheless, the cosine is 0.5.

If the numbering is fixed, the head and tail readings are equivalent.

There exists another possibility for evaluation of proximity of permutations, the Spearman coefficient S.

It consider the permutation as a vector and evaluates the squared Euclidean distance. This criterion gives

S

S

1234

0

0

4321

20

1

2341

12

0.6

1432

8

0.4

3214

8

0.4

4123

12

0.6

1243

2

0.1

3421

18

0.9

2134

2

0.1

4312

18

0.9

3412

16

0.8

2143

4

0.2

1324

2

0.1

4231

18

0.9

1342

6

0.3

2431

14

0.7

3124

6

0.3

4213

14

0.7

2314

6

0.3

4132

14

0.7

1423

10

0.5

3241

10

0.5

2413

10

0.5

3142

10

0.5


Here, the opposite readings are complementary, the sum of their coefficients is always 1.

Discussion

According to the proposed definition of the graph angle, two graphs are orthogonal in the space of vertices only if they have no common vertices. Such graphs must be orthogonal even in the space of arcs, because they can not have any common arcs. Two graphs with common vertices can still be orthogonal in the space of arcs, if they have no common arcs.

This orthogonality seems to have little common with the corresponding permutations of the parent graph.