Towards Unitary Representations for Graph ... - Semantic Scholar

3 downloads 0 Views 150KB Size Report
by quantum walks can be used to distinguish non-isomorphic cospectral ... steady state random walk on a graph is given by the leading eigenvector of the.
Towards Unitary Representations for Graph Matching David Emms† , Simone Severini† , Richard C. Wilson‡ , and Edwin R. Hancock‡ †

Departments of Computer Science and Mathematics, ‡ Department of Computer Science, University of York, York Y010 5DD, UK

Abstract. In this paper we explore how a spectral technique suggested by quantum walks can be used to distinguish non-isomorphic cospectral graphs. Reviewing ideas from the field of quantum computing we recall the definition of the unitary matrices inducing quantum walks. We show how the spectra of these matrices are related to the spectra of the transition matrices of classical walks. Despite this relationship the behaviour of quantum walks is vastly different from classical walks. We show how this leads us to define a new matrix whose spectrum can be used to distinguish between graphs that are otherwise indistinguishable by standard spectral methods.

1

Introduction

Random walks are useful tools in the analysis of the structure of graphs. The steady state random walk on a graph is given by the leading eigenvector of the transition probability matrix, and this in turn is related to the eigenstructure of the graph Laplacian. Hence, the study of random walks has been the focus of sustained research activity in spectral graph theory. For instance, Lov´ asz has written a useful review of the subject [1], and spectral bounds have been placed on the properties of random walks including the mixing times and hitting times [2]. From a practical perspective, there have been a number of useful applications of random walks. One of the most important of these is the analysis of routing problems in network and circuit theory. Of more recent interest is the use of ideas from random walks to define the page-rank index for internet search engines such as Googlebot [3]. In the pattern recognition community there have been several attempts to use random walks for graph matching. These include the work of Robles-Kelly and Hancock [4, 5] which has used both the standard spectral method [4] and a more sophisticated one based on ideas from graph seriation [5] to convert graphs to strings, so that string matching methods may be used. Gori, Maggini and Sarti [6] on the other hand, have used ideas borrowed from pagerank to associated a spectral index with graph nodes and have then used standard subgraph isomorphism methods for matching the resulting attributed graphs. One of the problems that limits the use of random walks, and indeed any spectral method, is that of co-spectrality. This is the situation in which strucL. Brun and M. Vento (Eds.): GbRPR 2005, LNCS 3434, pp. 153–161, 2005. c Springer-Verlag Berlin Heidelberg 2005 

154

D. Emms et al.

turally distinct graphs present the same pattern of eigenvalues. Classic examples are strongly regular graphs [7] and certain trees [8, 9]. Recently, quantum walks have been introduced as quantum counterparts of random walks [10, 11]. Their behaviour is governed by unitary rather than stochastic matrices. Quantum walks posses a number of interesting properties not exhibited by classical random walks. For instance, because the evolution of the quantum walk is unitary and therefore reversible, the walks are non-ergodic and what is more they do not have a limiting distribution. The present applications of quantum walks are fast quantum algorithms for database searching [12], graph traversal [13, 14], and the problem of element distinctness [15]. Although the analysis of quantum walks may seem detached from the practical problems listed above, they may offer a way of lifting the problems of co-spectrality. In this paper, we aim to explore how unitary matrices can be used to characterise graphs, and to study the walks they give rise to for strongly regular graphs. To convert the adjacency matrix of the graph into a unitary form we borrow ideas from quantum walks and combine the state space of the walk with a ‘coin space’ which dictates the quantum amplitudes of the various paths. Our main conclusion is that by making use of a unitary representation of the adjacency structure problems of co-spectrality can be lifted, and random walks can be used to distinguish otherwise indistinguishable graph structures.

2 2.1

Random Walks The Classical Walk

Consider the graph G = (V, E) with vertex set V and set of undirected edges E = {{u, v} : u, v ∈ V, u = v}. The adjacency matrix, A, for the graph is given by  Aij =

1 if {i, j} ∈ E; 0 otherwise.

The elements of the transition matrix, T , are then Tij = Aij /di where di =

 j∈V

