chicago journal of theoretical computer science · on finding the number of graph automorphisms...

30
Chicago Journal of Theoretical Computer Science The MIT Press Volume 1999, Article 1 On Finding the Number of Graph Automorphisms ISSN 1073–0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493 USA; (617)253-2889; [email protected], journals- [email protected] . Published one article at a time in L A T E X source form on the Internet. Pagination varies from copy to copy. For more information and other articles see: http://mitpress.mit.edu/CJTCS/ http://www.cs.uchicago.edu/publications/cjtcs/ ftp://mitpress.mit.edu/pub/CJTCS ftp://cs.uchicago.edu/pub/publications/cjtcs

Upload: others

Post on 23-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Chicago Journal of TheoreticalComputer Science

The MIT Press

Volume 1999, Article 1On Finding the Number of Graph Automorphisms

ISSN 1073–0486. MIT Press Journals, Five Cambridge Center, Cambridge,MA 02142-1493 USA; (617)253-2889; [email protected], [email protected]. Published one article at a time in LATEX source form on theInternet. Pagination varies from copy to copy. For more information andother articles see:

• http://mitpress.mit.edu/CJTCS/

• http://www.cs.uchicago.edu/publications/cjtcs/

• ftp://mitpress.mit.edu/pub/CJTCS

• ftp://cs.uchicago.edu/pub/publications/cjtcs

Page 2: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms (Info)

The Chicago Journal of Theoretical Computer Science is abstracted or in-dexed in Research Alert,R©SciSearch, R©Current ContentsR©/Engineering Com-puting & Technology, and CompuMath Citation Index. R©

c©1999 The Massachusetts Institute of Technology. Subscribers are licensedto use journal articles in a variety of ways, limited only as required to ensurefair attribution to authors and the journal, and to prohibit use in a competingcommercial product. See the journal’s World Wide Web site for furtherdetails. Address inquiries to the Subsidiary Rights Manager, MIT PressJournals; (617)253-2864; [email protected].

The Chicago Journal of Theoretical Computer Science is a peer-reviewedscholarly journal in theoretical computer science. The journal is committedto providing a forum for significant results on theoretical aspects of all topicsin computer science.

Editor-in-Chief: Janos Simon

Consulting Editors: Joseph Halpern, Stuart A. Kurtz, Raimund Seidel

Editors: Martin Abadi Greg Frederickson John MitchellPankaj Agarwal Andrew Goldberg Ketan MulmuleyEric Allender Georg Gottlob Gil NeigerTetsuo Asano Vassos Hadzilacos David PelegLaszlo Babai Juris Hartmanis Andrew PittsEric Bach Maurice Herlihy James RoyerStephen Brookes Ted Herman Alan SelmanJin-Yi Cai Stephen Homer Nir ShavitAnne Condon Neil Immerman Eva TardosCynthia Dwork Howard Karloff Sam TouegDavid Eppstein Philip Klein Moshe VardiRonald Fagin Phokion Kolaitis Jennifer WelchLance Fortnow Stephen Mahaney Pierre WolperSteven Fortune Michael Merritt

Managing Editor: Michael J. O’Donnell

Electronic Mail: [email protected]

[ii]

Chicago Journal of Theoretical Computer Science 1999-1

Page 3: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

On Finding the Number of GraphAutomorphisms

Robert Beals Richard Chang William GasarchJacobo Toran

10 February, 1999

Abstract

In computational complexity theory, a function f is calledb(n)-enumerable if there exists a polynomial-time function that canrestrict the output of f(x) to one of b(n) possible values. This paperinvestigates #GA, the function that computes the number of automor-phisms of an undirected graph, and GI, the set of pairs of isomorphicgraphs. The results in this paper show the following connections be-tween the enumerability of #GA and the computational complexityof GI.

1. #GA is exp(O(√

n log n))-enumerable.

2. If #GA is polynomially enumerable, then GI ∈ R.

3. For ε < 12 , if #GA is nε-enumerable, then GI ∈ P.

1 Introduction

The Graph Isomorphism (GI) problem has a special place in computational1-1

complexity theory. The set GI consists of all pairs of graphs that are isomor-phic to each other. GI is known to be in NP but not NP-complete unlessthe Polynomial Hierarchy collapses [GMR89, Sch89], a condition that vio-lates the usual intractability assumptions. Nevertheless, there is no knownpolynomial-time algorithm to solve the isomorphism problem on generalgraphs even though some progress has been made towards polynomial-timealgorithms in special cases (most notably for planar graphs [HT71, HW74],

1

Chicago Journal of Theoretical Computer Science 1999-1

Page 4: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §1

graphs of bounded genus [FM80, Mil80], bounded-degree graphs [Luk82], andgraphs with bounded eigenvalue multiplicities [BYGM82]). Thus, the GraphIsomorphism problem belongs to a short list of problems in NP that are sus-pected to be neither decidable in polynomial time nor NP-complete. In fact,the exact complexity of GI remains an open problem. For example, it is notknown whether GI can be solved in randomized polynomial time or whetherGI is contained in the class NP ∩ co-NP.

The current state of knowledge on the complexity of GI depends on the1-2

two-round interactive protocol for Graph Non-Isomorphism [GMR89], a tech-nique that we exploit in this paper. However, even before this proof was dis-covered, it was suspected that GI could not be NP-complete because countingthe number of graph isomorphisms has roughly the same complexity as de-ciding the existence of an isomorphism [Mat79]. In contrast, the countingversions of typical NP-complete problems tend to be much harder than thedecision versions. The proof that counting graph isomorphisms is relatively“easy” also demonstrated a close connection between the structure of graphisomorphisms and graph automorphisms (isomorphisms between a graph anditself). The results in this paper add another link to this connection.

In computational complexity theory, a function is called b(n)-enumerable11-3

if a polynomial-time function can determine a restricted range for the func-tion. For example, a priori the #GA function, which computes the num-ber of automorphisms in a graph, may output any value from 1 to n! fora graph with n vertices. However, we will show that #GA can take ononly one of exp(O(

√n log n)) values — i.e., we will show that #GA is

exp(O(√n log n))-enumerable. The other main results in this paper show

that if #GA is “easy” in the sense of enumerability, then there is a corre-sponding decrease in the complexity of GI. Namely:

• If #GA is polynomially enumerable, then GI can be recognized in ran-domized polynomial time.

• For ε < 12 , if #GA is nε-enumerable, then GI can be recognized in

deterministic polynomial time.

Currently, GI does not seem to be solvable in polynomial time using either1-4

randomized or deterministic computations. Hence, these results could alsobe interpreted as results on the non-enumerability of #GA.

1Not to be confused with recursive enumerability in recursive function theory or count-able (denumerable) sets in set theory.

2

Chicago Journal of Theoretical Computer Science 1999-1

Page 5: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §2

The rest of the paper is organized as follows. In Section 2, we provide1-5

some technical background and formal definitions for the terms used in thispaper. In Section 3, we construct a graph gadget that allows us to combinemany instances of GI into one instance of #GA. In Sections 4 and 5, wepresent the results connecting the enumerability of #GA and the complexityof GI. Finally, in Section 6 we give an upper bound on the enumerability of#GA.

2 Preliminaries

In this paper, we will work with many complexity classes. We assume that2-1

the reader is familiar with P and NP, the classes of languages recognized bydeterministic and nondeterministic polynomial-time Turing machines. Wewill use PH to denote the Polynomial Hierarchy and R to denote the class oflanguages recognized by probabilistic polynomial-time Turing machines withbounded one-sided error. We refer the reader to standard references [BDG88,BDG90, Sch85] in complexity theory for explanations on the relationshipsamong these classes.

An instance of the Graph Isomorphism (GI) problem is a pair of undi-2-2

