Here we explain a gadget construction for fixing any number of nodes in ... Here, v1,v2,···,vl+3 are l + 3 news vertices used in the gadget. Notice that v1 is the ...
On Isomorphism and Canonization of Tournaments and Hypertournaments V. Arvind, Bireswar Das and Partha Mukhopadhyay Institute of Mathematical Sciences C.I.T Campus,Chennai 600 113, India {arvind,bireswar,partham}@imsc.res.in
Abstract. We give a polynomial-time oracle algorithm for Tournament Canonization that accesses oracles for Tournament Isomorphism and Rigid-Tournament Canonization. Extending the Babai-Luks Tournament Canonization algorithm, we give an nO(k+log n) algorithm for canonization and isomorphism testing of k-hypertournaments, where n is the number of vertices and k is the size of hyperedges.
1
Introduction
Computing canonical forms for graphs (and other combinatorial and algebraic structures) is a fundamental problem. Graph canonization, in particular, is very well-studied for its close connection to Graph Isomorphism GRAPH-ISO. Let G be a class of graphs on n vertices closed under isomorphism. Then f : G −→ G is a canonizing function for G if for all X, X 0 ∈ G: f (X) ∼ = X and f (X) = f (X 0 ) if and only if X1 ∼ = X2 . I.e., f assigns a canonical form to each isomorphism class of graphs. E.g. we could define f (X) as the lexicographically least graph isomorphic to X. This particular canonizing function is computable in FPNP by prefix search, but it is NP-hard [BL83,Lu93]. Whether there is some canonizing function for graphs that is polynomial-time computable is a long-standing open question. No better bound than FPNP is known for general graphs (for any canonizing function). It is easy to see that GRAPH-ISO is polynomial-time reducible to graph canonization. It is an intriguing open question if the converse reduction holds. The seminal paper of Babai and Luks [BL83] takes a group-theoretic approach to the canonization problem. We explain the setting in some detail since we use their approach in our results. We first recall definitions and some basic facts about permutation groups [Wi64,Lu93]. A permutation group G is a subgroup of SymV , where SymV is the group of all permutations on an n-element set V . We write H ≤ G when H is a subgroup of G. The image of v ∈ V under g ∈ G is denoted v g . We apply permutations from left to right so that v gh = (v g )h . The set v G = {v g | g ∈ G} is the G-orbit of v, and G is transitive on V if v G = V for v ∈ V . The group hSi generated by a set S ⊆ SymV is the smallest subgroup of SymV containing S. Let G ≤ SymV be transitive on V . A subset B ⊆ V is a G-block if either B g = B or B g ∩ B = ∅, for each g ∈ G. For any transitive group G, the set V and the singleton sets {u}, u ∈ V are the trivial blocks. A transitive group G is primitive if it does not have any nontrivial blocks, otherwise it is imprimitive. If B is a G-block, then B g is also a G-block, for every g ∈ G. The collection of blocks {B g : g ∈ G} is a partition of V , called the B block system. Notice that G acts transitively on the B block system (since every g ∈ G naturally maps blocks to blocks). Call B ⊂ V a maximal block if there is no other block B 0 such that B ⊂ B 0 ⊂ V . Then, {B g : g ∈ G} is a maximal block system. An important fact is that G acts primitively on a maximal block system. For 4 ⊆ V , the set stabilizer for ∆, G∆ = {g ∈ G | ∆g = ∆}. g Let G ≤ Sn . For X1 , X2 ∈ G, we say X1 is G-isomorphic to X2 , denoted by X1 ∼ =G X2 if X2 = X1 for some g ∈ G. Suppose G is any class of graphs closed under G-isomorphisms. Assume w.l.o.g. that the vertex set of any n-vertex graph in G is [n]. Call CFG : G → G a canonizing function w.r.t. to G, if CFG (X) ∼ =G X, for X ∈ G, and X1 ∼ =G X2 iff CFG (X1 ) = CFG (X2 ), for X1 , X2 ∈ G. As G is closed under G-isomorphisms, G σ is closed under σ −1 Gσ-isomorphisms, for σ ∈ Sn . Thus, for a coset Gσ of G
we can define CFGσ (X) = CFσ−1 Gσ (X σ ). Finally, the canonical labeling coset CL(X, Gσ) is defined as {τ ∈ Gσ | X τ = CFGσ (X)}. Notice that CL(X, Gσ) = (G ∩ Aut(X))π for any π ∈ CL(X, Gσ). Babai and Luks [BL83] give a canonizing algorithm that exploits the group structure of G. The algorithm is recursive and works by a divide-and-conquer guided by the orbits and blocks of G. We briefly outline their algorithm for computing the canonical labeling coset CL(X, Gσ) of an n-vertex graph X = ([n], E) w.r.t. a coset Gσ ⊂ Sn . For n = 1, CL(X, Gσ) = Gσ. If G is not transitive, let V1 be the first Gorbit (defined by the natural ordering on [n]). Put V2 = [n] \ V1 . The algorithm computes CL(X, Gσ) recursively as CL(X|V2 , CL(X|V1 , Gσ)), where X|Vi is the subgraph of X induced by Vi . If G is transitive, we find the first — w.r.t. natural ordering of [n] — maximal G-block system on V . We compute from G the normal subgroup H that set-stabilizes each block in this block system. Let {τi }ki=1 be a set of coset representatives of H in G. Then Gσ = ∪ki=1 Hσi , where σi = τi σ for some τi ∈ G. Recursively compute CL(X, Hσi ) = Hi ρi for all i. Then sort the cosets so that X ρ1 = X ρ2 = · · · = X ρs < X ρs+1 ≤ · · · ≤ X ρk . s Output CL(X, Gσ) = hH1 , {ρi ρ−1 1 }i=1 iρ1 . The correctness of the algorithm is shown in [BL83]. We state the upper bound on its running time for an important class of groups (significant for tournaments). Theorem 1 (Babai-Luks Theorem). Suppose G ≤ Sn is a permutation group in the class Γd (i.e. all nonabelian composition factors of G are subgroups of Sd ), then a canonical labeling coset of an n-vertex graph X = (V, E) w.r.t. a coset Gσ of SymV , can be found in time nO(d) . Theorem 1 crucially uses the fact that primitive subgroups of Sn ∩ Γd are of size at most nO(d) [LS99]. An important application of this result is an nO(log n) algorithm for Tournament Canonization, T-CANON, and Tournament Isomorphism TOUR-ISO [BL83]. This algorithm exploits the fact that automorphism groups of tournaments are solvable groups (and hence in Γd for d = 1). Remark 1 (Generalized Babai-Luks theorem). A useful restatement of Theorem 1 that is applicable to the more general structures that arise in this paper (e.g. edge-colored tournaments or hypertournaments). Suppose Γ is a class of finite groups with the following property: for any primitive permutation group G ≤ Sn ∩ Γ we have |G| ≤ nc , where c > 0 is a fixed constant. Then, let R be the class of finite relational structures of any signature (For example, we can take R to be the class of all k-hypertournaments or the class of vertex-colored graphs etc). Consider the canonization problem for a structure X from R under permutation action by groups from Γ . Because of the bound on the primitive permutation groups in Γ , the Babai-Luks algorithm (Theorem 1) will compute a G-canonical form and the canonical labeling coset (G ∩ Aut(X))σ for X in polynomial time. The proof of this restatement is identical to Theorem 1’s proof. In this paper we study the complexity of canonization and isomorphism of tournaments as well as hypertournaments. A central motivation for our study is the question whether T-CANON is polynomial-time reducible to TOUR-ISO. While we are not able to settle this question, we prove an interesting weaker result: T-CANON has a polynomial-time oracle algorithm with oracle access to TOUR-ISO and an oracle for canonizing rigid tournaments. Rigid tournaments have no nontrivial automorphism. The other main result is an nO(k+log n) algorithm for canonization and isomorphism of k-hypertournaments which builds on [BL83] and uses quite different properties of the automorphism groups of hypertournaments. In this extended abstract we omit some proof details.
2
Gadget construction for Tournaments
In this section, we describe some results on TOUR-ISO useful for our polynomial-time oracle algorithm for presented in Theorem 6. A key technique that we often require is the “fixing” of a node in a
T-CANON
2
tournament. We say that a node v in a graph X is a fixpoint if v π = v for any automorphism π ∈ Aut(X). By the fixing of v in X we mean a construction that modifies X to another graph X 0 using a gadget so that in X 0 the vertex v is forced to be fixed. Here we explain a gadget construction for fixing any number of nodes in a tournament so that the resulting graph is again a tournament. We use it to show that the color-tournament isomorphism problem is polynomial-time many-one reducible to TOUR-ISO. As a consequence, we derive some facts related to tournament isomorphism and automorphism (Theorem 2), useful for canonization. 2.1
Vertex Fixing in Tournaments
Let u1 , u2 , · · · , ul be the nodes of a tournament T that we want to fix. The gadget we use is shown in Figure 1. Call the resulting tournament T 0 . T u1 u2 v1+3 v1+2 vl+1 vl ul−1 ul
v2
v1
Fig 1
Here, v1 , v2 , · · · , vl+3 are l + 3 news vertices used in the gadget. Notice that v1 is the unique vertex that beats all other vertices of T 0 . For 2 ≤ j ≤ l + 1, vj beats vk for k > j, and beats all the vertices of T except uj−1 . Vertex vl+2 beats vl+3 , and both vl+2 and vl+3 beat all vertices of T . The thick gray edge between v1 and T indicates that v1 beats all the vertices of T . All thick gray edges have similar meaning. Lemma 1. Any automorphism of T 0 fixes {u1 , u2 , · · · , ul }. Proof. Notice that v1 , v2 , v3 , · · · , vl are the unique vertices of in-degree 0, 2, 3, · · · , l, respectively. Hence they are fixed by any automorphism of T 0 . Also, vl+1 and vl+2 are the only vertices of in-degree l + 1. But, the directed edge (vl+1 , vl+2 ) forces the fixing of these two vertices by all automorphisms. As vi+1 has a unique incoming edge from ui , 1 ≤ i ≤ l, each of u1 , u2 , · · · , ul is fixed by all automorphisms of T 0 . 2.2
Search vs Decision for Tournament Isomorphism
For GRAPH-ISO it is known that the search and decision problems are polynomial-time equivalent to computing a generator set for the automorphism group Aut(X) of a graph X. In this section we prove similar results for tournaments. In fact, we give a general approach to proving this equivalence for any class of graphs and apply it to tournaments. For a class of graphs G, let GRAPH-ISOG denote the decision problem: GRAPH-ISOG = {hX1 , X2 i ∈ G×G | X1 , X2 are isomorphic}. Two vertex-colored graphs1 X1 , X2 ∈ G are said to be isomorphic if there is a color preserving graph isomorphism between them. We define colored Graph Isomorphism C-GRAPH-ISOG : C-GRAPH-ISOG = {hX1 , X2 i | X1 and X2 are vertex colored graphs from G and X1 ∼ = X2 }. The graph 1
In this paper, vertex and edge colorings are simply labels without any constraints like proper vertex/edge colorings etc.
3
automorphism problem is: GAG = {X ∈ G | X has a nontrivial automorphism}. Also for X ∈ G, let AUTG denotes the problem of computing a generating set for the automorphism group of G. Theorem 2. Let G be any class of graphs. If C-GRAPH-ISOG is polynomial-time many-one reducible to GRAPH-ISOG then 1. GAG is polynomial-time Turing reducible to GRAPH-ISOG . 2. Search version of GRAPH-ISOG is polynomial-time Turing reducible to decision version of GRAPH-ISOG . 3. AUTG is polynomial-time Turing reducible to GRAPH-ISOG . Proof. 1. Let X ∈ G be the given graph. In order to check if there is an automorphism of Aut(X) that maps vertex u to vertex v, we construct two colored graphs Xu and Xv from X as follows: Xu is a copy of X in which u is colored red and all other vertices are colored blue, and Xv is a copy of X in which v is colored red and all other vertices are colored blue. Clearly, (Xu , Xv ) ∈ C-GRAPH-ISOG iff some automorphism of X maps u to v. As C-GRAPH-ISOG is reducible to GRAPH-ISOG , we can test whether some automorphism of X maps u to v via a polynomial-time many-one (or Turing) reduction to GRAPH-ISOG . Note that X has a nontrivial automorphism iff for some pair of distinct vertices u and v, Xu and Xv are isomorphic. Putting it together gives us a polynomial-time Turing reduction from GAG to GRAPH-ISOG . 2. It is easy to see that the reduction of search version to decision version can be done using the same idea as described in the proof of part 1. 3. Let X be an instance of AUTG . The goal is to compute a generating set for Aut(X) in polynomial time using C-GRAPH-ISOG as oracle. This construction follows the standard way of building a strong generator set for Aut(X) by collecting all coset representatives for a pointwise stabilizer tower (see, e.g. [Lu93]). We give a brief outline. Let G0 = Aut(X) and V (X) = [n]. We will construct a tower of subgroups G0 ≥ G1 ≥ · · · ≥ Gm = {1} by their generating sets, where Gi = {g ∈ G0 | j g = j, 1 ≤ j ≤ i}. Suppose S is a generating set for Gi and {g1 , g2 , · · · , gl } are coset representatives of Gi in Gi−1 . Then S ∪ {g1 , g2 , · · · , g` } is a generating set for Gi−1 . Furthermore, ` ≤ n − i + 1 as the distinct coset representatives must map i to different points. Thus, the set of all coset representatives gives a generating set for G0 of size O(n2 ). Now we describe how to compute the coset representatives of Gi in Gi−1 . Notice that finding the coset representatives is equivalent to testing if Gi−1 ∩ Aut(X) has an automorphism that maps i to k for a k ≥ i + 1. We can reduce this to C-GRAPH-ISOG as follows: Take two copies X1 and X2 of X. Pick vertex k ≥ i + 1 in X2 . For 1 ≤ j ≤ i − 1, in both X1 and X2 color the vertex j using color j. Next, color both i ∈ V (X1 ) and k ∈ V (X2 ) using color i. The remaining vertices of both X1 and X2 are colored 0. Clearly, X1 ∼ = X2 iff k is in the orbit of i. We can test this with a query to GRAPH-ISOG , and by part 2 we can find the actual isomorphism. This gives us a distinct coset representative corresponding to k. Continuing thus, we can find all coset representatives. Clearly, this is a polynomial-time oracle procedure with queries to GRAPH-ISOG . We now show C-TOUR-ISO ≤Pm TOUR-ISO, implying that tournaments satisfy the conditions of Theorem 2. Theorem 3. Color tournament isomorphism problem is polynomial time many-one reducible to tournament isomorphism problem. Proof. Let T1 , T2 be tournaments with vertices colored using l distinct colors {c1 , c2 , · · · , cl }. Let Ci denotes the set of vertices colored with ci . Thus we can represent the tournaments as in Fig 2. Thick gray arcs indicate edges between any two distinct color class. 4
C1 Cl
C2 T1 (T2 ) Fig 2
Our reduction transforms T1 and T2 into uncolored tournaments T10 , T20 . We show the construction for T1 (Fig 3). Construction for T2 is likewise. u1
C1 C2
Cl
u2
ul T10
Fig 3
In T10 note that ui beats the vertices in each color class Cj with j 6= i, and ui is beaten by all vertices in color class Ci . Using the gadget of Section 2.1, we fix u1 , u2 , · · · , ul in T10 . Call the resulting tournament T100 . Likewise, T200 is obtained from T2 by first constructing T20 by introducing new vertices v1 , v2 , · · · , vl and then fixing them in T20 . vi has the same edge relation with all the color classes, as ui has. Clearly if T1 ∼ = T2 00 00 00 00 00 00 ∼ ∼ then T1 = T2 . Conversely, if T1 = T2 then any isomorphism must map ui in T1 to vi in T2 , for all i. Now, only the vertices in color class Ci beat ui . Thus any isomorphism between T100 and T200 must map the vertices in the color class Ci of T100 , to the vertices in color class Ci of T200 isomorphically. Thus T1 ∼ = T2 . Remark 2. We briefly discuss two other properties for TOUR-ISO. These have proved important in the study of GRAPH-ISO [KST93]. A language L ⊆ Σ ∗ has an AND function if there is a polynomial time computable function AND : Σ ∗ × Σ ∗ → Σ ∗ s.t AND(x, y) ∈ L iff x ∈ L and y ∈ L. We can define OR functions similarly. It is known that GRAPH-ISO has both OR and AND functions (see, e.g.,[KST93]). Using ideas from the proof of Theorem 3 we can show that TOUR-ISO has AND function. However, it is open whether TOUR-ISO has OR functions.
3
Canonical Labeling of Tournaments
Definition 1 (tournament). A directed graph T = (V, A) is a tournament if for each pair of distinct vertices u, v ∈ V , exactly one of (u, v) or (v, u) is in A. 5
Fact 4 The automorphism group of a tournament has an odd number of elements and, therefore, is a solvable group (follows from [FT63]). Theorem 5. [BL83, Theorem 4.1] There is an nO(log n) algorithm for T-CANON, the Tournament Canonization problem. We briefly sketch the proof of Theorem 5 as we will use ideas from it. Let T = (V, A) be a tournament with |V | = n. If T is not regular, partition V as V = ∪ki=1 Vi , where Vi ⊂ V are the vertices of out-degree i. Let Ti be the tournament induced by Vi . The algorithm recursively computes CL(Ti , SymVi ) = Hi ρi , for all i, where Hi = Aut(Ti ). Then, we set CL(T, SymV ) = CL(T, H1 ρ1 × H2 ρ2 × · · · × Hk ρk ) = CL(T, Hρ), where H = H1 × H2 × · · · × Hk and ρ = (ρ1 , ρ2 , · · · , ρk )). As each Hi is solvable, H is also a solvable group. So, CL(T, Hρ) can be computed in polynomial time by Theorem 1. Thus,Pif t(n) is the running time bound, for this stage of computation it satisfies the recurrence relation: t(n) = ki=1 t(ni ) + nO(1) , where ni = |Vi |. Now, suppose T is a regular tournament. Fix v ∈ V . Put V 0 = V \ {v} and let T 0 be the tournament induced by V 0 . We have the partition V 0 = V10 ∪ V20 , where V10 is the set of (n − 1)/2 vertices that beat v and V20 is the set of (n − 1)/2 vertices beaten by v. Let the tournaments induced by V10 and V20 be T10 and T20 , respectively. Next, the algorithm recursively computes CL(T10 , SymVi0 ) = Hi ρi for i = 1, 2. Compute CL(T 0 , SymV 0 ) = CL(T, H1 ρ1 × H2 ρ2 ). Repeat the process for all the vertices v ∈ V . From among these n cosets, we compute CL(T, SymV ) as the union of those cosets that give rise to the lex-least canonical labeling. It can be easily seen that this union will paste into a coset Aut(T )σ of Aut(T ) [BL83]. For this O(1) ). Solving the two recurrence relations case, t(n) satisfies the recurrence relation t(n) = n(t( n−1 2 )+n O(log n) for t(n) yields the running time bound n . We turn to the problem of this section: can T-CANON be polynomial-time reduced to TOUR-ISO? We do not know the answer. However, we make some progress on the problem by giving a polynomial-time oracle algorithm for T-CANON that accesses oracle TOUR-ISO with an additional oracle for canonizing rigid tournaments. Thus, canonizing rigid tournaments seems to be the bottleneck in reducing T-CANON to TOUR-ISO. Let RT-CANON denote the functional oracle for computing the canonical form of a rigid tournament. Since rigid tournaments have trivial automorphism groups, notice that the form trivially gives the canonical labeling coset as well. Theorem 6. There is a polynomial-time oracle algorithm for T-CANON that accesses oracles for TOUR-ISO and RT-CANON. Proof Sketch. Let T = (V, A) be the input tournament to be canonized. Denote by T-CANON(T ) the function computing the canonical labeling coset CL(T, SymV ) of T , where V is the vertex set of T . It has the following recursive description: T-CANON(T ):
1. Orbit computing: With oracle queries to TOUR-ISO and using the vertex fixing technique of Theorem 2 we can compute the partition of V into Aut(T )-orbits in polynomial time. 2. If orbits are singletons: This happens precisely when T is a rigid tournament. In this case we query the RT-CANON oracle to obtain a canonical form for T . 3. Single orbit: If V has only one orbit w.r.t. Aut(T ) then the tournament is vertex-transitive. As T is vertex-transitive it follows that T is regular. Now, we can individualize (fix) any vertex v of T , and find canonical labeling coset with respect to SymV 0 , where V 0 = V \ {v}, because each such v will give 6
rise to the same canonical form.2 Then v defines the partition V 0 = V1 ∪ V2 , where V1 is the set of all vertices that beat v and V2 is the set of all vertices beaten by v. As T is regular, |V1 | = |V2 | = (n − 1)/2. Suppose the tournaments induced by V1 and V2 are T1 and T2 respectively. Recursively compute H1 ρ1 := T-CANON(T1 ) and H2 ρ2 := T-CANON(T2 ). Let Tv be the tournament induced by V 0 . Applying Theorem 1 we compute T-CANON(Tv ) = CL(Tv , H1 ρ1 × H2 ρ2 ) in polynomial time as H1 and H2 are solvable, being automorphism groups of tournaments. This gives the canonical ordering for Tv . Placing v as the overall first vertex gives the canonical ordering for T . Let T 0 denote the resulting tournament (which is the canonical form for T ). Finally, the canonical labeling coset is easy to compute from T and T 0 with queries to TOUR-ISO by applying Theorem 2. 4. Nonrigid with more than one orbit: This is the general case when there is more than one orbit and T is not rigid. Let O1 , O2 , · · · , O` be the orbits of T . – [Case (a)] Let Ti be the tournament induced by Oi , for 1 ≤ i ≤ `. We first consider a case that yields an easy recursive step. Suppose not all Ti are isomorphic to each other (which we can easily find with queries to TOUR-ISO). Then we partition the Oj ’s into k collections S1 , S2 , · · · , Sk , where Si contains all orbits Oj such that the corresponding Tj ’s are all isomorphic. Now, for 1 ≤ j ≤ k, let Tˆj be the tournament induced by the union of the orbits in Sj . Recursively compute Hj ρj := T-CANON(Tˆj ) for all j. Then, we set T-CANON(T ) as CL(T, Hρ) — where H = H1 × H2 × · · · × Hk and ρ = (ρ1 , · · · , ρk ) — which can be computed in polynomial time using the Babai-Luks algorithm of Theorem 1 as each Hj , being the automorphism group of a tournament, is solvable. – [Case (b)] We are now in the case when the tournaments Ti induced by Oi are all isomorphic, for 1 ≤ i ≤ `. Since Ti are induced by orbits they are all regular tournaments. That forces |Oi | to be odd. Furthermore, all Oi are of same size since Ti are all isomorphic. Thus, |Oi | = t is an odd positive integer. Now, from the ` orbits of T , we will construct a tournament T with ` vertices. The vertices vi of T represent the orbits Oi . We still have to define the edges of T . To that end, let Xij denote the directed bipartite graph between Oi and Oj . As Oi and Oj are orbits of Aut(T ) and |Oi | = |Oj |, the directed bipartite graph Xij has the following property: there is a positive integer α such that, in the graph Xij , the indegree of each vertex in Oi is α and the outdegree of each vertex in Oj is α. Since |Oi | is odd, |Oi | − α 6= α. The edges of T can now be defined as follows: for 1 ≤ i 6= j ≤ `, (vi , vj ) is an edge in T if |Oi | − α > α, otherwise (vj , vi ) is an edge in T . Notice that T does not carry all the information about the original tournament T since the Xij have been replaced by single directed edges. We now color the edges (vi , vj ) of T by the isomorphism type of Xij . To that end, we first recursively compute Hi ρi := T-CANON(Ti ) for 1 ≤ i ≤ `. Then compute CL(Xij , Hi ρi × Hj ρj ) using Theorem 1 for each pair 1 ≤ i 6= j ≤ ` which actually canonizes each Xij . Now, we color the edges of T so that two edges (vi , vj ) and (vs , vt ) of T get the same color iff the corresponding directed bipartite graphs Xij and Xst are isomorphic (i.e. have same canonical forms as computed above). Let T 0 denote this edge-colored tournament obtained from T . Now, recursively we compute, Aut(T )ρ = T-CANON(T ). Then, as Aut(T ) is solvable, using the Babai-Luks algorithm (Theorem 1), we can compute H 0 ρ0 = CL(T 0 , Aut(T )ρ) in polynomial time. From ρ0 we obtain the canonical labeling of T 0 . This canonical labeling effectively gives a canonical ordering of the orbits Oi of T , since vertices of T 0 represent orbits of T . Within each orbit Oi , we already have the canonical labeling given by the recursive calls T-CANON(Ti ). This defines the entire canonical labeling for T . Let T 0 denote the resulting tournament, i.e., the canonical form obtained from T by the canonical labeling. Now, by Theorem 2, the canonical labeling coset is easily computable from T and T 0 with oracle queries to TOUR-ISO. 2
This is not true in the case of a tournament that is regular but not vertex transitive. Recall from proofsketch of Theorem 5 that n recursive calls are made in the regular case.
7
Claim. Step 3 correctly computes the canonical labeling coset of a vertex transitive tournament. Proof of Claim It suffices to argue that the computed canonical form is independent of the choice of v. The proof is by an induction on n. Let u and v be two vertices. Let Tu and Tv be the tournaments induced by V \ {u} and V \ {v} respectively. Furthermore, let Tu1 , Tu2 be the tournaments induced by in-neighbors and out-neighbors of u. Similarly, define Tv1 , Tv2 for v. Vertex transitivity of T implies that Tu ∼ = Tv1 , = Tv , Tu1 ∼ ∼ and Tu2 = Tv2 . Consequently, by induction we have T-CANON(Tu ) = T-CANON(Tv ). It easily follows that we get the same canonical form for T by choosing either u or v as first vertex. Claim. In Step 4 Case(b), H 0 ρ0 is the canonical labeling coset for T 0 . Proof of Claim This follows directly from the following property of the canonical labeling coset (Theorem 1 and Remark 1). Suppose T = (Vˆ , A). Recall that T 0 is obtained from T by coloring its edges in some manner. Then we have CL(T 0 , SymV ) = CL(T 0 , CL(T , SymVˆ )). As CL(T , SymVˆ ) = Aut(T )ρ, the claim follows. The correctness of the algorithm follows from the above claims. We now analyze the running time. Let T (n) bound the running time. In Step 1, we compute the orbits in polynomial time with queries to the TOUR-ISO oracle. If the tournament is rigid then we canonize it with a single query to RT-CANON. The remaining steps involve recursive calls. The recurrence relation for T (n) in Step 3 is T (n) = 2T ((n − 1)/2) + nO(1) , and in Step 4a it is given by T (n) = `T (n/`) + nO(1) for ` > 1 because we need to compute the canonicalP labeling coset for ` tournaments induced by n/l-sized orbits. For Step 4 Case (b), the recurrence is T (n) = ki=1 T (ni ) + nO(1) . It follows by induction that T (n) = nO(1) . Remark 3. It seems unlikely that a similar reduction can be carried out for general graphs. This is because our reduction heavily uses the fact that the automorphism group of tournaments are solvable and hence in Γd , enabling us to use Theorem 1. In case of general graphs, it is unlikely that in the intermediate stages of recursion we will have groups in Γd (or even Γ : see Remark 1) to canonize with.
4
Hypertournament Isomorphism and Canonization
Hypertournaments are a generalization of tournaments and are well-studied by graph theorists over the years (see e.g. [GY97,PT05]). We recall the definition. Definition 2 (Hypertournament). Given positive integers n and k, a k-hypertournament T on n vertices is a pair (V, A) where V is a set of n vertices and A is a set of k-tuples of vertices called arcs so that for each subset S ∈ Vk , A contains exactly one of the (k! many) k-tuples whose entries belong to S. Hypergraph Isomorphism (HGI) is polynomial-time many-one equivalent to GRAPH-ISO. Thus, known complexity-theoretic upper bounds for GRAPH-ISO like NP∩coAM and SPP apply to HGI. However, consider an instance of HGI: (X1 , X2 ), with n vertices and m hyperedges each. The reduction to GRAPH-ISO maps it to a pair of graphs (Y1 , Y2 ) with vertex sets of size m + n. The best known isomorphism testing √algorithm due √ n lg n to Luks and Zemlyachenko (see [BL83]) which has running time c will take time c (m+n) lg(m+n) when combined with the above reduction and applied to HGI. In [Lu99] a different, dynamic-programming based algorithm with running time 2O(n) was developed. Motivated by the above we study the analogous question for hypertournaments in this section. We consider k-Hypertournament Isomorphism (denoted by HYPER-TOUR-ISOk ) and give an nO(k+log n) algorithm for the problem for k-hypertournaments, for each k. In fact, we actually give an nO(k+log n) algorithm for the corresponding canonization problem. We first establish some observations about hypertournaments. We are interested in automorphisms of k-hypertournaments. 8
Lemma 2. For k ≥ 2, the automorphism group Aut(T ) of a k-hypertournament T has the following property: for any prime factor p of k it holds that p does not divide the size of Aut(T ). Proof. Let T = (V, A). For k = 2, T is a usual tournament and in this case it is a well-known fact that Aut(T ) has odd cardinality. Suppose k > 2 and p is any prime factor of k. Suppose p divides Aut(T ). Let π ∈ Aut(T ) be an order p element. Since π ∈ Sym(V ), we can write it as a product of disjoint p-cycles, π = C1 C2 · · · C` , where the remaining n − p` elements of V are fixed by π. Let k/p = t. If k ≤ p` then let S = ∪ti=1 Ci . Notice that π maps S to S. Now, suppose e ∈ A is the unique hyperedge defined by S. Then eπ 6= e, since π reorders the sequence defining hyperedge e. Thus, eπ is not a hyperedge of T , contradicting π ∈ Aut(T ). If k > p`, choose S 0 as any subset of size k − p` of the n − p` points fixed by π, and let S = S 0 ∪ C1 ∪ · · · ∪ C` . Again, let e ∈ A be the hyperedge defined by S. Then eπ is not a hyperedge of T , since π will reorder the sequence defining e. Again, this contradicts π ∈ Aut(T ). Recall that a section of a group G is a quotient group of some subgroup of G. An easy corollary of the above lemma is the following. Corollary 1. For k ≥ 2, the automorphism group Aut(T ) of a k-hypertournament T does not have the alternating group Ak as section. Proof. For k = 2 (i.e. when T is a usual tournament) it is well known that Aut(T ) has odd cardinality. We consider the case k > 2. For, suppose Ak is a section of Aut(T ). Then |Ak | divides |Aut(T )|. As |Ak | = (k!)/2, k! divides 2|Aut(T )| which implies k divides |Aut(T )|. Thus, any prime factor of k divides |Aut(T )|, contradicting Lemma 2. Some notation: we denote by Ck the class of finite groups G such that Ak is not a section of G. Corollary 1 implies Aut(T ) ∈ Ck for any k-hypertournament T . This property is crucial for our canonization algorithm. First recall a celebrated result about primitive permutation groups not containing Ak as a section. Theorem 7. [BCP82,LS99] Let k be a positive integer and G ≤ Sn be a primitive group in Ck (i.e. G does not involve the alternating group Ak as a section), then |G| is bounded by nO(k) . At this point, in order to put Theorem 7 in perspective, we recall the discussion in Remark 1 explaining a general form of Theorem 1 applicable to hypertournaments. Let T = (V, A) be a k-hypertournament with n vertices. We define the i-degree of a vertex v ∈ V as the number dvi of hyperedges in which v occurs at the ith position, 1 ≤ i ≤ k. Thus, to each v ∈ V we can associate its degree vector (dv1 , dv2 , . . . , dvk ). We say T is a regular k-hypertournament if all v ∈ V have P the same degree vector (d1 , d2 , . . . , dk ). It is easy to see that di = n1 nk for each i and n ki=1 di = k nk . Moreover, each v ∈ V occurs in exactly n−1 k−1 hyperedges. We are now ready to prove the main result of this section. Theorem 8. There is an nO(k+log n ) time algorithm for canonizing k-hypertournaments. As a consequence, isomorphism testing for k-hypertournaments is in nO(k+log n) time. Proof Sketch. The algorithm is recursive and we give a high level description of its phases. Let T = (V, A) be the input k-hypertournament. Phase 0 k = 2 (usual tournament case): If k = 2 then we can invoke the Babai-Luks canonizing algorithm that runs in time nO(log n) . Phase 1 Vertex partitioning by degree vectors: If T is not regular, partition V as, V = V1 ∪ V2 ∪ · · · ∪ Vm , where Vi (1 ≤ i ≤ m) is the set of all vertices having the same degree vector, where the degree 9
vectors are sorted in lexicographic order. For 1 ≤ i ≤ m, let Ti be the k-hypertournament induced by Vi . We recursively compute CL(Ti , SymVi ) for all i. Let CL(Ti , SymVi ) = Hi ρi where Hi = Aut(Ti ) and ρi ∈ CL(Ti , SymVi ). Let H = H1 ×H2 ×· · ·×Hk amd ρ = (ρ1 , ρ2 , · · · , ρk ). Then CL(T, SymV ) = CL(T, Hρ). Notice that H is in Ck since each Hi is in Ck . Thus, by Theorem 1 and Remark 1, CL(T, Hρ) can be computed in time nO(k) . Repeated application of this phase eventually reduces the original hypertournament into an ordered set of regular k-hypertournaments, and it suffices to canonize each regular k-hypertournament in this list. In the next phase we explain the canonization of regular k-hypertournaments. Phase 2 Regular k-hypertournament phase: If k = 2 then we invoke Phase 0. So, k > 2 and T = (V, A) is a regular k-hypertournament. We will make n recursive calls, trying each of the n vertices v ∈ V as the first vertex in the canonical ordering. Among these, we will pick the lexicographically least ordering. We now describe one of these recursive calls after placing v as the first vertex. Using v, we will decompose T into a (k − 1)-hypertournament T 0 on n − 1 vertices and a k-hypertournament T 00 on n − 1vertices. Let n−1 0 A denote the set of the k−1 many (k − 1)-sequences obtained by taking each of the n−1 k−1 hyperedges of T containing v and dropping v from the sequence. Let V 0 = V \ {v}. Notice that T 0 = (V 0 , A0 ) is a (k − 1)-hypertournament. Let A00 denote all hyperedges of T not containing v. Then T 00 = (V 0 , A00 ) is a k-hypertournament. We recursively canonize T 0 . Let CL(T 0 , SymV 0 ) = Gρ. By Corollary 1, G ∈ Ck . Thus, invoking Theorem 1 (its general form explained in Remark 1) we can now directly canonize T 00 w.r.t. the coset Gρ in time nO(k) . Suppose that algorithm returns the coset CL(T 00 , Gρ) = Hv τv . From the collection {Hv τv }v∈V we can find the collection that gives the lexleast ordering. If several of these cosets give the least ordering then they will paste together into a single coset Aut(T )τ , which is CL(T, SymV ). For the overall algorithm, an easy inductive proof shows that CL(T, SymV ) computes a canonizing coset for the input k-hypertournament T . To analyze the running time, let t(n, k) denote the running time taken by the algorithm for n-vertex k-hypertournaments. Clearly, for Phase 1 and k > 2 we have t(n, k) = P m O(1) , and for Phase 2 and k > 2 we have t(n, k) = n(t(n − 1, k − 1) + nO(k) ). When i=1 t(|Vi |, k) + n k = 2, t(n, 2) = nc log n by Theorem 5. An easy induction yields t(n, k) = nO(k+log n) .
References ´ [BCP82] L. BABAI , P.J. C AMERON , AND P.P. P ALFY . On the order of primitive groups with restricted nonabelian composition factors. Journal of Algebra, 79:161–168, 1982. [BL83] L. BABAI AND E.M. L UKS . Canonical labeling of graphs. Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, pages 171–183, 1983. [FT63] W. F EIT AND J. T HOMPSON , Solvability of groups of odd order, Pacific Journal of Mathematics, 13, 775-1029, 1963. [GY97] G. G UTIN AND A. Y EO , Hamiltonian Paths and Cycles in Hypertournaments, Journal of Graph Theory, 25(4):277-286, 1997. ¨ ¨ ´ , The Graph Isomorphism Problem: Its Structural Complexity, Birkh¨auser, [KST93] J. K OBLER , U. S CH ONING AND J. T OR AN Boston, 1993. [LS99] M. L IEBECK AND A. S HALEV, Simple groups, permutation groups and probability, Journal of Amer. Math. Soc. 12, 497-520, 1999. [Lu82] E.M. L UKS , Isomorphism of graphs of bounded valence can be tested in polynomial time. Journal of Computer and System Sciences, 25(1):42–65, 1982. [Lu93] E.M. L UKS , Permutation groups and polynomial time computations. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 11:139–175, 1993. [Lu99] E.M. L UKS , Hypergraph isomorphism and structural equivalence of boolean functions. Proc. 31st ACM Symposium on Theory of Computing, 652–658. ACM Press, 1999. [PT05] V. P ETROVIC AND C. T HOMASSEN , Edge-disjoint Hamiltonian cycles in hypertournaments, Journal of Graph Theory, 51(1): 49-152, 2005. [Wi64] H. W IELANDT, Finite Permutation Groups, Acad.Press, New York, 1964.
10