Aij is the degree of the ith vertex.

The classical (discrete) random walk on a graph is described by a Markov chain, {Xt }, with state space V . Transitions take place at discrete time intervals between adjacent vertices in the graph with probabilities P (Xt = j | xt−1 = i) = Tij . A fundamental result for the random walk, provided it is irreducible and aperiodic, is that there exists a unique probability distribution, πi , satisfying the equations  πi = Tij πj ∀j. j∈V

Towards Unitary Representations for Graph Matching

155

This distribution plays an important role in characterizing the walk. For any starting distribution we have P (Xt = v) → πv

as t → ∞ ∀v.

Thus all walks approach a unique limiting distribution that is independent of the initial state. 2.2

The Quantum Walk

Quantum walks on graphs are quantum analogues of classical walks on graphs. There are two models, the discrete [16] and the continuous [13] quantum walk, which require the use of different methods to carry out the quantization. Both models were developed as a result of the interest in the possibilities of quantum computing and both exhibit many interesting properties that distinguish them from their classical counterparts. Although the behaviour of discrete and continuous versions are similar, the exact relationship is not yet fully understood. In this paper we will concentrate on the discrete quantum walk. Of particular interest to us is the possibility of using the quantum walk model to probe graphs using classical computation. Let {|j : j ∈ V } be the basis states of a |V |-dimensional Hilbert space, H. A vector in this space is of the form  |ψ = aj |j aj ∈ C. j∈V

The inner product between two vectors |ψ and |ψ   is given by  aj (aj )∗ . ψ|ψ   = j∈V

The state space for the quantum walk is the space of all vectors in H normalized according to the above inner product. This ‘superpostion’ means that any normalized complex linear combination of allowed quantum mechanical states is itself an allowed state. This allows the quantum walk to trace all possible paths simultaneously and interfere constructively or destructively according to their complex amplitudes. However, when a measurement is made of a quantum mechanical state according to a given basis just one of the basis states is observed with probability   P |ψt  = |j = |j|ψt |2 = aj a∗j and the wavefunction is said to ‘collapse’ to this state. All other information about the complex amplitudes of the various basis states prior to the measurement is lost. Since measuring the walk causes the wavefunction to collapse to just one of the basis states, it is necessary that the coin used to determine which edge to traverse (more correctly the amplitudes given to traversing each of the possible

156

D. Emms et al.

edges) is also part of the quantum system, otherwise the result is simply the classical walk. For a k-regular graph this is straightforward, the state space is supplemented by a k-dimensional coin space and the edges labelled from 1 to k such that each of the k edges associated with a particular vertex carries a different label. The basis states of the walk are thus {|v ⊗ |c : v ∈ V, c = 1, . . . , k}. Each step of the walk corresponds to one application of the unitary operator, U = T (IV ⊗ C), where C is the coin operator on the coin space, IV the identity on the vertex space and T the transition operator on the composite space [10]. The transition operator takes the state |u|c → |v|c where the edge {u, v} is labelled c. The coin operator is such that C|c =

k  j=1

ak |k

∀c ∈ {1, . . . , k}, where



aj a∗j = 1,

j

so that if the walk enters a vertex along one of the edges incident on it, it will leave along all k edges incident upon it with amplitudes dependent on the form the coin takes. The coin operator must be permutation invariant if the walk is to be independent of the labelling of the edges but can be varied so as to affect the mixing properties of the walk. The ‘Grover coin’ is typically chosen as the coin operator as it is the unitary operator furthest from the identity that is permutation invariant, and hence should provided the fastest mixing times 2 − 1 if i = j; (k) Gij = k2 otherwise. k When the graph is not regular then coin operators of different dimensions are needed for different vertices, consequently the states for the walk and the operator U can no longer be written in the simple product form given above. Nevertheless, we can still write a general expression for the 2|E| × 2|E| matrix U , whether or not the graph is regular:  2 − δil if j = k Uij,kl = dj ∀ (i, j), (j, i) where {i, j} ∈ E. 0 if j = k The difference between classical and quantum walks and how the properties of quantum walks can be utilized is a topic of much research [14] [12] [17]. A major difference between a classical and a quantum walk is that a quantum walk does not tend towards a limiting distribution: since the evolution is unitary the magnitude of the quantity |ψt  − |ψt−1  always remains the same. For a number of graphs hitting times of quantum walks have been found to be exponentially faster [14] [13], but in general quantum walks mix quadratically faster [16] than their classical analogues.