rected graphs (G,H). Without loss of generality, the vertices of the graphsare indexed 1 through n. The pair (G,H) is an element of GI if there exists abijection f from the vertices of G to the vertices of H that preserves the edgerelations — i.e., (u, v) is an edge in the graph G if and only if (f(u), f(v)) isan edge in H. In this case, f is called an isomorphism between G and H andwe write G ' H. Note that we may think of f as a permutation of the set1, . . . , n. Whereas GI is a set or, alternatively a decision problem, #GI isa function, or a counting problem. The value of the function #GI on input(G,H) is the number of isomorphisms from G to H.

An instance of the Graph Automorphism (GA) problem is a single graph2-3

G. The graph G is an element of GA if G has a non-trivial automorphism —i.e., an isomorphism between G and itself other than the identity function.Analogously, the function #GA computes the number of automorphisms onG. It is often more convenient to work with GA instead of GI because theset of automorphisms of a graph forms a group under composition.

Clearly, the set GI is an element of NP because an NP machine can guess2-4

a permutation and check that the permutation is indeed an isomorphismbetween two graphs. As we have mentioned before, GI is known to be in-

3

Chicago Journal of Theoretical Computer Science 1999-1

Page 6: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §2

complete for NP unless the Polynomial Hierarchy collapses. The complexitiesof #GI, GA, and #GA can be estimated based upon their relationship toGI. For example, GA reduces to GI by a many-one polynomial-time reduc-tion. Therefore, GA is also an element of NP and cannot be complete for NPunless PH collapses. Clearly, GI reduces to #GI because knowing the num-ber of isomorphisms certainly tells you whether one exists. In addition, onecan compare the complexities of these problems as oracles. Using the groupstructure of GA, one can show that PGI = P#GA = P#GI [Mat79, Hof79],[KST93, Theorem 1.24]. Thus, treated as oracles for P, the problems GI,#GA and #GI have essentially the same complexity.2

The incompleteness of GI also shows that P#GI cannot contain any2-5

NP-complete problems unless PH collapses. This result sets the Graph Iso-morphism problem apart from the NP-complete problems. For example, con-sider the satisfiability problem SAT and the corresponding counting problem#SAT, which outputs the number of satisfying assignments of a Booleanformula. SAT is, of course, NP-complete, so PSAT = PNP. However, #SATis #P-complete3, and it also known that P#SAT contains the entire Poly-nomial Hierarchy [Tod91]. Thus, the complexity of #SAT is much higherthan the complexity SAT, whereas the complexity of #GI is at the samelevel as that of GI. Note that the complexity of the counting version of aproblem is not necessarily a good predictor of the complexity of the decisionversion of the problem. For example, deciding whether a bipartite graphhas a perfect matching can be done in polynomial time, but counting thenumber of perfect matchings in a bipartite graph is #P-complete [Val79].However, since the counting versions of natural NP-complete problems are#P-complete, the observation that PGI = P#GI nevertheless suggests thatGI is not NP-complete.4 This observation was interpreted by many authorsas “evidence” that GI might not be NP-complete before the incompletenessof GI was proven [Hof79].

Returning to graph automorphisms, we note that the value of #GA(G)2-6

has several special properties. First, #GA(G) must range from 1 to n! be-

2Of course, PGA ⊆ P#GA, but whether P#GA ⊆ PGA remains an open problem.3A function f is in the class #P if there exists an NP machine N such that f(x) equals

the number of accepting paths in the computation of N(x).4Considering the example of perfect matchings in bipartite graphs, one should not claim

that the counting version of a problem being hard implies that the decision problem ishard. However, one might still argue that if the counting version of a problem is easy,then the decision problem might be easy.

4

Chicago Journal of Theoretical Computer Science 1999-1

Page 7: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §2

cause the identity function is always an automorphism and there are at mostn! permutations of the n vertices. Second, the set of automorphisms of Gforms a subgroup of Sn, the set of all permutations of 1, . . . , n under com-position. This group structure can be exploited in many ways. For example,from LaGrange’s Theorem, we know that #GA(G) must divide n!, hence#GA(G) cannot have factors larger than n. Thus, given #GA(G) as input,it is possible to obtain a complete prime factorization of #GA(G) in polyno-mial time. The following observations about #GA and prime numbers willbe needed throughout the paper.

Lemma 1 Let G be a graph with n vertices. For i ≥ 1, let mi be the ithsmallest prime number larger than n.

1. #GA(G) divides n!.

2. mi does not divide #GA(G).

3. There exists a prime p such that mi < p < 2mi.

4. For n ≥ 17, mi ≤ 2(n log n+ i log i).

5. mi can be computed in time nO(1) + iO(1).

Proof of Lemma 1 Parts 1 and 2 follow from the preceding discussion.Part 3 is just Bertrand’s Postulate [HW79] (that there exists a prime numberbetween x and 2x). Part 4 can be derived easily from a result of Rosser andSchoenfeld [RS62], which states that the number of primes less than x isbetween x/ lnx and 1.25506x/ lnx, for x ≥ 17. (These are estimates forthe constants in the Prime Number Theorem.) Part 5 follows from Part 4,because mi is polynomial in n and i. Since we can list all the primes belowa number x in time polynomial in x (not the length of x), mi can be foundin time polynomial in n and i.

Proof of Lemma 1 2

Thus, #GA cannot take on every value between 1 and n! since some of2-7

these numbers cannot be the order of a subgroup of Sn. This leads us to“enumerability” as a measure of complexity. The concept of enumerabilityin computational complexity theory was introduced independently by Beigel[Bei87a] and by Cai and Hemachandra [CH89] then later modified by Amir,Beigel, and Gasarch [ABG90].

5

Chicago Journal of Theoretical Computer Science 1999-1

Page 8: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §2

Definition 1 Let b : N → N be polynomially bounded. A function f isDefinition 1-1

b(n)-enumerable if there exists a polynomial-time computable function g, suchthat for all x, g(x) outputs a list of at most b(|x|) values, one of which isf(x). A function f is poly-enumerable if f is b(n)-enumerable for somepolynomial b.

For super-polynomial b : N → N, f is b(n)-enumerable if there exists aDefinition 1-2

polynomial-time computable function g, such that for all x, f(x) is one ofthe b(|x|) values in the sequence g(x, 0), g(x, 1), . . . , g(x, b(|x|)−1). (Here weassume that the second input to g is written in binary.)

Intuitively, we think of the enumerability of functions as a generaliza-2-8

tion of approximability. For example, suppose a function f : N → N isapproximable within a factor of 2. Then, there is a polynomial-time com-putable function, which, for all x, outputs a value y and guarantees thaty ≤ f(x) ≤ 2y. Thus, the set of possible values of f(x) is restricted to thenumbers between y and 2y. For enumerability, the set of possible values doesnot have to be an interval. Another difference between enumerability andapproximability is that in approximability the number of possible values is“output sensitive” — i.e., the number of possible values of f(x) depends di-rectly on f(x) rather than x. In addition, approximability is only meaningfulwhen there is a natural total ordering on the range of the function, whereasenumerability makes sense in a broader setting.

The algorithm that computes #GA in polynomial time using a GI or-2-9

acle is a group-theoretic algorithm and proceeds roughly as follows (see[Hof79, KST93] for details). Let A be the automorphism group of a graphG. Consider a tower of subgroups of A

I = A(n) ≤ A(n−1) ≤ . . . ≤ A(1) ≤ A(0) = A,

where I is the trivial group containing only the identity permutation and≤ denotes the subgroup relation. Here, A(i) is the subgroup of pointwisestabilizers of 1, . . . , i in A — i.e., the set of permutations ψ ∈ A suchthat for all j, with 1 ≤ j ≤ i, ψ(j) = j. The order of the group A canthen be determined by iteratively computing the order of the subgroupsA(n), A(n−1), . . . , A(0). This iterative procedure relies on the fact that alabeled isomorphism between two graphs can be constructed in polynomialtime using a GI oracle. A labeled graph isomorphism between graphs Gand H with n vertices is a permutation of 1, . . . , n that preserves the edgerelations of G and H as well as labels assigned to vertices of G and H. For

6

Chicago Journal of Theoretical Computer Science 1999-1

Page 9: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §2

