Godsil MC Kay Cospectral
Godsil MC Kay Cospectral
Godsil MC Kay Cospectral
20/0
University of Waterloo © 1982Birkh~iuser Verlag, Basel
Abstract. Some new constructions for families of cospectral graphs are derived, and some old ones are
considerably generalized. One of our new constructions is sufficiently powerful to produce an estimated
72% of the 51039 graphs on 9 vertices which do not have unique spectrum. In fact, the number of graphs
of order n without unique spectrum is believed to be at least an~g,_l for some a >0, where g, is the
number of graphs of order n and n >- 7.
I. Introduction
257
258 C, D. GODSIL AND B, D. MCKAY AEO. MATH.
look for constructions for pairs of cospectral graphs. In this paper we present some
new and powerful constructions for pairs of cospectral graphs and considerably
generalize some old ones. One of our new methods is sufficiently powerful to
generate an estimated 72% of the 51039 graphs on 9 vertices which are not
characterized by their spectra.
V(R)-- V(G),
and
E ( n ) = { x y E E ( G ) [ x , y E S or x, y f ~ S } U ( x y ~ E ( G ) [ x E S and y E S } .
For our purposes the most important property of our construction is provided
by the next theorem.
Proo[. The most direct way of showing that two graphs are cospectral is to show
that their adjacency matrices are similar. We now proceed to do this.
For any positive integer m, define O m = 2J~,/m - Ira. T h e following claims can
be verified easily.
Vol. 25, 1982 Constructingcospectralgraphs 259
(a) OZ = / ~ .
(b) If X is an m x n matrix with constant row sums and constant column sums,
then QmXQ~=X.
(c) If x is a vector with 2m entries, m of which are zero and m of which are
one, then Q2wr = af~ - x.
If the vertices of G are labelled in an order consistent with ~, the adjacency
matrix of G has the form
• Dj
I CCI T12 Clz
C2 "'" '' Clk ~Dkl
C2k D2
G =
cT, cX ..- Ck
DT DT
2 "" • DI
The required properties of 7r ensure that each C, and each C,j has constant row
sums and constant column sums, and that each column of each 19,
has either 0, n,/2
or n, ones. Therefore QGO
is the adjacency matrix G ~ , where O is the
block-diagonal matrix diag(On,, O,~. . . . . O,k, Itol).
Since O 2 = L this proves G and
G ~*) to be cospectral. G and G °° have cospectral complements by the same
argument, since (t~) °° is the complement of G ~ . []
Figure 1
If H has 2m vertices and a trivial automorphism group, it is easy to show that all
of the (2~) possibilities for G are nonisomorphic. Hence, for example, if we choose
H to be a cubic graph on 12 vertices with no nontrivial automorphisms we can
COnstruct (~)/2 = 462 pairs of cospectral nonisomorphic graphs on 13 vertices.
(b) Let G be regular with degree k and let S be a subset of V(G) such that the
graph H obtained from G by switching about S is also regular with degree k. Then
260 C.D. GODSIL AND B. D. MCKAY AEQ. MATH.
a b c d
. ) ( . )
Figure 2
Figure 3
n N~ c. I. t,/c~
5 -- 0.059 0 0.00
6 -- 0.064 0 0.00
7 50000 0.105 0.037-+0.003 0,35
8 50000 0.139 0.084-+0.004 0.60
9 50000 0.186 0.135-+0.003 0.73
10 30000 0.164-+0.008
11 20000 0.165+0.008
12 10000 0.145-+0.011
13 100120 0.127_+0.010
14 6000 0.095 -+0.010
15 5000 0.074 -+0.008
16 3000 0.042 -+0.009
It is seen that for n <-9 the ratio l~/c, is steadily increasing and p r o b a b l y
exceeds 70% for n = 9. It is interesting to note that lim i n f ~ In/cn > 0 would imply
c~ ~ 0, since 1, --* 0. H o w e v e r , we feel that our data provide only a small a m o u n t of
evidence that c, ~ 0, and that the behaviour of cn for small n may not be typical.
2.5. In the special case where zr = (C1, D ) and there are no edges within Cl, the
construction a b o v e can be considerably generalized. W e will call two rn x n
matrices A and B congruent if A T A = B T B . If we view the columns of A and B as
points in ~ " then it is clear that A and B are congruent if and only if the
corresponding sets of points in ~R" are c o n g r u e n t in the geometric sense, i.e., there
is an m × m o r t h o g o n a l matrix which m a p s the columns of A o n t o the correspond-
ing columns of B.
(°T HA)
262 C.D. GODSIL AND B. D, MCKAY AEQ. MATH
3. Tensor products
3.1. In this section we describe a very general procedure which uses the matrix
tensor product to construct families of cospectral graphs. Although many special
cases of this construction have appeared before, the general case is new.
All the matrices in this section are real, but otherwise not restricted. The
necessary conditions for the matrices so constructed to be adjacency matrices of
graphs will be obvious in every case.
The tensor (direct) product of matrices A and B will be denoted by A ~) B. For
the most elementary properties of this operation we refer the reader to [11] or [7].
where A II) has order n~ x n~ and A I2) has order n2 x n2, for 1-< i -< k. The next
Iemma is just an elementary property of the tensor product.
for any monomial f and j E {1,2}. Then T(A ) and T( B ) are cospectral. []
The cases where A ? ) E { L G i , Gj} for 1-<]---2 and l<-i<-k have been
investigated in depth by Cvetkovi6 and others ([3], [5]). In this connection, we note
that, although we are using tensor products of only two factors, the class of graphs
constructed is not thereby reduced, since the case of more than two factors can be
obtained by repeated application.
A simple family of applications of Theorem 3.4 can be obtained with the help of
the following lemma.
Proof. The first claim is obvious, while the second follows from Lemma 2.1 of
McKay [12]. []
P = EGG +E*QH+C~@O+G@Q r,
and
P*= E*@G + E @H +C~@O + C T ( ~ Q ~.
Then
4~(P)@(H) ...... = ~ ( P * ) 4 , ( G ) .... •
0-
0 0
0 0
P p-
Figure 4
266 C.D. GODSIL AND B. D. MCKAY AEQ. MATH.
In [9] it is shown that the smallest pair of cospectral graphs, the smallest pair of
cospectral forests and the smallest pair of cospectral connected graphs can each be
obtained using the partitioned tensor product.
Of course, there is no guarantee that P and P* are nonisomorphic in general,
although some sutficient conditions are known (see [9]). A special case of Theorem
3.9 has been rediscovered by Schwenk, Herndon and Ellzey [16].
4. Cespectrai points
4.1. If G is a rooted graph with root v, then Go denotes the graph formed by
deleting v from G. Given two rooted graphs G and H with roots v and w,
respectively, we can define the following composite graphs:
(i) G " H is formed from G and H by identifying v and w.
(ii) G ~ H is formed from disjoint copies of G and H by adding one edge
joining v and w.
(iii) G --- H is formed from disjoint copies of Go and Hw by joining every vertex
in G, which is adjacent to v in G to every vertex in Hw which is adjacent to w in H,
Examples are given in Figure 5.
The spectrum of G . H was first determined by Schwenk [14]. That of G ~ H is
just a special case. The spectrum of G -- H has not been previously determined.
OoH-
O-H-
OBH°~ ~ 7
Figure 5
Vol. 25, 1 9 8 2 Constructingcospectral
graphs 267
4.2. THEOREM.
(i) 4~(G" H ) = ~b(G)ga(H+)+ c k ( G ~ ) 6 ( H ) - x 4 ~ ( G o ) ~ ( H + ) ;
(ii) 4,(G ~ H ) = ¢ b ( G ) ( a ( H ) - 6(Go)~b(H+);
(iii) 4,(G =- H ) = ¢b( Go )~b(H+ ) - (xcb(G~ ) - ¢b(G))(x~b(H+ ) - ok(H)).
Proof. For part (i), and thus (ii), see [14] or [4]. To prove part (iii) we need some
additional notation. Let M and N be square matrices of order m and n,
respectively. Let a and b be (column) vectors of length m and n, respectively. The
notation M I,, represents the matrix (o ,~). The two claims following can be proved
by applying elementary row and column operations. For any a,
4~ M 0 =d~(M)4~(glb)+cb(N)cb(Mla)-xck(M)cb(N). (2)
0 N
( H w -O h h T ) + kkT]
4.4. C O R O L L A R Y . For i = 1,2, let G °> and H ¢'~be rooted graphs with roots v <'~
and w ~'~, respectively. Suppose that ~b(G~°), ~b(G~?,,), 4~(H ~°) and ~b(H~,>) are
independent of i. Then 4~(G °~. H°~), ~,(G <')H H ~'~) and ¢b(G ~'~=--H ~')) are indepen-
dent of i. []
The case ~b(G °~. H °~) was used by Schwenk [14] to prove that almost no tree is
uniquely identified by its spectrum. Stronger results of similar form appeared in [10]
and especially in [12]. A generalization (for the " . " operation) to graphs rooted at
more than one point has been given by Schwenk [15]. Construction 2.1 can also be
described in this manner.
268 C. D. GODSILAND B. D. MCKAY AEQ. MATH.
REFERENCES
[1 ] BABA1,L., Almost all Steiner triple systems are asymmetric. Ann. Discrete Math. 7 (1980), 37-39.
[2] BUSSEMAKER,F. C., COBELJIC, S., CVETKOVI~,D. M. and SEIDEL, J. J., Computer investigation o/
cubic graphs. Technishe Hogeschool Eindhoven, Report 76-WSK-01 (1976).
[3] CVETKOVI~,D. M., The generating function for variations with restrictions and paths of the graph and
self-complementary graphs. Univ. Beograd Publ. Elektrotehn. Fak., Ser. Mat. Fiz 320-328 (1970),
27-34.
[4] CVETKOV|C,D. M., DOOB, M. and SACHS,H., Spectra of graphs. Academic Press, New York, 1980.
[5] CVETKOVt(',D. M. and LuC~(:, R. P., A new generalization of the concept of the p-sum of graphs.
Univ. Beograd Publ. Elektotehn. Fak., Ser. Mat. Fiz. 302-319 (1970), 67-71.
[6] DAVIDSON,R. A., Genesis and synthesis of cospectral and paracospectral graphs revelation of latest
symmetries. Preprint, 1980.
[7] GANTMAKHER,F. R., Theory of matrices. Vols. 1, 2. Chelsea, New York, 1960.
[8] GODSIL,C. D., Neighbourhoods of transitive graphs and GRRs. J. Comb. Theory, Ser. B 29 (1980),
116-140.
[9] GODSlL,C. D. and McKAv, B. D., Products of graphs and their spectra. Combinatorial Mathematics
IV, Lecture Notes in Math. 560, Springer-Verlag (1976), 61-72.
[10] GODSIL, C. D. and MCKAY, B. D., Some computational results on the spectra of graphs.
Combinatorial Mathematics IV, Lecture Notes in Math. 560, Springer-Vedag (1976), 73-92.
Ill] LANCASTER,P., Theory of matrices. Academic Press, New York, 1969.
[12] McKAY, B. D., On the spectral characterisation of trees. Ars Combin. 3 (1977), 219-232.
[13] SEIDEL, J. J., Graphs and two-graphs. In Proc. Fifth Southeastern Conference on Combinatorics,
Graph Theory and Computing (Boca Raton, FL., t974), Congressus Numerantium X, Utilitas
Math., Winnipeg, Man., I974, pp. 125-143.
[14] SCHWENK,A. J., Almost all trees are cospectral. In New Directions in the Theory of Graphs (Proc.
Third Ann Arbor Conf., Univ. Michigan, Ann Arbor, Michigan, 1971), Academic Press, New
York, 1973, pp. 275-307.
[15] SCHWENK, A. J., Removal-cospectral sets of vertices in a graph. In Proc. Tenth Southeastern
Conference on Combinatorics, Graph Theory and Computing (Boca Raton, FL., 1979), Congressus
Numerantium XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979, pp. 849-860.
[16] SCHWENK, A. J., HERNDON, W. C. and ELLZEY, M. L., The construction of cospectral composite
graphs. In Proc. Second Intern. Conf. on Combinatorial Math. (New York, 1978), Ann. N. Y. Acad.
Science 319 (1979), 490-496.