3

Analysis of the Unitary Representation

In this paper we wish to concentrate on the how the idea of quantum walks can be used classically. The spectrum of the unitary matrix governing the evolution

Towards Unitary Representations for Graph Matching

157

of a quantum walk turns out to be related to the spectrum of the transition matrix for the analogous classical walk. The unitary matrix can be written as   2 Uij,kl = Aik Ajl δjk − δil . dk Let v be an eigenvector of U with eigenvalue λ, then  λvij = Uij,kl vkl kl

 2  = Aik Ajl δjk vkl − Aik Ajl δjk δil vkl dk kl kl 2Aij  = Ajl vjl − Aij vji . dj l

Let e be an eigenvector of T with eigenvalue µ, we show that vij =

Aij ei Aij − λ∗ dj di

satisfies this equation and hence is an eigenvector of U . In fact Aij  Ajl vjl − Aij vjl λvij = 2 dj l Aij  2 el Aij  2 ej ei ej =2 Ajl − 2λ∗ Ajl − Aij Aji + λ∗ Aij Aji dj dl dj dj di dj l l  el ei ej Aij  ∗ Aij ej =2 Ajl − 2λ Ajl − Aij + λ∗ Aij 2 dj dl dj di dj l

l

Aij ej ei ej Aij ej = 2µ − 2λ∗ − Aij + λ∗ Aij dj dj di dj e Aij ej i = (2µ − λ∗ ) − Aij dj di ei Aij ej = λ( (2λ∗ µ − λ∗2 ) − λ∗ Aij ) dj di

 which is true if (2λ∗ µ−λ∗2 ) = 1. It follows that λ = µ±i 1 − µ2 . The remaining eigenvalues are ±1 each with multiplicity |E| − |V |. So the spectrum of U is completely determined by the spectrum of the transition matrix T . However, the random walk induced by U still has advantages over its classical analogue. In the next section we consider how we can make use of the differences between the walks. 3.1

Interference and the Supporting Digraph

Unlike the classical walk, the quantum walk traverses all possible paths simultaneously with amplitudes corresponding to the probability of each path. These

158

D. Emms et al.