example, if we label both vertex j in G and vertex j in H with the label `jfor 1 ≤ j ≤ i, then we can guarantee that any labeled isomorphism betweenG and H is in fact a pointwise stabilizer of 1, . . . , i. This result occursbecause any labeled isomorphism is forced to map vertex j in G to vertexj in H for 1 ≤ j ≤ i. The labels on the vertices of a labeled graph canbe simulated in an unlabeled graph by attaching large cliques or long cyclesto the vertices. In the example above, the label `j assigned to vertex jcan be simulated in an unlabeled graph by attaching a cycle of n + j newvertices to vertex j by using a single edge. Again, any isomorphism betweenG and H must map vertex j in G to vertex j in H for 1 ≤ j ≤ i. Notethat if the original graphs G and H are planar, then the simulated labeledgraphs are also planar. Since planar graph isomorphism can be computed inpolynomial time [HT71, HW74], this procedure also computes #GA(G) forplanar graphs in polynomial time. Similarly, the simulated labeling schemeapplied to bounded genus graphs does not change the genus of the graph.Thus, #GA(G) can also be computed in polynomial time for bounded genusgraphs. Attaching a long cycle to a vertex in a bounded-degree graph willincrease the degree of the vertex by 1. So, #GA(G) is again polynomial-timecomputable for bounded degree graphs. Thus, in each of these special cases,#GA(G) is in fact 1-enumerable.5

There do exist functions that cannot be polynomially enumerated un-2-10

less some intractibility assumptions are violated. For example, Cai andHemachandra showed that unless P = PP, the function #SAT is notnε-enumerable for ε < 1.6 This result was improved independently by Caiand Hemachandra [CH91] and by Amir, Beigel, and Gasarch [ABG90], whoshowed that P = PP if and only if #SAT is p(n)-enumerable for somepolynomial p. Moreover, Amir, Beigel, and Gasarch [ABG90] proved thatunless the Polynomial Hierarchy collapses to its fourth level, #SAT is not2nε-enumerable for ε < 1. Since #SAT is clearly 2n-enumerable, these re-sults show tight upper and lower bounds on the enumerability of #SAT, ifwe assume that PH does not collapse.

In the present paper, we investigate the enumerability of #GA. Our2-11

motivation for studying the enumerability of #GA is twofold. First, the5It is not clear to the authors how this labeling scheme would affect graphs with

bounded eigenvalue multiplicity.6PP is the class of languages recognized by probabilistic polynomial-time Turing ma-

chines with unbounded two-sided error. Since PP contains NP, the conclusion P = PP isgenerally considered to be unlikely.

7

Chicago Journal of Theoretical Computer Science 1999-1

Page 10: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §3

results mentioned above, combined with Toda’s theorem that every set in PHreduces to #SAT [Tod91], show that #GA cannot be #P-complete unless PHcollapses to PNP (actually to PGI). Therefore, the enumerability propertiesof #GA might be very different from those of #SAT. Also, connectionsbetween the enumerability of #GA and the complexity of GI might help usobtain a better classification of the Graph Isomorphism problem.

Throughout the paper, we use the number of vertices in a graph as the2-12

measure of the size of the input. We do this to simplify the terminologyeven though the length of the encoding of a graph could be as long as n2. Incertain cases, this convention does have an effect on our results. For example,Theorem 1 is stated for ε < 1/2; without this convention, the statement wouldbe ε < 1/4.

3 Combining Lemma

In this section we show how to combine many instances of GI into one in-3-1

stance of #GA. This lemma will be used in the proofs of the main theoremsof Sections 4 and 5. First, we need to define the notion of reductions betweentwo functions (as opposed to sets).

Definition 2 (Krentel [Kre88]) Let f and g be two functions. We say that freduces to g, written f ≤p

m g, if there exist two polynomial-time computablefunctions S and T such that

f(x) = S(x, g(T (x))).

Intuitively, f ≤pm g implies that f is easier than g, because g provides3-2

enough information for a polynomial-time function to compute f . Thesereductions are also called metric reductions in the literature.

To simplify our notation, we will also use the following notational device3-3

for generalized characteristic functions. For a set A and an ordered listx1, . . . , xr of instances of A, the function χA(x1, . . . , xr) outputs a sequenceof r bits such that the ith bit is 1 if and only if xi ∈ A. Note that r does nothave to be constant here.

Now, we are ready to prove the Combining Lemma. This key lemma3-4

allows us to construct a graph F from q instances of the Graph Isomorphismproblem, (G1, H1), . . . , (Gq, Hq), such that #GA(F) provides enough infor-mation to determine in polynomial time whether Gi is isomorphic to Hi foreach instance (Gi, Hi).

8

Chicago Journal of Theoretical Computer Science 1999-1

Page 11: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §3

Gi Hi

Gi

Gi

Gi Hi

Hi

Gi Hi

HiGi

Gi HiGi

Hi

...

......

ari+1ari

a3

a2a1

...

a2ri

Hi

Figure 1: Combining ri copies of Gi and Hi

Lemma 2 (Combining Lemma) There exist polynomial-time functions Tand S such that χGI ≤p

m #GA via T and S. Furthermore, in the case wherethe ordered list Q = 〈(G1, H1), . . . , (Gq, Hq)〉 consists of pairs of graphs withn vertices, the following hold for the graph F output by T (Q).

1. The F has O(n2q log n+ nq2 log q) vertices.

2. The output of S(Q,#GA(F)) can be computed from (n, q,#GA(F)).

Proof of Lemma 2 In the construction below, the running time of T will beProof of Lemma 2-1

polynomial in |Q|, which is polynomial in n+q. This allows for the possibilitythat Q has many small graphs. In the first step of the construction, we findm1, . . . ,mq, the q prime numbers immediately following the number n. Letri = (mi + 1)/2. Assuming that each graph in Q has at least 2 vertices, ri isan integer. For each i, 1 ≤ i ≤ q, we construct a graph Ci as follows. Takeri copies of Gi, ri copies of Hi, and a complete graph with 2ri new verticesa1, . . . , a2ri

. Connect each vertex in the jth copy of Gi to aj. Connect eachvertex in the jth copy of Hi to ari+j. (See Figure 1.) Call the resulting graphCi.

Now, suppose that Gi is isomorphic to Hi. Then every automorphism ofProof of Lemma 2-2

Ci can be formed by a permutation of the vertices in a1, . . . , a2ri followed

9

Chicago Journal of Theoretical Computer Science 1999-1

Page 12: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §3

by an automorphism of each copy of Gi and Hi. Hence

#GA(Ci) = (2ri)!(#GA(Gi))2ri .

Since 2ri = mi + 1, the prime number mi divides #GA(Ci).On the other hand, if Gi is not isomorphic to Hi, then every automor-Proof of Lemma 2-3

phism of Ci can be formed by a permutation of the vertices in a1, . . . , ari,

followed by a permutation of the vertices in ari+1, . . . , a2ri and the auto-

morphisms of each copy of Gi and Hi. In this case,

#GA(Ci) = (ri)!(ri)!(#GA(Gi))ri(#GA(Hi))ri .

Since ri < mi and |Gi| = |Hi| = n < mi, the prime number mi does notdivide #GA(Ci). In summary,

Gi ' Hi ⇐⇒ mi divides #GA(Ci). (1)

Let F be the disjoint union of all the Ci, for 1 ≤ i ≤ q. The output ofProof of Lemma 2-4

the function T (Q) will be F . Since each Ci has (mi + 1)(n+ 1) vertices, thetotal number of vertices in F is

(n+ 1)q∑

i=1

(mi + 1) < q(n+ 1)(mq + 1).

By Lemma 1 part 4, we know that mq ≤ 2(n log n + q log q). Hence, we canbound the number of vertices in F by O(n2q log n+ nq2 log q).

Now, we show how #GA(F) can be used to compute χGI(Q). By theProof of Lemma 2-5

construction of F ,

#GA(F) =q∏

i=1

#GA(Ci). (2)

We also know that for all i, 1 ≤ i ≤ q,

Gi ' Hi ⇒ mi divides #GA(F).

However, the converse may not hold because #GA(Cj) for some j > i maycontain mi as a factor. Thus, to determine whether Gi ' Hi from #GA(F),these extraneous mi factors (if they exist) must be removed. To do this, westart with the last Ci, namely Cq. Since mj < mq for all j < q, we know that

Gq ' Hq ⇐⇒ mq divides #GA(F).10

Chicago Journal of Theoretical Computer Science 1999-1

Page 13: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §4

Now, if Gq ' Hq, then Cq contributes an (mq + 1)! factor to #GA(F);otherwise, Cq contributes an (ri)!(ri)! factor to #GA(F).

To determine whether Gq−1 ' Hq−1 we need to remove the prime factorsProof of Lemma 2-6

greater than n from #GA(F) that came from #GA(Cq). Since #GA(Gq) and#GA(Hq) do not contain prime factors greater than n, the prime factors > nin #GA(Cq) come from either (mq + 1)! or (rq)!(rq)! depending on whetherGq ' Hq (which we have already determined). So, let

Ni =

#GA(F) if i = q

Ni+1

(mi+1 + 1)!if mi+1 divides Ni+1

Ni+1

(ri+1)!(ri+1)!otherwise

From the preceding discussion, it is clear that Gi ' Hi ⇐⇒ mi dividesNi. Thus, the function S can compute χGI((G1, H1), . . . , (Gq, Hq)) from#GA(F), n and q, by finding m1,m2, . . . ,mq and calculating N1, N2, . . . , Nq.

Proof of Lemma 2 2

4 #GA and nε-enumerability

The main theorem in this section shows that it is unlikely for #GA to be4-1

nε-enumerable because, for any ε < 1/2, #GA is nε-enumerable if and onlyif GI can be recognized in polynomial time. We begin with a review oftwo constructions from the literature. The first one shows that the GraphIsomorphism problem is “self-computable” in the sense that, given GI as anoracle, we can construct an isomorphism between two isomorphic graphs inpolynomial time [KST93, Sch76]. We reproduce the proof of this well-knowntheorem because we need to make references to the construction in the proofand because we need to estimate the sizes of the graphs queried.

Lemma 3 There exists a polynomial-time Turing machine using GI as anoracle which finds an isomorphism between two graphs, if the graphs areisomorphic.

Proof of Lemma 3 We prove that GI is “self-computable” by constructingProof of Lemma 3-1

a mapping between the vertices of two isomorphic graphs G and H and using11

Chicago Journal of Theoretical Computer Science 1999-1

Page 14: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §4

GI as an oracle. This “self-computable” property is similar to the disjunctiveself-reducibility of SAT.7 In the first stage of the construction, we find a vertexi1 in H such that there is an isomorphism between G and H mapping vertex1 in G to vertex i1 in H. This is accomplished by trying all n vertices in Hexhaustively and asking the GI oracle the n questions:

Proof of Lemma 3-2

Is there an isomorphism from G to H mapping vertex 1 to vertexi1?

Such questions can be transformed into queries to GI by attaching cycles withn + 1 vertices to vertex 1 in G and vertex i1 in H. Thus, any isomorphismbetween the transformed graphs must map vertex 1 in G to vertex i1 in H.If such an isomorphism exists, the remaining n−1 stages of the constructionassign vertices 2, . . . , n in G to the vertices in H under the restriction thatvertex 1 maps to vertex i1. In stage k of the construction, vertex k in G andik in H will be attached to a cycle with n+ k vertices.

Proof of Lemma 3 2

Remark 1 It is convenient to think of the procedure described in the preced-ing proof as a self-reduction tree. The root of the tree, level 0, is labeled withthe graphs (G,H). Each vertex at level k has n−k children that represent then − k possible assignments of vertex k in G to the n − k remaining verticesin H. These vertices are labeled with the corresponding transformed graphs.This tree has n! leaves, so we cannot construct the entire tree in polynomialtime. However, at the leaves of the tree, every vertex of G is assigned tosome vertex of H. Thus, in polynomial time we can determine whether themapping represented by a leaf is indeed an isomorphism between G and H.

In the proof of Theorem 1 below, our strategy is to traverse the4-2

self-reduction tree from the top down. Since the tree has exponentially manypaths, we will need to identify some of the paths as dead-ends. The fol-lowing combinatorial lemmas [Bei91, Owi89] will help us prune the tree andmaintain a polynomial bound on the running time of the tree traversal.

7That is, given any Boolean formula F , consider the formula F0 obtained by replacingthe first variable of F with the Boolean value FALSE and the formula F1 obtained byreplacing the first variable with TRUE. Then, F ∈ SAT if and only if F0 ∈ SAT orF1 ∈ SAT (see [BDG88, Section 4.5] and [Sch85, Section 4.5]).

12

Chicago Journal of Theoretical Computer Science 1999-1

Page 15: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §4

Definition 3 For a collection C of sets and a set X, we say X separates Cif for all S, S ′ ∈ C, S 6= S ′ ⇒ S ∩X 6= S ′ ∩X.

Lemma 4 For a collection C of sets, with |C| = n ≥ 1, there exists a set Xthat separates C, where |X| ≤ n− 1.

The lemma below adapts Lemma 4 to show that if we have ` vectors in4-3

0, 1`, then the vectors can be uniquely identified by their values at ` − 1coordinates. Thus, one of the coordinates is not needed to distinguish thevectors from each other. In the following, we use (~b)i to denote the ithcomponent of a vector ~b ∈ Σ`.

Lemma 5 Let m ≤ ` and ~b1, . . . ,~bm ∈ 0, 1`. There exists a coordinate ksuch that for all ~bi 6= ~bj, there exists t 6= k such that (~bi)t 6= (~bj)t. Moreover,k can be found in time polynomial in `.

Proof of Lemma 5 It suffices to prove the case wherem = `. Use Lemma 4where C is the collection of subsets of 1, . . . , ` represented by the bit vectors~b1, . . . ,~b`. Let k be an element not contained in the separator X. Since Xis a separator, each pair of bit vectors must differ at coordinates other thank. The coordinate k can be found in time polynomial in ` because we cansimply try all possible values for k and check each pair of ~bi and ~bj. Thistakes time O(`4).

Proof of Lemma 5 2

We are now ready to prove the main result of this section. The techniques4-4

used in this proof and in Lemma 5 are derived from results on enumerabilityand self-reducibility by Amir, Beigel, and Gasarch [ABG90].

Theorem 1 For ε < 1/2, the function #GA is nε-enumerable if and only ifGI ∈ P.8

4-5

8Recall that the n in “nε-enumerable” is the number of vertices in the graph. If n isthe length of the encoding of the graph, we would need to further restrict ε < 1/4.

13

Chicago Journal of Theoretical Computer Science 1999-1

Page 16: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §4

Proof of Theorem 1 In Section 2, we outlined a polynomial-time algo-Proof of Theorem 1-1

rithm for #GA that uses GI as an oracle. Thus, if GI ∈ P, then #GA is alsocomputable in polynomial time. In this case, #GA would be 1-enumerable.Thus, we only need to show that, if #GA is nε-enumerable, then GI ∈ P.

Given two graphs G and H with n vertices, we search the self-reductionProof of Theorem 1-2

tree described above in stages. We maintain a list Q of pairs of graphs fromthe self-reduction tree. Initially, Q contains just the pair (G,H). Throughoutthe tree-pruning procedure we maintain the invariant that G ' H if and onlyif Q contains a pair of isomorphic graphs (i.e., χGI(Q) is not all zeroes). Also,the size of the list Q will always be polynomially bounded. In the beginning ofevery stage of the tree pruning, we take each pair of graphs in Q and replaceit with its children in the self-reduction tree. We continue the replacementuntil Q has at least q(n) pairs (for q(n) ≥ n to be determined below).

Let Q′ = 〈(G1, H1), . . . , (Gq(n), Hq(n))〉 be the first q(n) pairs in Q. LetProof of Theorem 1-3