walks are not independent but are able to constructively or destructively interfere; giving rise to probability distributions on the vertices dependent upon this effect. This appears to allow the walk to probe and distinguish graphs more effectively than happens classically. The state of the walk after t steps is given by U t , the (i, j) entry giving the amplitude in the state |i at time t for a walk starting in the state |j. Define the supporting digraph [18] for the unitary matrix V to be the digraph with adjacency matrix  1 if Vij = 0; Uij = 0 otherwise. The digraph supporting the unitary U t has a non-zero (i, j) entry if and only if there is a non-zero probability of the walk starting in the state j being observed in the state i after t steps, where each state corresponds to a graph vertex together with a coin state. For small values of t this pattern of non-zero entries is more complex than is the case for the classical walk. It is the use of this matrix that we suggest for the task of distinguishing graphs, to this effect we propose the following algorithm: Let G and H be two graphs and let sp(X) denote the spectrum of the matrix X. 1. Construct UG and UH . 2. Compute sp(UG ) and sp(UH ). (a) If sp(UG ) = sp(UH ) then G = H. (b) If sp(UG ) = sp(UH ) then go to the next step. n−1 n−1 ) and sp(UH ). n. (n ≥ 3) Compute sp(UG n−1 n−1 (a) If sp(UG ) = sp(UH ) then G = H. n−1 n−1 (b) If sp(UG ) = sp(UH ) then go to Step n + 1.

The idea behind the algorithm is simple. Given any two matrices X and Y , if sp(X) = sp(Y ) then sp(X t ) = sp(Y t ) for all t. This is not the case if t we consider AtG and UG . However, it is usually the case that (AtG ) = Jn , the all-one matrix, even for small values of t. Consequently, {sp(AtG )}∞ t=2 is of little use for distinguishing graphs. On the other hand, UGij = 0 does not imply that t t t UG = 0, for all t. Thus UG is not necessarily the all one matrix and sp(UG ) ij may still contain information about G. In practice we have not needed to go beyond step 4 to distinguish non-isomorphic graphs.

4

Experiments

Traditional spectral methods for various graph matching tasks rely on the use of the spectrum of either the adjacency or Laplacian matrices, but these methods fail when faced with a pair of non-isomorphic cospectral graphs. Strongly

Towards Unitary Representations for Graph Matching

159

regular graphs (SRG) provide examples of such graphs. A graph is k-regular if every vertex has the same degree k. A SRG with parameters (n, k, λ, µ) is a k-regular graph on n vertices, where each pair of adjacent vertices and each pair of nonadjacent vertices have exactly λ and µ common neighbours, respectively [7]. The spectra of the adjacency and Laplacian matrices are completely determined by the parameter set and hence any two co-parametric SRG are cospec3 tral with respect to these matrices. At step n = 4, that is considering sp(UG ) 3 and sp(UH ), the algorithm in the previous section was able to distinguish all co-parametric non-isomorphic SRG tested, which we summarize Table 1. In addition, this method was also able to distinguish between pairs of co-immanantal trees as constructed in [9]. As an example, let us consider the two non-isomorphic SRG with parameters (16, 6, 2, 2) in Figure 1. We have sp(AG ) = sp(AH ) = {[−2]9 , [2]6 , [6]}. and sp(LG ) = sp(LH ) = {[0]1 , [4]6 , [8]9 }. However, 3 sp(UG ) = {[−7 − 2i]15 , [−7 + 2i]15 , [−5]9 , [−1]18 , [1]27 , [3]5 , [5]6 , [45]1 }

and 3 ) = {[−7 − 2i]15 , [−7 + 2i]15 , [−5]6 , [−1]24 , [1]21 , [3]2 , [5]9 , [45]1 }. sp(UH

Hence the algorithm is able to distinguish between these graphs. → Within each set of co-parametric SRG in Table 1, we computed a vector, − e, 3 of the ordered eigenvalues of UG , for every graph G in the set. We then calculated → → the matrix with entries DGH = |− e G −− e H |, for all G and H in the set. We found that DGH = 0 only when G = H, thus distinguishing all non-isomorphic graphs. As an example, the matrix for the set with parameters (26, 10, 3, 4) is Table 1. The SRG used to test the algorithm. These SRG were obtained from [19] (n, k, λ, µ) Number of co-parametric SRG (16, 6, 2, 2) 2 (25, 12, 5, 6) 15 (26, 10, 3, 4) 10 (28, 12, 6, 4) 4 (29, 14, 6, 7) 41 (35, 18, 9, 9) 227 (36, 14, 4, 6) 227 (40, 12, 2, 4) 28 (45, 12, 3, 3) 78 (64, 18, 2, 6) 167

160

D. Emms et al.

Fig. 1. Two non-isomorphic SGR (G left, H right) with the parameter set (16, 6, 2, 2) (The graphs were drawn using Bill Kocay’s “Graphs and Groups” program available at http://bkocay.cs.umanitoba.ca/G&G/G&G.html)

⎞ 0 4.1314 42.88 26.643 22.906 26.217 45.133 26.114 23.549 23.363 ⎜ 4.1314 0 45.494 25.432 22.308 24.606 51.952 29.343 24.855 23.799 ⎟ ⎟ ⎜ ⎜ 42.88 45.494 0 53.421 55.587 58.849 15.507 96.276 53.686 57.496 ⎟ ⎟ ⎜ ⎜ 26.643 25.432 53.421 0 3.0823 3.8608 53.243 75.141 3.639 3.0694 ⎟ ⎟ ⎜ ⎜ 22.906 22.308 55.587 3.0823 0 2.4684 53.464 68.051 2.4905 1.178 ⎟ ⎟ D=⎜ ⎜ 26.217 24.606 58.849 3.8608 2.4684 0 57.211 71.881 3.3889 2.5309 ⎟ . ⎟ ⎜ ⎜ 45.133 51.952 15.507 53.243 53.464 57.211 0 94.333 51.902 55.511 ⎟ ⎟ ⎜ ⎜ 26.114 29.343 96.276 75.141 68.051 71.881 94.333 0 71.379 68.362 ⎟ ⎟ ⎜ ⎝ 23.549 24.855 53.686 3.639 2.4905 3.3889 51.902 71.379 0 1.8963 ⎠ 23.363 23.799 57.496 3.0694 1.178 2.5309 55.511 68.362 1.8963 0 ⎛

5

Conclusions

We have reviewed how unitary matrices inducing discrete quantum walks (using the Grover coin) are constructed. We have shown how their spectra are related to the spectra of the transition matrix of the analogous classical random walk. We have looked at the supporting digraph of powers of such unitary matrices. These are related to the possible paths that a quantum walk can take. The spectra of the adjacency matrices of these digraphs are able to distinguish between pairs of non-isomorphic cospectral graphs, the classic examples of which are strongly regular graphs and certain trees.

References 1. Lov´ asz, L.: Random Walks on Graphs: A Survey. In: Combinatorics, Paul Erd¨os is Eighty. Volume 2. J´ anos Bolyai Mathematical Society, Budapest (1996) 353–398 2. Sinclair, A.: Algorithms for random generation and counting: a Markov chain approach. Birkhauser Verlag, Boston (1993) 3. Brin, S., Page, L.: The anatomy of a large-scale hypertextual Web search engine. Computer Networks and ISDN Systems 30 (1998) 107–117

Towards Unitary Representations for Graph Matching

161

4. Robles-Kelly, A., Hancock, E.R.: String edit distance, random walks and graph matching. International Journal of Pattern Recognition and Artificial Intelligence 18 (2004) 315–327 5. Robles-Kelly, A., Hancock, E.R.: Edit distance from graph spectra. In: Proc. of the IEEE International Conference on Computer Vision. (2003) 234–241 6. Gori, M., Maggini, M., Sarti, L.: Graph matching using random walks. In: IEEE 17th International Conference on Pattern Recognition. (2004) 7. Cameron, P.J.: Strongly regular graphs. In: Topics in Algebraic Graph Theory. Cambridge University Press (2004) 203–221 8. Schwenk, A.J.: Almost all trees are cospectral. In Harary, F., ed.: New Directions in the Theory of Graphs, Academic Press (1973) 275–307 9. Merris, R.: Almost all trees are coimmanantal. Linear Algebra and its Applications 150 (1991) 61–66 10. Kempe, J.: Quantum random walks – an introductory overview. Contemporary Physics 44 (2003) 307–327 11. Ambainis, A.: Quantum walks and their algorithmic applications. International Journal of Quantum Information 1 (2003) 507–518 12. Shenvi, N., Kempe, J., Whaley, K.B.: A quantum random walk search algorithm. Phys. Rev. A 67 (2003) 13. Childs, A., Farhi, E., Gutmann, S.: An example of the difference between quantum and classical random walks. Quantum Information Processing 1 (2002) 35 14. Kempe, J.: Quantum random walks hit exponentially faster. In: Proc. of 7th Intern. Workshop on Randomization and Approximation Techniques in Comp. Sc. (RANDOM’03). (2003) 354–69 15. Ambainis, A.: Quantum walk algorithm for element distinctness. In: Proc. of 45th Annual IEEE Symposium on Foundations of Computer Science (FOCS’04). (2004) 16. Aharonov, D., Ambainis, A., Kempe, J., Vazirani, U.: Quantum walks on graphs. In: Proc. 33th STOC, New York, NY, ACM (2001) 50–59 17. Rudolph, T.: Constructing physically intuitive graph invariants (2002) 18. Severini, S.: On the digraph of a unitary matrix. SIAM Journal on Matrix Analysis and Applications 25 (2003) 295–300 19. Spence, E.: Strongly Regular Graphs. www.maths.gla.ac.uk/es/srgraphs.htm (2004)