m be an upper bound on the size of these graphs. We apply the CombiningLemma to construct the graph F that has at most r = mq(n)2 log q(n)vertices. Then, we use the enumerator for #GA on F to obtain a list of rε

numbers, one of which is #GA(F). The function S in the Combining Lemmaconverts these numbers into a list of rε vectors ~b1, . . . ,~brε in 0, 1q(n), one ofwhich is χGI(Q′). Now, suppose that ~bi 6= 0q(n) for all i, 1 ≤ i ≤ rε. Then, weknow that χGI(Q′) 6= 0q(n), so G must be isomorphic to H. Thus, we can haltthe pruning procedure and accept. In the remaining case, we may assumethat 0q(n) is one of the vectors in ~b1, . . . ,~brε . We will pick q(n) below so thatrε ≤ q(n). Then, Lemma 5 gives us a coordinate k such that for ~bi 6= ~bj, thevectors ~bi and ~bj differ on a coordinate other than k. Now, it cannot be thecase that (Gk, Hk) is the only isomorphic pair of graphs in Q′ because, in thatcase, χGI(Q′) = 0k−110q(n)−k; hence, χGI(Q′) can only be distinguished from0q(n) using the kth coordinate. Thus, the pruning process can safely removethe pair (Gk, Hk) from the list Q and still guarantee that if Q contains anisomorphic pair before pruning, then it also does after pruning.

We continue removing items from Q until it has fewer than q(n) pairsProof of Theorem 1-4

of graphs. Then we proceed to the next stage. After at most n stages, thepairs in Q are leaves of the self-reduction tree, so we can compute χGI(Q) inpolynomial time. By the invariant we have maintained, G ' H if and onlyif χGI(Q) is not all zeroes. Thus, we have shown that GI ∈ P.

Finally, we need to show that by picking q(n) to be nα where α > 1/(1 −Proof of Theorem 1-5

2ε), we can guarantee that rε ≤ q(n). (The constant α is positive since

14

Chicago Journal of Theoretical Computer Science 1999-1

Page 17: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §5

ε < 1/2.) From the construction of the self-reduction tree in Lemma 3, weknow that m is O(n2) since the graphs Gi and Hi consist of n original verticesand cycles of size n+ 1 through 2n. So,

rε ≤ (cn2 · q(n)2 · log q(n))ε = (cn2 · n2α · α log n)ε.

Thus, rε < n2ε+2αε+δ for all δ > 0. From our choice of α, we know that

2ε+ 2αε < 1 + 2αε < α.

Therefore, rε ≤ q(n).

Proof of Theorem 1 2

Since it is generally believed that GI 6∈ P, the preceding theorem can also4-6

be interpreted as a lower bound on the enumerability of #GA. We can alsouse the theorem to obtain a lower bound on the bounded query complexityof #GA. The bounded query classes are defined as follows.

Definition 4 Let j(n) be a function and X be a set. A function f is inPFX[j(n)] if there exists a polynomial-time oracle Turing machine that com-putes f using no more than j(n) queries to X on inputs of length n.

Counting the number of oracle queries has been established as a useful4-7

complexity measure. For example, the number of queries to an NP oraclecan be used to characterize the complexity of approximating NP-optimizationproblems [Cha96, CGL97]. The following fact shows that there is an intimateconnection between the enumerability of a function and the bounded querycomplexity of that function.

Fact 1 [Bei87b, Lemma 3.2] Let f be any function and j(n) be a polynomial-time computable function. The following are equivalent:

1. There exists X such that f ∈ PFX[j(n)].

2. f is 2j(n)-enumerable.

Using Fact 1 we can obtain a lower bound on the number of queries needed4-8

to compute #GA, assuming that GI 6∈ P.

Corollary 1 Let ε < 1/2. If there exists an X such that #GA ∈ PFX[ε log n],then GI ∈ P.

15

Chicago Journal of Theoretical Computer Science 1999-1

Page 18: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §5

5 #GA and poly-enumerability

Assuming that GI 6∈ P, the main result in the previous section is a “non-5-1

enumerability” result. In general, we would like to prove stronger non-enumerability results for #GA. For example, Amir, Beigel, and Gasarch[ABG90] were able to prove that #SAT is not 2nε-enumerable for ε < 1unless the Polynomial Hierarchy collapses. We cannot use their machin-ery for the case of #GA because it turns out that #GA is actuallyexp(O(

√n log n))-enumerable. Instead, we adapt the techniques of Gold-

wasser, Micali, and Rackoff [GMR89] to show that #GA cannot be poly-enumerable unless GI ∈ R.9

Goldwasser, Micali, and Rackoff showed that Graph Non-Isomorphism,5-2

the complement of GI, can be recognized by a two-round interactive pro-tocol. We briefly review this protocol in order to motivate the proof ofTheorem 2. There are two parties involved in the interactive protocol: anall-powerful prover and a randomized polynomial-time verifier. The verifierasks the prover to convince him that the input graphs (G,H) are not isomor-phic as follows. In secret, the verifier randomly picks one of G and H alongwith a random permutation ψ. He applies ψ to either G or H, whichever onehe picked, and obtains a new graph X. Then, the verifier asks the proverwhetherX is a permuted version ofG or ofH. IfG andH are not isomorphic,the all-powerful prover simply checks if G ' X or if H ' X and providesthe appropriate answer. On the other hand, if G and H are isomorphic, Xcan be a permuted version of either graph. In that case, the prover can onlyprovide the correct answer with probability one-half. Thus, if G 6' H, thereexists a prover who can always convince the verifier to accept. Conversely, ifG ' H, no prover (even one that “lies”) can convince the verifier to acceptwith greater than 50 percent probability.

In the proof below, our randomized algorithm for GI will play the role5-3

of the verifier, and the enumerator for #GA will play the role of the prover.However, unlike the prover in an interactive protocol, the enumerator pro-vides several answers at once.10 Thus, it is possible for the enumerator togive two answers at the same time: one that corresponds to G ' H andone to G 6' H. We cope with this situation by emulating the interactive

9We were motivated in part by Lozano and Toran [LT93, Theorem 5.1], who also usedthis technique in their proof.

10Another difference is that the enumerator cannot “lie” in the same manner as theprover because one of the answers it provides must be the correct value of #GA.

16

Chicago Journal of Theoretical Computer Science 1999-1

Page 19: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §5

protocol many times in parallel. Thus, instead of picking one permutation ψand forming one permuted graph X, we pick q(n) permutations ψ1, . . . , ψq(n)

and form q(n) graphs X1, . . . , Xq(n), each of which is a permutation of eitherG or H.

Notation 1 For each permutation ψ ∈ Sn, we use ψ(G) to denote the graphobtained by re-labeling the vertices of G using ψ. Given two permutationsψ, ρ ∈ Sn, we define ψ ρ ∈ Sn to be the functional composition of ψ and ρ— i.e., (ψ ρ)(G) = ψ(ρ(G)).

Theorem 2 If #GA is poly-enumerable, then GI ∈ R.

Proof of Theorem 2 Assuming that #GA is p(n)-enumerable via an enu-Proof of Theorem 2-1

meration function g, we will construct a randomized polynomial-time algo-rithm to decide whether the input graphs G and H are isomorphic. Let nbe the number of vertices in G and H and let q(n) ≥ n be a polynomial tobe specified later. As discussed above, we randomly pick q(n) permutationsψ1, . . . , ψq(n) from Sn and, for each ψi, permute either G or H. Our choiceof applying ψi to either G or H can be represented by a single bit. So, abit vector ~b ∈ 0, 1q(n) and the permutations ψ1, . . . , ψq(n) fully specify ourrandom choices. Let bi be the ith bit of ~b and Xi be the result of applyingthe permutation ψi; that is,

Xi =

ψi(H) if bi = 0ψi(G) if bi = 1.

Now, consider the instances of the graph isomorphism problem:Proof of Theorem 2-2

(G,X1), . . . , (G,Xq(n)). Note that, if G is not isomorphic to H, then

χGI((G,X1), . . . , (G,Xq(n))) = ~b,

since G is isomorphic to Xi only when Xi = ψi(G). On the other hand, ifG is isomorphic to H, then our choice of applying ψi to G or H does notchange whether G is isomorphic to Xi. So, in this case,

χGI((G,X1), . . . , (G,Xq(n))) = 1q(n).

Next, we use the Combining Lemma on (G,X1), . . . , (G,Xq(n)) to con-Proof of Theorem 2-3

struct a graph F such that #GA(F) provides enough information to com-pute χGI((G,X1), . . . , (G,Xq(n))). Let r(n) be a polynomial upper bound

17

Chicago Journal of Theoretical Computer Science 1999-1

Page 20: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §5

on the number of vertices in F . If we could compute #GA(F) directly,then we could immediately determine whether G ' H by checking whether#GA(F) corresponds to the case where χGI((G,X1), . . . , (G,Xq(n))) is ~b or1q(n).11 However, we cannot compute #GA(F) directly, so we use the enu-merator for #GA(F) instead. Let T and S be the reduction functions fromthe Combining Lemma. (We used T on (G,X1), . . . , (G,Xq(n)) to obtain thegraph F .) Since we assume that #GA is p(n)-enumerable, in polynomialtime we can compute g(F), a set of polynomially many values, one of whichis #GA(F). For each value in g(F), we use the S function from the Com-bining Lemma to determine a possible value for χGI((G,X1), . . . , (G,Xq(n))).Call the set of all such values

POSS = S(n, q(n), N) | N ∈ g(F) .If G 6' H, then ~b = χGI((G,X1), . . . , (G,Xq(n))). Thus, ~b must be an elementof POSS since χGI((G,X1), . . . , (G,Xq(n))) is always an element of POSS. Onthe other hand, if G ' H, then ~b ∈ POSS occurs with very low probability.(This will be proven below.) Therefore, the strategy for our randomizedalgorithm is to accept (G,H) if and only if ~b 6∈ POSS. Figure 2 summarizesProcedure R-ISO, the randomized algorithm to determine whether G ' H.

If G 6' H, then Procedure R-ISO outputs NO with probability 1. WeProof of Theorem 2-4

need to show that, if G ' H, then Procedure R-ISO outputs YES with highprobability. Intuitively, it is unlikely for ~b ∈ POSS when G ' H becausePOSS is completely determined by F and the same F can be the result ofexponentially many random choices. We prove this formally by showing thatfor each of choice of ~b and ψ1, . . . , ψq(n) made by Procedure R-ISO, thereis a block of 2q(n) random choices that produces the same graph F . Eachrandom choice within a block has a distinct ~b. Thus, within each block, theprobability that ~b ∈ POSS is at most p(r(n))/2q(n). Furthermore, we willshow that the blocks form a partition of the set of all random choices madeby Procedure R-ISO. Thus, the overall probability that ~b ∈ POSS is alsobounded by p(r(n))/2q(n).

The blocks are defined as follows. Assume that G is isomorphic to H.Proof of Theorem 2-5

Since permutations are invertible, for every graph Y isomorphic to G, thereexists a permutation ρ such that ρ(H) = Y . Now, fix a sequence of per-mutations σ1, . . . , σq(n) ∈ Sn and let Yi = σi(G). Let ρ1, . . . , ρq(n) be the

11The exception is the pathological case where we chose ~b = 1q(n). However, this caseonly occurs with probability 1/2q(n).

18

Chicago Journal of Theoretical Computer Science 1999-1

Page 21: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §5

Procedure R-ISO(G,H)

1. Randomly pick ~b ∈ 0, 1q(n) and ψ1, . . . , ψq(n) ∈ Sn.

2. Use the Combining Lemma to construct

F = T ((G,X1), . . . , (G,Xq(n))).

3. Use g to generate the possible values of #GA(F).

4. Compute the set POSS = S(n, q(n), N) | N ∈ g(F).

5. If ~b 6∈ POSS then output YES, otherwise output NO.

Figure 2: Randomized procedure to determine whether the graphs G and Hare isomorphic.

corresponding permutations such that ρi(H) = Yi. Let ~b be any bit vectorchosen by Procedure R-ISO. Then, there exists a choice of ψ1, . . . , ψq(n) suchthat the graph Xi constructed in Procedure R-ISO is exactly Yi, namely:

ψi =

ρi if bi = 0σi if bi = 1.

Furthermore, if we fix an isomorphism τ from H to G, the permutation ψi iscompletely determined by bi and σi — i.e., ψi = σi

τ if bi = 0 and ψi = σi ifbi = 1. Thus, we can associate the permutations σ1, . . . , σq(n) with a block of2q(n) random choices for Procedure R-ISO (since there are 2q(n) different bitvectors~b). To see that every choice of~b and ψ1, . . . , ψq(n) corresponds to someblock, simply note that we can set σi = ψi

τ−1 if bi = 0 and σi = ψi if bi = 1.This will again guarantee that Yi = Xi for every i. Therefore, the blocks doform a partition of the set of all random choices made by Procedure R-ISO.

Finally, observe that for each of the 2q(n) distinct bit vectors ~b in a block,Proof of Theorem 2-6

the same instances of GI, (G,X1), . . . , (G,Xq(n)), are constructed by Proce-dure R-ISO. Thus, the same set POSS is generated. Since POSS has p(r(n))elements and since p(r(n)) is polynomially bounded, the probability that arandomly chosen ~b is not an element of POSS is at least 1 − p(r(n))

2q(n) . Thus,for q(n) large enough, Procedure R-ISO will accept with high probability in

19

Chicago Journal of Theoretical Computer Science 1999-1

Page 22: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §6

the case that G ' H.

Proof of Theorem 2 2

As before, we can translate the non-enumerability of #GA into lower5-4

bounds on its bounded query complexity using Fact 1.

Corollary 2 If there exists an X such that #GA ∈ PFX[O(log n)], then GI ∈R.

6 Subexponential enumeration

The results of the preceding section can be interpreted as lower bounds on6-1

the enumerability of #GA since it seems unlikely that GI ∈ P or GI ∈ R.In this section we provide an upper bound on the enumerability of #GA byshowing that #GA is exp(O(

√n log n))-enumerable. Our enumerator will

be oblivious. That is, given a graph G with n vertices and an index `, theoutput of this enumerator g(G, `) will depend only on n and `. We think of` as being an encoding of the order of a permutation group A of degree n.We must show that an appropriate encoding exists such that ` takes spaceO(

√n log n) and the function ` 7→ |A| is computable in polynomial time.

Definition 5 Let Sn be the group of all permutations of Ω = 1, . . . , nunder composition. A subgroup A of Sn, written A ≤ Sn, is also called apermutation group of degree n and Ω is called the permutation domain of A.The order of the subgroup A, written |A|, is the number of permutations inA.

Lemma 6 Let A be a subgroup of Sn. Let pi be the ith prime. Then |A|must be of the form

∏mi=1 p

dii where

1. for all i, di ≤ n.

2. m ≤ n/ lnn+ o(n/ lnn).

Proof of Lemma 6 Let m and d1, . . . , dm be such that |A| =∏m

i=1 pdii .

Since |A| is a divisor of n!, we know that for all i, pdii divides n!. However,

for any prime p, the highest power of p dividing n! is pd, where

d =∑j≥1

⌊n

pj

⌋< n

∑j≥1

1pj

=n

p− 1≤ n.

20

Chicago Journal of Theoretical Computer Science 1999-1

Page 23: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §6

(This formula simply counts the number of positive integers up to n that aredivisible by p, p2, and so on.) In particular, all the prime factors of |A| are≤ n. The Prime Number Theorem states that

limn→∞

π(n)n/ lnn

= 1,

where π(n) is the number of primes less than or equal to n. Thus, m ≤n/ lnn+ o(n/ lnn).

Proof of Lemma 6 2

Theorem 3 #GA is exp(O(√n log n))-enumerable via an oblivious enumer-

ator.

Proof of Theorem 3 LetG be a graph. The set of automorphisms ofG is asubgroup of Sn; hence, #GA(G) must be of the form specified in Lemma 6.We show how to enumerate all possible sizes of the subgroups of Sn. Wedescribe this in the form of a compressed encoding of orders of subgroups ofSn, such that the encoding lengths are O(

√n log n) and, given the encoding

of |A|, we can compute |A| in polynomial time. One method would be tosimply write down the binary representations of the di, for 1 ≤ i ≤ π(n).By Lemma 6, the number of bits used would be O(n), which is too many.However, we will use this technique for “small” primes.

Let k =√n log n. Then π(k) = O(k/ log n) = O(

√n/ log n). ForA ≤ Sn,6-2

the first part of the encoding of A will consist of the binary representationsof the di for pi ≤ k. This encoding uses O(π(k) log n) = O(

√n log n) bits, as

desired. To encode the exponents of the larger primes, we must use detailedknowledge of the possible orders of subgroups of Sn. However, our task willbe greatly simplified by the fact that we can now ignore the small primes.

Let Ω denote 1, . . . , n. For x ∈ Ω, xA denotes the A-orbit of x defined6-3

by:xA = y ∈ Ω | (∃ ψ ∈ A)[y = ψ(x)] .

We say that an orbit is trivial if it has one element, and we say that A istransitive if Ω is an orbit. In any case, the A-orbits partition Ω. We describetwo divide-and-conquer techniques based on this partition. Let ∆ = xA bean A-orbit, and let Ax denote the subgroup ψ ∈ A | ψ(x) = x of thosepermutations that fix x. It is well known that

|A| = |Ax| · |∆|,21

Chicago Journal of Theoretical Computer Science 1999-1

Page 24: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §6

so if |∆| has only prime factors ≤ k, we may replace A by Ax for the purposesof the second part of the encoding. We henceforth assume that all nontrivialorbits ofA have orders divisible by some prime larger than k (so, in particular,there are at most

√n/ log n nontrivial orbits). Actually, we make the more

general assumption that, for any proper subgroup B of A, the index |A|/|B|is divisible by a prime larger than k.

Now suppose that |∆| = m, and let B be the subgroup of Sm obtained6-4

from A by ignoring the action outside of ∆. That is, B consists of thosepermutations ψ ∈ Sm for which there exist ψ′ ∈ A such that ψ′ is an extensionof ψ. Let A∆ denote the subgroup of A that fixes every point of ∆ (i.e., Ais the subgroup of pointwise stabilizers of ∆ in A). Then |A| = |B| · |A∆|,and to encode |A| it suffices to first encode |B| and then recursively encode|A∆|. The number of orbits ∆ that need to be considered is O(

√n/ log n),

so we must use no more than O(log n) bits to encode |B|. To do this, wemake great use of the fact that B is transitive.

Now suppose that ∆1, . . . ,∆r is a partition of ∆ with 1 < r < m such6-5

that B permutes the ∆i. If several such partitions exist, then choose onethat minimizes r. Then the partition is called a system of imprimitivity forB, and the ∆i are called blocks of imprimitivity. Since B acts transitivelyon the set of blocks, B has a subgroup of index r, from which we concludethat r is divisible by some prime p > k. Let N be the subgroup of B thatfixes the blocks, i.e., any x ∈ N sends each ∆i to itself. Let K be thesubgroup of Sr obtained from B by considering the action on the blocks.Then |B| = |N | · |K|. In addition, every orbit of N has order less than k, so|N | is a product of primes whose values are at most k. Thus, to encode |B|,it suffices to encode |K|. By minimality of r, K is primitive, i.e., preservesno nontrivial partition of the permutation domain.

Much is already known about the structure of primitive groups. The6-6

O’Nan–Scott Lemma [Cam81, Theorem 4.1] classifies them into several types.Many of these are ruled out by our assumption that the index of any propersubgroup of K is divisible by some prime larger than k (where k2 is biggerthan r, the size of the permutation domain). In fact, it must be the casethat K has a simple normal subgroup T . Further, either |T | = r and Kis a subgroup of the automorphism group of T × T , or K is a subgroup ofthe automorphism group of T . Following the Classification of Finite Sim-ple groups, much is known about the permutation representations of finitesimple groups [BKL83]. In particular, either T is one of polynomially manyalternating or classical groups (each of which can be described by a string of

22

Chicago Journal of Theoretical Computer Science 1999-1

Page 25: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms §7

length O(log n)), or |K| is polynomially bounded. In the first case |K|/|T | ispolynomially bounded, so in either case O(log n) bits suffice to describe theorder of K.

We summarize the encoding of |A|. First, we write down the binary6-7

representations of the exponents of the primes in |A| for all primes p ≤ k.Then, we write down a sequence of O(n/k) pairs (〈T 〉, N), where 〈T 〉 isan O(log n)-length name of a group T that is either the trivial group or aclassical group with a permutation representation of degree ≤ n and N is apositive integer (written in binary) that is at most nc for some constant c.For primes p > k, the p-part of |A| is the product of the p-parts of the N ’sand the orders of the T ’s. The order of T is given by an explicit formula, so|A| can be computed in polynomial time from its encoding. The first partof the encoding uses O(π(k) log n) bits; the second part of the encoding usesO((n/k) log n) bits. Both of these quantities are O(

√n log n) as desired.

Proof of Theorem 3 2

7 Discussion

Several open problems remain on the enumerability of #GA. We have shown7-1

that if #GA is poly-enumerable, then GI ∈ R. For SAT, we know that if#SAT poly-enumerable, then P = PP [ABG90, CH91], which implies thatSAT ∈ P. For #GA, it remains open whether #GA being poly-enumerablecould imply that GI ∈ P. It might even be possible to show that, if #GA is2nε-enumerable for some ε < 1/2, then GI ∈ P. Such a theorem would notviolate our upper bound that #GA is exp(O(

√n log n))-enumerable. Note

that an analogous result for #SAT, that #SAT is 2nε-enumerable impliesSAT ∈ P, is not known.

While no polynomial-time algorithms for GI or #GA have been discov-7-2

ered, algorithms with subexponential running time do exist. For example,there exists an algorithm with time complexity exp(O(

√n log n)) that com-

putes the automorphism group and its generators [BKL83] (this is harderthan solving GI and #GA). This algorithm combines the techniques ofseveral authors including Babai, Luks, and Zemlyachenko. The bound onthe running time is the same as the upper bound on the enumerabilityof #GA that we achieved in Section 6. This striking observation bringsup the possibility of the following time-enumeration trade-off. By allowingthe enumerator to run for longer than polynomial time, for example, time

23

Chicago Journal of Theoretical Computer Science 1999-1

Page 26: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms

exp(O((n log n)a +log n)), it might be possible to achieve exp(O((n log n)b))-enumerability for a + b = 1/2. Note that the case a = 1/2 is given by thesubexponential-time algorithm mentioned above [BKL83], and the case a = 0is our upper bound. The case 0 < a < 1/2 is open.

We remark that for oblivious enumeration, our upper bound is tight up7-3

to some logarithmic factors in the exponent. To see this, let k =√n log n as

in Section 6. Since kπ(k) = O(n), the sum of the primes up to k is O(n). Byscaling k by a constant factor, we may achieve that π(k) = Ω(

√n/ log n) and

the sum of the primes less than k is ≤ n. So, for any subset S of the primesp ≤ k, there is a permutation group of degree n whose order is the product ofthe primes in S (the group is generated by disjoint cycles of prime lengths).This gives us exp(Ω(

√n/ log n)) different orders of permutation groups of

degree n. It is straightforward to obtain the same lower bound for the numberof distinct orders of automorphism groups of graphs of degree n. Thus,oblivious enumeration seems to have reached its limit, but it remains openwhether or not a clever use of polynomial-time computable graph propertieswould yield a better, non-oblivious enumerator.

Finally, we note that the reduction of Section 5 can be used even if the7-4

enumeration is not polynomial. (It would yield a randomized algorithm forGI that has super-polynomial running time.) Roughly speaking, the reduc-tion can be used as long as the enumerability is less than about exp(n1/2−ε)(so, not surprisingly, an oblivious enumerator is useless for this purpose).In order to beat the subexponential running time of the existing algorithm[BKL83], the enumerability would have to be about exp(n1/4−ε) (however,the enumerator would not have to be restricted to polynomial time).

Acknowledgments

The authors would like to thank Laszlo Babai for helpful comments on thetopics of this paper, and Dave Mount for proofreading.

Acknowledgment of support: Dr. Beals’s work was supported in partby an NSF Mathematical Sciences Postdoctoral Fellowship and by the Al-fred P. Sloan Foundation. Dr. Chang’s work was supported in part by Na-tional Science Foundation grants CCR-9309137 and CCR-9610457, and bythe University of Maryland Institute for Advanced Computer Studies. Dr.Gasarch’s work was supported in part by National Science Foundation grant

24

Chicago Journal of Theoretical Computer Science 1999-1

Page 27: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms (Ref)

CCR-9301339. Dr. Toran’s work was done while he was at Dept. Llenguatgesi Sistemes Informatics, Universitat Politecnica de Catalunya, Pau Gargallo5, E-08028 Barcelona, Spain, and was supported in part by the EuropeanCommunity through the Espirit BRA Program (project 7141, ALCOM II).

References

[ABG90] A. Amir, R. Beigel, and W. I. Gasarch. Some connec-tions between bounded query classes and non-uniform com-plexity. In Proceedings of the 5th Structure in Complex-ity Theory Conference, pages 232–243. IEEE Computer Soci-ety Press, 1990. A much expanded version has been sub-mitted to Information and Computation and is available viahttp://www.eecs.lehigh.edu/ beigel/.

[BDG88] J. L. Balcazar, J. Dıaz, and J. Gabarro. Structural ComplexityI, volume 11 of EATCS Monographs on Theoretical ComputerScience. Springer-Verlag, Berlin, 1988.

[BDG90] J. L. Balcazar, J. Dıaz, and J. Gabarro. Structural ComplexityII, volume 22 of EATCS Monographs on Theoretical ComputerScience. Springer-Verlag, Berlin, 1990.

[Bei87a] R. Beigel. Query-Limited Reducibilities. PhD thesis, StanfordUniversity, 1987. Also available as Report No. STAN-CS-88-1221.

[Bei87b] R. Beigel. A structural theorem that depends quantitatively onthe complexity of SAT. In Proceedings of the 2nd Structure inComplexity Theory Conference, pages 28–32. IEEE ComputerSociety Press, June 1987.

[Bei91] R. Beigel. Bounded queries to SAT and the Boolean hierarchy.Theoretical Computer Science, 84(2):199–223, July 1991.

[BKL83] L. Babai, W. M. Kantor, and E. M. Luks. Computational com-plexity and the classification of finite simple groups. In Proceed-ings of the IEEE Symposium Foundations of Computer Science,pages 162–171. IEEE Computer Society Press, 1983.

25

Chicago Journal of Theoretical Computer Science 1999-1

Page 28: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms (Ref)

[BYGM82] L. Babai, D. Yu, Y. Grigoryev, and D. Mount. Isomorphism ofgraphs with bounded eigenvalue multiplicity. In ACM Sympo-sium on Theory of Computing, pages 310–324, 1982.

[Cam81] P. J. Cameron. Finite permutation groups and finite simplegroups. Bulletin of the London Mathematical Society, 13:1–22,1981.

[CGL97] R. Chang, W. I. Gasarch, and C. Lund. On bounded queriesand approximation. SIAM Journal on Computing, 26(1):188–209, February 1997.

[CH89] J. Cai and L. A. Hemachandra. Enumerative counting is hard.Information and Computation, 82(1):34–44, July 1989.

[CH91] J. Cai and L. A. Hemachandra. A note on enumerative counting.Information Processing Letters, 38(4):212–219, 1991.

[Cha96] R. Chang. On the query complexity of clique size and maxi-mum satisfiability. Journal of Computer and System Sciences,53(2):298–313, October 1996.

[FM80] I. S. Filotti and J. N. Mayer. A polynomial-time algorithm fordetermining the isomorphism of graphs of fixed genus. In ACMSymposium on Theory of Computing, pages 236–243, 1980.

[GMR89] S. Goldwasser, S. Micali, and C. Rackoff. The knowledge com-plexity of interactive proof systems. SIAM Journal on Comput-ing, 18(1):186–208, 1989.

[Hof79] C. M. Hoffman. Group-Theoretic Algorithms and Graph Iso-morphism, volume 136 of Lecture Notes in Computer Science.Springer-Verlag, Berlin, 1979.

[HT71] J. E. Hopcroft and R. E. Tarjan. A V 2 algorithm for determiningisomorphism of planar graphs. Information Processing Letters,1(1):32–34, 1971.

[HW74] J. E. Hopcroft and J. K. Wong. A linear time algorithm forisomorphism of planar graphs. In ACM Symposium on Theoryof Computing, pages 172–184, 1974.

26

Chicago Journal of Theoretical Computer Science 1999-1

Page 29: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms (Ref)

[HW79] G. Hardy and E. Wright. An Introduction to the Theory of Num-bers. Clarendon Press, Oxford, 5th edition, 1979.

[Kre88] M. W. Krentel. The complexity of optimization problems. Jour-nal of Computer and System Sciences, 36(3):490–509, 1988.

[KST93] J. Kobler, U. Schoning, and J. Toran. The Graph IsomorphismProblem: Its Structural Complexity. Progress in TheoreticalComputer Science. Birkhauser, Boston, 1993.

[LT93] A. Lozano and J. Toran. On the nonuniform complexity of thegraph isomorphism problem. In K. Ambos-Spies, S. Homer,and U. Schoning, editors, Complexity Theory: Current Research,pages 245–273. Cambridge University Press, Cambridge, 1993.Shorter version in Proceedings of the 7th Structure in ComplexityTheory Conference, pages 118–129, June 1992.

[Luk82] E. Luks. Isomorphism of bounded valence can be tested in poly-nomial time. Journal of Computer and System Sciences, 25:42–65, 1982.

[Mat79] R. Mathon. A note on the graph isomorphism counting problem.Information Processing Letters, 8:131–132, 1979.

[Mil80] G. L. Miller. Isomorphism testing for graphs of bounded genus.In ACM Symposium on Theory of Computing, pages 225–235,1980.

[Owi89] J. C. Owings, Jr. A cardinality version of Beigel’s nonspeeduptheorem. Journal of Symbolic Logic, 54(3):761–767, September1989.

[RS62] J. B. Rosser and L. Schoenfeld. Approximate formulas for somefunctions of prime numbers. Illinois Journal of Mathematics,6:64–94, 1962.

[Sch76] C. P. Schnorr. Optimal algorithms for self-reducible problems.In Proceedings of the 3rd International Colloquium on Automata,Language, and Programming (ICALP), pages 322–337, Edin-burgh, 1976. Edinburgh University Press.

27

Chicago Journal of Theoretical Computer Science 1999-1

Page 30: Chicago Journal of Theoretical Computer Science · On Finding the Number of Graph Automorphisms ISSN 1073{0486. MIT Press Journals, Five Cambridge Center, Cambridge, MA 02142-1493

Beals et al. Number of Graph Automorphisms (Ref)

[Sch85] U. Schoning. Complexity and Structure, volume 211 of LectureNotes in Computer Science. Springer-Verlag, Berlin, 1985.

[Sch89] U. Schoning. Probabilistic complexity classes and lowness. Jour-nal of Computer and System Sciences, 39(1):84–100, December1989.

[Tod91] S. Toda. PP is as hard as the polynomial-time hierarchy. SIAMJournal on Computing, 20(5):865–877, October 1991.

[Val79] L. G. Valiant. The complexity of computing the permanent.Theoretical Computer Science, 8:189–201, 1979.

28

Chicago Journal of Theoretical Computer Science 1999-1