SIAM J. DISCRETE MATH. c 2010 Society for Industrial and Applied Mathematics Vol. 24, No. 1, pp. 82–100

DISTINGUISHING CHROMATIC NUMBER OF CARTESIAN PRODUCTS OF GRAPHS ∗

† ‡ § JEONG OK CHOI , STEPHEN G. HARTKE , AND HEMANSHU KAUL

Abstract. χ G G k The distinguishing chromatic number D ( ) of a graph is the least integer such that there is a proper k-coloring of G which is not preserved by any nontrivial automorphism of G. We study the distinguishing chromatic number of Cartesian products of graphs by focusing on how much it can exceed the trivial lower bound of the chromatic number χ(·). Our main result is that for every graph G, there exists a constant dG such that for all d ≥ dG the distinguishing chromatic number of Gd is at most χ(G)+1, where Gd is the Cartesian product of d copies of G.Wealsoprove d ≥ d that for 5, the Cartesian product of complete graphs has distinguishing chromatic number at most one more than the corresponding chromatic number, and we determine the distinguishing chromatic number of hypercubes exactly. Key words. symmetry breaking, , distinguishing number, distinguishing chromatic number, Cartesian product of graphs, AMS subject classifications. 05C25, 05C15 DOI. 10.1137/060651392

1. Introduction. Aproperk-coloring of a graph is a coloring of its vertices using at most k colors such that no two adjacent vertices get the same color. The chromatic number χ(G) of a graph G is the minimum k such that G has a proper k -coloring. Proper coloring of graphs is a well-studied, fundamental concept in (see [16]). In this paper, we study those proper colorings of a graph that break all its symmetries, and consequently, uniquely identify each of its vertices. More precisely, a coloring f : V (G) →{1,...,k} of a graph G is said to be a distinguishing proper k-coloring of G if it is a proper coloring of G and the identity automorphism is the only color-preserving automorphism of G.Thedistinguishing chromatic number χ G G k G k D ( )of is the minimum such that has a distinguishing proper -coloring. The distinguishing chromatic number was introduced by Collins and Trenk [10] as a natural specialization of the distinguishing number of a graph. A distinguish- ing k-labeling and the distinguishing number of a graph are defined analogously to distinguishing proper k-coloring and distinguishing chromatic number, respectively,

without the restriction that the labeling be a propercoloring. Since its introduction by Albertson and Collins in [3], the distinguishing number of a graph has become an active area of research (see [2], [5], [7], [15], among others). A theme common to most results on the distinguishing number of graphs is that usually this parameter is the smallest value possible, 2 or 1 if a graph has only the

trivial automorphism. That is, two labels are often sufficient to break all symmetries of a given graph. This indicates that the distinguishing number of a graph does not strongly depend on its structure. A more pertinent point of view considers labeling a set (instead of a graph) that breaks all the actions ofa group acting on it (instead of

∗Received by the editors January 30, 2006; accepted for publication (in revised form) August 23, 2009; published electronically February 19, 2010. http://www.siam.org/journals/sidma/24-1/65139.html †Department of Mathematics, University of Illinois, Urbana, IL 61801 ([email protected]). ‡Department of Mathematics, University of Nebraska, Lincoln, NE 68588-0130 (shartke2@math. unl.edu). §Department of Applied Mathematics, Illinois Institute of Technology, Chicago, IL 60616 (kaul@ math.iit.edu).

82

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 83

the automorphism group of the graph). This general concept captures the real essence of distinguishing and indicates why algebraic techniques are more useful than graph theoretic methods. See [17], [8], [19], [9], and [20] for some of the related results. Similar concepts of distinguishing vertices of a graph through colorings, such as vertex-distinguishing edge-colorings of graphs (see, e.g., [1], [6], and [4]), have also

been considered by other researchers. Collins and Trenk [10] introduced distinguishing χ chromatic number D for some basic families of graphs. They also prove an analogue χ G ≤ G G of Brooks’ theorem for proper colorings by showing that D ( ) 2Δ( ), where Δ( ) is the maximum degree of G, and characterizing the corresponding extremal graphs.

Since the chromatic number χ(G)ofG is a trivial lower bound for χD (G), we are χ G χ G interested in finding conditions under which D ( )iscloseto ( ). In this paper, we consider the distinguishing chromatic number of Cartesian prod- ucts of graphs. The Cartesian product of two graphs G and H, denoted by G2H, is the graph with vertex set V (G2H)={(u, v) | u ∈ V (G),v ∈ V (H)}.Thevertex (u, v) is adjacent to the vertex (w, z) if either u = w and vz ∈ E(H)orv = z and uw ∈ E G ( ). Since this graph product is clearly commutative and associative (see G 2G 2 ...2G Gd 2d G [12]), this definition can be extended to 1 2 d, in particular = i=1 . Note that the d-dimensional hypercube Qd is defined to be a Cartesian product of 2d K χ G complete graphs i=1 2. Our results show that D ( ) can be at most one worse than χ(G)whenG is a large Cartesian product of graphs.

In this paper, all graphs that we consider are simple (i.e., with no loops or multi- edges) and connected, unless indicated otherwise. The notation lg indicates with base 2, and Z+ the positive integers. Our first result shows that there is a distinguishing proper coloring of a Cartesian product of complete graphs using at most one color more than the corresponding

chromatic number. Theorem. d ≥ t ≥ i ,...,d {t }≤χ 2d K ≤ Given 5 and i 2, =1 , max i D ( i=1 ti ) max {ti} +1. The bound for d in the above theorem is sharp. Also as a corollary to the above theorem we determine the distinguishing chromatic number of large hypercubes.

Theorem. χ (Qd)=3,ford ≥ 5. D A is a particular instance of a complete multipartite graph. We extend the above theorem on complete graphs to Cartesian products of complete multipartite graphs. Theorem. H 2r Hpi H If = i=1 i ,where i are distinct connected complete multipar- + d tite graphs with at least two vertices and pi ∈ Z ,thenχ(H) ≤ χ (2 H) ≤ χ(H)+1 D i=1 2lg ni d ≥ i ,...,r{ } ni Hi i ,...,r for max =1 pi +5,where are the orders of for =1 . As shown in the next section, χ(H)=maxi{χ(Hi )}. Note that the above theorem is unlikely to be true for a constant d. Collins and χ G G G Trenk showed in [10] that D ( ) equals the number of vertices in if and only if is a complete multipartite graph. Thus, the distinguishing chromatic number and the chromatic number of a complete multipartite graph can be arbitrarily far apart. By taking only a fixed number of products, we feel it is unlikely that the distinguishing chromatic number and the chromatic number of these graphs can be made almost

equal; see Conjecture 22 for a precise statement. χ G χ G G Our main result shows that D ( ) can be at most one more than ( )when is a large Cartesian power of any graph. Theorem. Let G be a connected graph with at least two vertices. Then there d exists an integer dG such that for all d ≥ dG, χ(G) ≤ χ (G ) ≤ χ(G)+1. D

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 84 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

p G 2r G i G G p ∈ Z+ Moreover, if = i=1 i ,with i distinct factors of and i ,then 2lg ni dG =maxi=1,...,r{ p } +5suffices, where ni is the order of Gi for i =1,...,r. i p Note that a “prime factorization” of a graph of the form G = 2r G i can be i=1 i found in polynomial time for any connected graph; prime factors of a graph are defined 2lg ni dG i ,...,r{ } in the next section. The function =max=1 pi + 5 is minimized for this prime factorization. Our results can be seen as analogous to recent results of [5], [7], [2], and [15] on a distinguishing number of graphs. Bogstad and Cowen [5] showed that the hypercubes

of dimension at least 4 have a distinguishing number equal to 2. Chan [7] proved further such results about some hypercube generalizations. Recently, Albertson [2] and Klavˇzar and Zhu [15] extended this result to show that two colors suffice to distinguish a large enough Cartesian power of a graph. Note that the distinguishing number of a graph is equal to 1 if and only if it has no nontrivial automorphisms.

Thus, for most interesting classes of graphs, at least one extra color will be required for distinguishing the vertices, and this one extra color is shown to suffice for Cartesian products of various graphs. Analogously, for the distinguishing chromatic number we show that using just one extra color than the minimum possible χ(G) colors is enough to give a distinguishing proper coloring for large enough hypercubes, Cartesian products of complete graphs, and Cartesian powers of any graph. Our main method of proof is to uniquely identify the vertices of a graph by reconstructing a canonical vector representation (defined in terms of the Cartesian product) using only the colors of the vertices and the structure of the graph. This shows that every color-preserving automorphism fixes each vertex and thus is the identity automorphism. 2. Preliminaries. Given a graph G, define the distance dG(u, v) between two

vertices u, v in G as the length of the shortest path between u and v. When the G underlying graph is unambiguous, we will drop from the subscript. As usual, the distance of a vertex u from a subset S of the vertex set is defined as the least d(u, v) for any v in S.Avertexv is an r-neighbor of a vertex u if d(u, v)=r.Weuse NG(v) to denote the (open) neighborhood of v, defined to be the set of vertices at distance 1 from v. NG[v] denotes the closed neighborhood NG(v) ∪{v} of v.The

distance function for the Cartesian product of graphs is coordinate-wise additive: G G 2G 2 ...2G d u ,...,u , v ,...,v d d u ,v Let = 1 2 d. Then, G(( 1 d) ( 1 d)) = i=1 Gi ( i i). Hamming distance of two vertices in the Cartesian product of graphs is defined as the number of positions where the corresponding coordinates are distinct. Also, G

is connected if and only if each Gi is connected. See [18] for basic graph theory

terms and definitions and [12] for more on the properties of the Cartesian (and other) products of graphs. Determining the chromatic number of Cartesian products of graphs has an elegant solution. We give an outline of the proof because the canonical coloring defined in the proof will be useful to us later on. Lemma 1. G 2d G χ G {χ G } Let = i=1 i.Then ( )=maxi=1 ,...,d ( i) . Proof. We may assume that χ(G1)=maxi=1,...,d {χ(Gi)}.Denoteχ(G1)by d t.Letfi be an optimal proper coloring of Gi, i =1 ,...,d. Define f : V (G) → {0, 1,...,t− 1} as

d d f (v1,v2,...,vd)= fi(vi)mod t. i=1

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 85

There is an edge between v and v in G if and only if they differ in only one coordinate,   d d   say vi and vi.So,vivi is an edge in Gi.Thenf (v) − f (v )=fi(vi) − fi(vi)which d is nonzero modulo t because fi is a proper coloring. Thus, f gives a proper coloring 2d G of i=1 i. We call f d, as defined above, the canonical proper coloring of a Cartesian product f of graphs, given the colorings i. AgraphH is said to be prime with respect to the Cartesian product if whenever ∼ H = H12H2, then either H1 or H2 is a singleton vertex (which we will call a trivial graph). Sabidussi (1960) and Vizing (1963) (see [12]) showed that if G is connected, then G has a unique factorization into prime graphs. Theorem 2 ( ). G G ∼ H 2H 2 Sabidussi–Vizing Let be a connected graph, then = 1 2 ...2Hd such that Hi is prime for 1 ≤ i ≤ d and the factorization is unique up to reordering and isomorphic copies of Hi’s. ∼ p1 p2 pd Moreover, G = G 2G 2 ...2Gd ,whereGi and Gj are distinct prime graphs 1 2 for i = j,andpi are constants. G G ,...,G Note that if is nontrivial, then 1 d are also nontrivial. The prime factorization of a graph can be found in polynomial time. See [12] for a O(mn)-time algorithm to find the prime factorization of a connected graph with n vertices and m edges. Theorem 2 allows us to define graphs G and H to be relatively prime (or co-prime) if there is no nontrivial graph that is a factor in both the prime factor decomposition of G and the prime factor decomposition of H. Clearly, two distinct prime graphs are relatively prime. The automorphisms of Cartesian products behave exactly as expected: All au- tomorphisms of a Cartesian product of graphs are induced by the automorphisms of the factors and by transpositions of isomorphic factors. This was proved 35 years ago by Imrich and Miller independently (see [12] for further details). Theorem 3 ( ). G 2d G ϕ ∈ Aut G Imrich–Miller Let = i=1 i.Then ( ) implies that

ϕ(v1,...,vd)=(ϕπ−11vπ−11,...,ϕπ−1ivπ−1 i,...,ϕπ−1dvπ−1d),

where π ∈ Sd, the symmetric group on d elements, such that ϕi : Gi → Gπi is an isomorphism for all i. p The vertices of the Cartesian product 2r G i are naturally given as elements i=1 i V G p2 × V G p2 ×···×V G pr of the Cartesian product ( 1) ( 2) ( r) . Sometimes it will be useful to refer to the vertices of a Cartesian product by a vector representation. Let G 2r Gpi t χ G ≥ n G = i=1 i ,where i = ( i) 2and i is the number of vertices of i.As usual, let t = χ(G)=maxi=1,...,r ti.ForeachGi, we fix an optimal proper coloring f V G →{, ,...,t − } G a ,a ,a ,...,a i : ( i) 0 1 i 1 . We order the vertices of i as 0 1 2 ni−1 f a f a n > f a t such that i( 0)=0, i( 1) = 1, and, if i 2, i( 2)=2mod i. We next label the vertices of Gi with distinct nonnegative integers ξi : V (Gi) → {0, 1, 2,...} such that ξi(a0)=0,ξi(a1)=1,ξi(a2)=2mod ti (if ni > 2), and generally ξi(x) ≡ fi(x)modti for i>2. A simple way to construct ξi is to order each

color class and then label the vertices with subsequent residues congruent to fi(x) t modulo i. We then represent a vertex v of V (G) as the vector

ξ x ,...,ξ x ,...,ξ x ,ξ x ,...,ξ x ,..., ( 1( 11) 1( 1p1 ) ( 1) ( 2) ( m) ξ x ,...,ξ x ,...,ξ x , ( p ) r( r1) r( rpr ))

where xm is the vertex from the m copy of G.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 86 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

ξ We use this vector representation with i because it encodes information about the vertex directly into the vector. It is purely a bookkeeping device that will simplify the exposition in our proofs. The vector representation is particularly useful when Gi is a complete multipartite graph: In the optimal coloring fi, the color classes are the

partite sets. Hence, d(u, v) = 1 if and only if ξi(u) ≡ ξi(v)modti. K ξ { , , } K {ξ a

d di f d v f v t, ( )= i( ij )mod i=1 j=1

v v ,v ,...,v ,v ,v ,...,v ,...,v ,v ,...,v ∈ V Hd f ∗ where =( 11 12 1d1 21 22 2d2 r1 r2 rdr ) ( ).Let be a proper coloring of Hd formed from f d by changing the color of some vertices to ∗. Then for every vertex v with color ∗,thecolorofv under f d can be determined. χ H {χ H } Proof.Since ( )=max i ( i) , we assume without loss of generality that χ H χ H D r p d d p d ≤ i ≤ r ( 1)= ( ). Let = i=1 i and i = i ,1 . f ∗ v ∗ v v ,v ,...,v ,v ,v ,...,v ,...,v , Suppose that ( )= ,where =(11 12 1d1 21 22 2d2 r1 v ,...,v ∈ V Hd H t r2 rdr ) ( ). Since 1 is a complete multipartite graph with partite

sets, the set C of colors in the closed neighborhood of v11 in H1 is C = {f1(x):x ∈ N v } { , ,...,t− } v H1 [ 11] = 0 1 1 . Hence, the colors in the closed neighborhood of in Hd Cd {f d x x ∈ N v } , = ( ): Hd [ ] contains the set d {f x x x ,x ,...,x ∈ N d v } ( ): =( 11 12 rdr ) H [ ] d = {f (x):x =(x ,v ,...,vrd ), where x ∈ NH [v ]} ⎧ 11 12 ⎫r 11 1 11 ⎪ ⎪ ⎪ ⎪ ⎨ ⎬ d = c + fi(xij ):c ∈ C ⎪ ⎪ ⎪ i=1,...,d ⎪ ⎩ j=1,...,d1 ⎭ ij=11 { , ,...,t− }. = 0 1 1

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 87

d Thus, every color of {0, 1,...,t− 1} except for f (v)appearsinNHd (v), the neigh- ∗ d ∗ borhood of v, under the proper coloring f . Hence, f (v) is determined by f .

3. Cartesian products of complete graphs and hypercubes. The main idea underlying our proofs is to uniquely identify the vertices of a graph by recon- structing their original vector representation using only the colors of vertices and the structure of the graph. In other words, every color-preserving automorphism fixes each vertex; that is, it is the identity automorphism. We set-distinguish sets of vertices and then distinguish the vertices in each set. The following lemma will be useful to identify vertices in a product of graphs. Lemma 5. G 2d G G d Let = i=1 i and suppose the vertices in are denoted by -tuples of integers such that the Hamming distance is a lower bound for distance in G.

Fix a vertex v ∈ G and suppose that wi,wj are two neighbors of v with i = j such v w i w j that and i differ in the th coordinate (resp., j and the th coordinate). Then the only neighbors of both wi and wj are v and the vector obtained from v by replacing its ith coordinate with the ith coordinate of wi and its jth coordinate with the jth coordinate of wj .

Proof. Suppose that w is a neighbor of both wi and wj . Hamming distance is G w w a lower bound on distance in ,so differs from i in exactly one coordinate and from wj in exactly one coordinate. Since wi and wj differ from each other only in coordinates i and j, either w differs from wi in coordinate i and wj in coordinate j,orw differs from wi in coordinate j and wj in coordinate i. These are the only

differences between w and wi,wj ,sow agrees with wi,wj in all but the ith and jth w coordinates. This means is one of the two vertices identified in the lemma. In this section, we give an upper bound on the distinguishing chromatic number of Cartesian products of complete graphs (also known as Hamming graphs) that is only one more than the trivial lower bound given by the chromatic number. 2d K For the Cartesian product of complete graphs i=1 ti , we think of the vertices { ,...,t − }×{ ,...,t − }×···×{ ,...,t − } as vectors from 0 1 1 0 2 1 0 d 1 . Theorem 6. d ≥ t ≥ i ,...,d χ 2d K ≤ {t } Given 5 and i 2, =1 , D ( i=1 ti ) max i +1. Proof. Let us first assume d ≥ 6. We start with the canonical proper coloring f d f d V 2d K →{ , ,...,t− } f d v of Cartesian products of graphs, : ( i=1 ti ) 0 1 1 with ( )= d fi(vi)modt,wherefi(vi)=i is an optimal proper coloring of Kt and t = i=1 i max {ti}. ∗ d d Now, derive f from f by changing the color of the following vertices from f (v) to ∗ : Origin: 000 ...0.  d 2 1 Group 1: Ai,whereAi = {ei,j | 1+i ≤ j ≤ d +1− i}. i=1 v∗ e 0 i d+1 : (1)i , = 2 . Recall that v∗ = e(1)0 is the vertex with all coordinates equal to 1 except for the i i e1 th coordinate which equals 0, and i,j is the vertex with all coordinates equal to 0 except for the ith and jth coordinates which equal 1. 2d K f ∗ Note that the distance in i=1 ti is just the Hamming distance, and hence, is a proper coloring as none of the vertices reassigned the color ∗ are adjacent to each other. 2d K Now, we uniquely identify each vertex of i=1 t i by reconstructing its original vector representation by using only the colors of the vertices and the structure of the graph. This will show that the coloring f ∗ is a proper distinguishing coloring.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 88 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

Step 1. We distinguish v∗ from the Origin and Group 1 by counting their 2- ∗ neighbors in the color class ∗. Unlike the Origin and the vertices in Group 1, v has no 2-neighbors in color class ∗ since d ≥ 6. In other words, identify v∗ as the unique vertex colored ∗ that has no 2-neighbors in the color class ∗.Weexpressthis e 0 i d+1 ∗ identification as: Assign the vector (1)i , = 2 , to the vertex colored that has ∗ no 2-neighbors in the color class . Step 2. We distinguish the Origin using the following claim, together with the fact that every vertex in Group 1 is at distance two from the Origin. Claim 7. For every vertex v in Group 1, there exists a vertex u = v in Group 1 such that u is not at distance two from v. v v u Proof.Let be a vertex in Group 1. If has 1 in its first coordinate, then pick (from Ai , i ≥ 2) with 0 in the two nonzero coordinates of v and a 1 in any coordinate with a 0 in v.Ifv has a 0 in its first coordinate, then pick u from A1 with 0 in v’s non-zero coordinates. These choices of u are always possible by our definition of Group 1, and in each case the distance between v and u is four.

Thus, we assign the vector 000 ...0 to the unique vertex with color ∗ that has ∗ every other vertex in color class ∗ (besides v ) as a 2-neighbor. In the next step, we exploit a defining characteristic of Group 1. To better understand this, we consider an example. If d = 6, then Group 1 is by definition {110000, 101000, 100100, 100010, 100001, 011000, 010100 , 010010, 001100}.Notethat

almost all the vertices of weight 1 have a distinct number of neighbors in Group 1. The vertex with vector representation 100000 has five neighbors, 010000 has four neighbors, 000010 has two neighbors, and 000001 has one neighbor in Group 1. Only the vertices with vector representations 001000 and 000100 both have three neighbors in Group 1. Hence, we can establish the vector representations for all vertices of weight

1 by counting their neighbors in Group 1, except for the two “middle” vertices. These ∗ two vertices are distinguished by comparing their distances to v , as described below. Step 3. We distinguish all the vertices denoted by binary vectors using the fol- lowing proposition. d Proposition 8. Let G = 2 Gi,d ≥ 6, and suppose that the vertices in G are i=1 denoted by d-tuples of integers such that Hamming distance is a lower bound for graph G Kd distance in . Suppose the binary vectors induce an isomorphic copy of 2 .Ifthe ∗ Origin and v are distinguished in G and Group 1 is set-distinguished, then the binary vectors are distinguished in G. Proof. First we show that all binary vectors of weight 1 are distinguished by proving that each has a unique list of distances to the Origin, Group 1, and v∗.Then

we confirm all binary vectors are distinguished by using Lemma 5 inductively. Graph automorphisms preserve distance, so every color-preserving ϕ ∈ Aut(G) permutes the neighbors of the Origin. Since Hamming distance is a lower bound for k distance in G, the neighbors of the Origin are a subset of {ei : i, k ∈ Z}.Ifk =1then k 1 ei has no neighbors in Group 1. By contrast, the vertex ei has exactly d−i neighbors i ≤ d d − i i> d d ≥ in Group 1 if 2 and + 1 neighbors in Group 1 if 2 when 6. Note e1 e1 d − d e1 that both d and d have 2 neighbors in Group 1. The vertices i for 2 2 +1 i  d , d = 2 2 + 1 are distinguished since they are uniquely specified by their distance 1 from the origin and the number of their neighbors in Group 1. The vertices ei for i d , d d d − v∗ = 2 2 + 1 have distance and 2 respectively from , so are unique among d − d neighbors of the origin with 2 neighbors in Group 1 and specified distance to v∗ . This distinguishes all binary vertices of weight 1.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 89

k We use the inductive hypothesis that all binary vectors of weight at most are distinguished. We proved this for k = 1 in the previous paragraph (and k =0ispart of the hypothesis). For k ≥ 1, let v be a weight k + 1 binary vector with neighbors v ,v ,...,v k k ≥ i1 i2 ik+1 of weight . This means the hypotheses of Lemma 5 hold since 1. Since every graph automorphism preserves distances, each automorphism that fixes v v v k − i1 and i2 must permute and the weight 1 binary vector described in Lemma 5. The weight k − 1 binary vectors are distinguished by the inductive hypothesis, so v is distinguished. Inducting on k shows that all binary vectors are distinguished. Step 4. We distinguish vertices with vector representations of weight 1, with k>1 as the nonzero coordinate. By Lemma 4, we can recover the original (canonical) colors f ∗ of all the vertices from their current colors given by . By considering the neighbors of the Origin with canonical color k, there is exactly one such vertex that is also a 1 neighbor of a vertex assigned a vector of the form ej in Proposition 8. Assign the vector ek to this unique vertex. j Step 5. We distinguish vertices with representations of weight greater than one. Using Lemma 5, we inductively distinguish vertices, starting with vertices of weight two and using the vertices already distinguished in Steps 3 and 4. This completes the proof for d ≥ 6. Proposition 9. χ 25 K D ( i=1 ti )=3. d Proof.Lett =max{ti} = χ(2 Kt ). We give an ad hoc argument depending i=1 i on t. t t i ,...,d 2d K For the case = 2, i.e., i =2for =1 , i=1 ti is the five-dimensional hypercube. We take Group 1 = {11000, 10100, 10010 , 01100}, v∗ = 00111, and θ = 11111. Starting with the canonical coloring, recolor Group 1, v∗,andθ to ∗.Then by Lemma 4, we know that in the color class ∗, Group 1 vertices are those with v∗ θ v∗ canonical color 0, ,and are those vertices with canonical color 1. Next, can be distinguished from θ as it has a 5-neighbor (antipode) in Group 1 unlike θ.This means the Origin 00000 is established as the unique vertex that is the 5-neighbor (antipode) of θ. Now, we have established Group 1, v∗, and the Origin, so we can complete the proof as in Steps 3 and 5 above.

For the case t =3,takeGroup1={11000, 10100, 10010, 01100} and v∗ = 11011. ∗ Starting with the canonical coloring, recolor Group 1, v ,andtheOriginto∗.Then by Lemma 4, we know that in the color class ∗, Group 1 vertices are those with canonical color 2, v∗ is the one with canonical color 1, and the Origin is the one with canonical color 0. Now, the rest of the proof follows exactly as Steps 3, 4, and 5

above. ∗ For the case t ≥ 4, take Group 1 = {11000, 10100, 10010, 01100} and v = 00111. Starting with the canonical coloring, recolor Group 1, v∗,andtheOriginto∗.Then by Lemma 4, we know that in the color class ∗, Group 1 vertices are those with canonical color 2, v∗ is the one with canonical color 3, and the Origin is the one with

canonical color 0. Now, the rest of the proof follows exactly as Steps 3, 4, and 5 above. Steps 1–5 combining with Proposition 9 completes the proof of the Theo- rem 6. d Q 2d K As we noted earlier, the -dimensional hypercube d is defined as i=1 2. Corollary 10. χ Q d ≥ D ( d)=3,for 5. Proof. The upper bound follows from Theorem 6. Exchanging the first two copies K 2d K of 2 in any hypercube i=1 2 by exchanging the first two coordinates in the binary representations of the vertices is a color preserving automorphism with respect to a proper 2-coloring. This implies that χ (Qd) > 2. D

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 90 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

Q d ≤ We also consider the distinguishing chromatic number of d for 4. Note χ Q ≥ d ≥ that the lower bound D ( d) 3isalwaystruefor 2. It is trivial to show that χ Q D ( 2)=4. Proposition 11. χ (Q )=4. D 3 Proof. Consider any proper 3-coloring for Q3. 12. Claim If one color class is an independent set of size four, then there is a nontrivial automorphism preserving the coloring. Proof. If we color an independent set of size four with one color, the remaining vertices are independent and are partitioned into two color classes: Three vertices get the same color and the remaining vertex is the only vertex having the third color, or

two vertices have the same color and the other two vertices have the same color. Then we can get a 3-proper coloring isomorphic to one of the following cases: (i) Q3 having sets of vertices {000, 011, 110} with color 1, {100, 010, 001 , 111} with color 2, and {101} with color 3; (ii) Q3 having sets of vertices {110, 011} with color 1, {100, 001, 010, 111} with color 2, and {101, 000} with color 3. In the first case, the automorphism ρ defined ρ ρ ρ ρ by (001) = 111, (111) = 001, (000) = 110, (110) = 000, and fixing the remaining vertices, preserves the coloring. In the second case, the automorphism ρ defined by ρ(101) = 000,ρ(000) = 101,ρ(100) = 001,ρ(001) = 100,ρ(111) = 010,ρ(010) = 111,ρ(110) = 011, and ρ(011) = 110 preserves the coloring. Now the only remaining case is to have two vertices in one color class and the

other color classes have three vertices each. Claim 13. The vertices in the color class of size two cannot be in a cycle on four vertices. Proof. Suppose the two vertices are in a 4-cycle. Then after deleting these two vertices from Q , the remaining graph is isomorphic to a 4-cycle with two leaves, 3 one each on two nonadjacent vertices. But this graph cannot be partitioned into two independent sets of size three each. Thus, the graph cannot have an appropriate proper coloring with two colors. For any vertex v of Q3, the only vertex not in a 4-cycle with v is the antipodal vertex of v. After deleting any antipodal pair, the remaining graph is isomorphic to

C6, whose distinguishing chromatic number is 3. Therefore, no proper 3-coloring of Q 3 is a distinguishing coloring. For the upper bound, we give color 1 for the vertices 000 and 101, color 2 for vertices 011 and 110, color 3 for vertices 010 and 001, and color 4 for the vertices 100 and 111. It is easy to show that this coloring does not have any nontrivial color- χ Q preserving automorphism. Thus, D ( 3)=4. χ Q Kl¨ockl [14] showed that D ( 4)=4. 4. Complete multipartite graphs and prime graphs. In order to prove a

bound on the distinguishing chromatic number for general graphs, we first consider complete multipartite graphs. The following theorem can then be used to give a χ bound on D for powers of prime graphs. Theorem 14. Let H be a connected complete multipartite graph with at least two χ 2d H ≤ χ H d ≥ n  n |V H | vertices. Then D ( i=1 ) ( )+1,for 2 lg +5,where = ( ) . H ∼ K Proof.If = 2, then the result follows from Theorem 6. Thus, we may assume that H has at least three vertices. d We begin with the canonical proper coloringf of Cartesian products of graphs, f d V 2d H →{ , ,...,t− } f d v d f v t t χ H : ( i=1 ) 0 1 1 with ( )= i=1 ( i)mod,where = ( ) and f is an optimal proper coloring of H. f ∗ f d f d v We derive from by changing the color of the following vertices from ( ) to ∗:

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 91

... Origin: 000 0.  d 2 1 Group 1: Ai,whereAi = {e | 1+i ≤ j ≤ d +1− i}. i=1 i,j Group 2: {e2 | 1 ≤ i ≤ d}, where the subscript i+1 is considered modulo d+1. i,i+1 v∗: e(1)0, i = d+1 . 1 i 2 v∗ i 2 : vertex with 1 in all its coordi nates except 2 in coordinate and 0 in i i d+1 coordinate +1, = 2 . k {x ,y } k ∈K  Group : k k ,for ,asdefinedinsection2.Let be the index of the vertex a in V (H) such that ξ(a)=k.Let bk be the binary representa- tion of  − 1using lg n bits, with prepended zeroes if necessary. Note that 1 ≤  − 1 ≤ n − 1whenk ∈K. Define xk to be the vector with the last lg n coordinates containing the sequence bk and the rest of

the coordinates equal to k. Similarly, define yk to have the first lg n b coordinates containing the sequence k and the rest of the coordinates equal to k. The Hamming distance between the vector representations of two vertices in 2d H i=1 is a lower bound on the graph distance between the two vertices. Since d ≥ 2 lg n + 5, it is easy to verify that no two vertices with color ∗ have Ham- 2d H f ∗ ming distance 1. Thus, they are not adjacent in i=1 ,and is a proper coloring 2d H of i=1 . 2d H As before, we distinguish each vertex of i=1 by reconstructing its original vector representation by using only the colors of the vertices and the structure of the graph. This will show that the coloring f ∗ is a proper distinguishing coloring. v∗ v∗ Step 1. We distinguish the vertices 1 and 2 using their distance from each other and the other vertices colored ∗. χ H > v∗ v∗ If ( ) 2, then 1 and 2 are at distance 2 from each other. We set-distinguish {v∗,v∗} ∗ 1 2 from the rest of the vertices with color by the number each vertex of color ∗ ∗ v∗ v∗ has of 2-neighbors in the color class .Both 1 and 2 have exactly one 2-neighbor ∗ with color . All of Group 1 is at distance 2 from the Origin, and each vertex in Group 1 has e2 several 2-neighbors within Group 1. Each vertex i,i+1 in Group 2 is also at distance e2 e2 2 from the Origin and from the two vertices i−1,i and i+1,i+2 in Group 2. Since d>2 lg n +2,novertexinGroupk,fork ∈K, has any 2-neighbors with color ∗. v∗ v∗ ∗ Thus, 1 and 2 are the only two vertices with color that have exactly one 2-neighbor with color ∗. χ H v∗ v∗ If ( )=2,then 1 and 2 are at distance 3 from each other. We again set- {v∗,v∗} ∗ distinguish 1 2 from the rest of the vertices with color by the number each ∗ ∗ v∗ vertex of color has of 2-neighbors and 3-neighbors in the color class .Both 1 and v∗ ∗ ∗ 2 have exactly one 3-neighbor with color and no 2-neighbors with color . All of Group 1 is at distance 2 from the Origin, and each vertex in Group 1 has several 2-neighbors within Group 1. No vertex in Group 2 has any 3-neighbors with color ∗.Sinced>2 lg n +3,novertexinGroupk,for k ∈K, has any 2-neighbors ∗ or 3-neighbors with color . v∗ v∗ ∗ Thus, 1 and 2 are the only two vertices with color that have exactly one 3-neighbor with color ∗ and no 2-neighbor with color ∗. χ H v∗ v∗ f d Regardless of ( ), the colors of 1 and 2 under differ, and by Lemma 4, f ∗ v∗ v∗ these colors can be recovered from . Hence, 1 and 2 are distinguished. ∗ Step 2. We distinguish the Origin as the vertex in color class with the most number of 2-neighbors with color ∗.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 92 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

t> Note that all of Group 1 is at distance 2 from the Origin. If 2, then all of Group 2 is also at distance 2 from the Origin. By Claim 7, for each vertex x in Group 1, there is another vertex y in Group 1 such that y is not a 2-neighbor of x. x e2 e2 Similarly, for the vertex = i,i+1 in Group 2, the vertex i+2,i+3 in Group 2 is not a2-neighborofx. As shown above, since d>2 lg n +3,novertexinGroupk,for k ∈K, has any 2-neighbors or 3-neighbors with color ∗.Ift =2,thenanyvertexin Group 1 (Group 2) has at most one 2-neighbor in Group 2 (Group 1). Moreover, for any vertex x in Group 1, there exist two vertices in Group 1 that are not 2-neighbors x of . Thus, the Origin is the vertex with color ∗ that has the most 2-neighbors in color class ∗. Step 3. We show that Group 1 and Group 2 are set-distinguished using their distances from the Origin and their colors under f d. If t>2, then both Group 1 and Group 2 are at distance 2 from the Origin. ≡ t f d However, since 2 4mod , the color of vertices in Group 1 under (which is recoverable by Lemma 4) is different than the color of vertices in Group 2. If t =2, then Group 1 is at distance 2 from the Origin, while Group 2 is at distance 4 from the Origin. In either case, vertices in Group 1 can be distinguished from vertices in Group 2. d ≥ 2d K Step 4. Since 6, and since i=1 2 assignedbinary vectors in the canonical 2d H v∗ way is an induced subgraph of i=1 , we apply Proposition 8 with distinguished 1 and the Origin from Steps 1 and 2 and set-distinguished Group 1 from Step 3. Hence, we distinguish all binary vectors. Step 5. We distinguish Groups k,fork ∈K, using the binary vectors already distinguished.  Let c =0ifk ≡ 1modt, and let c =1ifk ≡ 1mod t.Letxk be the vector with the last lg n coordinates containing the sequence bk andwiththerestofthe  coordinates equal to c.Notethatxk has already been distinguished in Step 4. Then x k ∗ we claim that the vertex k in Group is the vertex in color class that is closest to x k. Claim 15. The vertex xk in Group k,fork ∈K, is the unique vector among the  Groups k such that d(x ,xk)=d − lg n. k Proof. First observe that changing d − lg n coordinates from c to k contributes   d − lg n to the distance from xk to xk.Thus,d(xk,xk)=d − lg n.Forj = k,  d(xk,xj ) >d− lg n, since each c must be changed to a j,andbk in the last coordinates must be changed to bj .  For any j ∈K(including j = k), d(xk,yj) >d− lg n,sinced− lg n coordinates must be changed to j, and, since j =0and j = n, at least one coordinate among the

first lg n must also be changed to match bj.  Similarly, define yk to be the vector with the first lg n coordinates containing the sequence bk, the binary representation of k, and rest of the coordinates equal to  c. Then, the vertex yk in Group k is the vertex in color class ∗ that is closest to yk. Step 6. We distinguish the weight 1 vectors using the following proposition. Proposition 16. Assume that all notations are the same as in Theorem 14 2d K and above. If all the binary vectors which induce an isomorphic copy of i=1 2 are distinguished, Groups k for k ∈Kare distinguished, and Group 2 is set-distinguished, then the weight 1 vectors are distinguished. k k ≥ Proof. We distinguish all weight 1 vectors with as a nonzero coordinate, 2. We have two cases: when χ(H)=2andwhenχ(H ) > 2.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 93

χ H Case 1. ( )=2. 2 We want to establish v = ei .Notethatv has the following properties: v is 1 at distance 2 from the Origin and has ei as a neighbor; and v has at least two 2- neighbors in Group 2. Our goal is to show that S = {w ∈ V (H): w has distance 1 2 from the Origin, has ei as a neighbor, and has at least two 2-neighbors in Group } {v} v ∈ S 2 = .Notethat . Since any vector with weight at least 3 must have distance at least 3 from the Origin, S can only contain vectors with weight at most 2. More precisely, any vector in S must be either weight 1 with an even number as the nonzero coordinate or weight 2 with odd numbers as two nonzero coordinates. Moreover, one 1 nonzero coordinate of either case must be placed at the ith coordinate to have ei as i S a neighbor, and in fact the th coordinate of any weight 2 vector in must be 1. So any weight 2 vector in S can have in Group 2 at most one 2-neighbor, and therefore, we can exclude weight 2 vectors from S. Only weight 1 vectors with an even number 2 in the ith coordinate can be vectors in S.Butonlyei has at least two 2-neighbors in Group 2 among weight 1 vectors having even numbers in the ith coordinate. Hence, S {v} = . 3 2 1 Note that ei is the only vector that has the Origin and ei as neighbors and ei as a 2-neighbor and minimum distance to Group 3. k 1 3 Similarly, ei with k even is the only vector that has ei and ei as neighbors, has e2 k ek i and the Origin as 2-neighbors, and has minimum distance to Group ;and i with k e2 e1 e3 odd is the only vector that has the Origin and i as neighbors, has i and i as 2-neighbors, and has minimum distance to Group k.Notethatsince d ≥ 2 lg n,one of xk or yk in Group k has a k in coordinate i. χ H > Case 2. ( ) 2. 2 1 The vector ei has the Origin and ei as its neighbors. Any vector having the 1 c 2 Origin and ei as its neighbors must be of the form ei ,andei is the only possibility to have a neighbor in Group 2. k k Next, consider v = ei ,k >2. For k ≡ 0modt (resp., k ≡ 0modt)andk>2, ei e1 e2 has i and i as neighbors and has distance 1 (resp., 2) from the Origin. Only vectors ec ek of the form i have these properties, but i is the only vector with distance at most d − lg n−1+wt(bk) from a vector in Group k.Notethatsince d ≥ 2 lg n,oneof xk or yk in Group k has a k in coordinate i.

The following proposition completes the proof of Theorem 14 due to the above proposition. Proposition 17. G 2d H d Let = i=1 i be a product of copies of complete multipar- H 2d K tite graphs i. Suppose that the binary vectors induce an isomorphic copy of i=1 2, k which is distinguished, and that the vertices ei for each k, i are distinguished. Then G is distinguished. Proof. We first show that if v is any binary vector which is zero in coordinate i, k then v + ei is distinguished for each k =1. 1 k For each j with i = j, the vector ej + ei is distinguished because it is the unique e1 ek e1 e1 ek k nonbinary neighbor of j and i (resp., j + i and i ,if and 0 are in the same color class in Hi) by Lemma 5. The inductive hypothesis is that if v is a binary vector k which is zero in coordinate i and which has weight s ,thenv + ei is distinguished. (We proved this for s = 1, and it is part of the hypothesis when s =0.)Ifv is binary, zero in coordinate i, and has weight s + 1, then we may choose a binary v which  k  k 1 neighbors v and has weight s. The vectors v + ei and v (resp., v + ei and v + ei if k v ek and 0 are in the same color class) are both neighbors of + i .Lemma5saysthat

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 94 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

v ek + i is the unique nonbinary vertex with these neighbors. By induction, it too is distinguished. This shows that all vertices with at most s nonbinary entries are distinguished for s ≤ 1. Use this as the inductive hypothesis for a second induction. Let u be a vertex with s + 1 non-binary entries, and suppose i is one of these entries. Then, at i u least one of the vertices obtained by changing the th coordinate of to zero or one is a neighbor of u.Sinces ≥ 1, this gives at least two neighbors ui,ui of u that differ from u in distinct coordinates. By Lemma 5, u is the only vertex in G with s+1 non-binary entries that neighbors both ui and ui (since the other possible vertex identified in Lemma 5 has s − 1 non-binary entries). By induction hypothesis, these u u neighbors of are distinguished, so must also befixed by every color-preserving graph automorphism. By induction on s,allofG is distinguished. Since Steps 1–5 and Proposition 16 satisfy conditions of Proposition 17, all the vectors of Hd are distinguished. Having proved Theorem 14, we could now prove that if a connected graph G is d d ≥ d a power of a prime graph, then there exists an integer G such that for all G, χ Gd ≤ χ G D ( ) ( ) + 1. The method used would be the same as in the proof of the stronger Theorem 21, which bounds the distinguishing chromatic number for powers of all connected graphs.

5. Products of complete multipartite graphs. We now extend Theorem 14 to H being a product of possibly different complete multipartite graphs. The proof is conceptually a straightforward generalization of the proof of Theorem 14, but re- quires significantly more bookkeeping. We presented Theorem 14 first to illustrate the concepts in a simpler setting. Theorem 18 will be a crucial ingredient in the proof of Theorem 21. Moreover, Theorem 18 is interesting as an extension of Theorem 6 on products of complete graphs. Theorem 18. H 2r Hpj H If = j=1 j ,where j are distinct connected complete mul- χ H ≤ χ 2d H ≤ χ H tipartite graphs with at least two vertices, then ( ) D ( =1 ) ( )+1,for 2lg nj  d ≥ maxj=1,...,r{ } +5,wherenj = |V (Hj )| for j =1,...,r. pj d p d j ,...,r s r d Proof.Let j = j , =1 and = j =1 j . We denote a vertex of d Hd = 2r H j as j=1 j

v =(v1,v2,...,vs).

I { , ,...,s} H Let j be the indices in 1 2 of coordinates corresponding to copies of j in Hd m j−1 d I {m ,m ,...,m d } .Let j = =1 .Then j = j +1 j +2 j + j . f d We again begin with the canonical proper coloring of Cartesian products of f d V 2r Hdj →{ , ,...,t− } H graphs: We define the coloring : ( j=1 j ) 0 1 1 of by

r f d v f v t, ( )= j ( i)mod j=1 i∈Ij

where t = χ(H)andfj is an optimal proper coloring of Hj . f ∗ f d f d v We derive from by changing the color of the following vertices from ( ) to ∗:

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 95

... Origin: 000 0.  s 2 1 Group 1: Ai,whereAi = {e | 1+i ≤  ≤ s +1− i}. i=1 i, 2 2 j ,...,r {e | mj ≤ 

if necessary. Note that 1 ≤  − 1 ≤ nj − 1. Define xkj to be the vector with coordinates mj +1,...,mj + dj − lg nj  equal to k,coordinates

mj + dj − lg nj  +1,...,mj + dj containing the sequence bk,andthe y rest of the coordinates equal to 0. Similarly, define kj to be the vector with coordinates mj +1,...,mj + lg n j  containing the sequence bk, coordinates mj + lg nj  +1,...,mj + dj equal to k, and the rest of the coordinates equal to 0.

Technically, we should use (k, j) to denote the subscripts instead of kj but, we

don’t do so for sake of keeping the notation readable. The Hamming distance between the vector representations of two vertices in 2r Hdj j=1 j is a lower bound on the graph distance between the two vertices. Since  n  d ≥ 2 lg j +5for1≤ j ≤ r, it easy to verify that no two vertices with color ∗ have pj 2r Hdj f ∗ Hamming distance 1. Thus, they are not adjacent in j=1 j ,and is a proper d coloring of 2r H j . j=1 j 2r Hdj As before, we distinguish each vertex of j=1 j by reconstructing its original vector representation by using only the colors of the vertices and the structure of the graph. This will show that the coloring f ∗ is a proper distinguishing coloring. 2lg(nj ) First, note that since d> +3,novertexinGroupkj ,for1≤ j ≤ r and pj k ∈Kj , has any 2-neighbors or 3-neighbors with color ∗. Also note that Group 2 is essentially the Group 2 from the proof of Theorem 14 replicated for each Hj . Group 2 has the same properties used in Steps 1–4 of Theorem 14: Weight 2 and

nonzero coordinates are 2. v∗ v∗ Step 1. We distinguish the vertices 1 and 2 using their distance from each other and the other vertices colored ∗. s+1 Let α be the index such that ∈Iα. We assume that Hα is not isomorphic 2 to K2. If not, we may permute the indices of Hj ’s since not every Hj is isomorphic K v∗ v∗ to 2 (otherwise, Theorem 6 applies). Note that 2 exists and is different from 1 , since Hα has at least three vertices. χ H > v∗ v∗ If ( α) 2, then 1 and 2 are at distance 2 from each other. We set-distinguish {v∗,v∗} ∗ 1 2 from the rest of the vertices with color by the number each vertex of color ∗ ∗ v∗ v∗ has of 2-neighbors in the color class .Both 1 and 2 have exactly one 2-neighbor ∗ with color . All of Group 1 is at distance 2 from the Origin, and each vertex in Group 1 has e2 several 2-neighbors within Group 1. Each vertex i,i +1 in Group 2 either (i) is at 2 2 distance 2 from the Origin and from the two vertices ei− ,i and ei ,i in Group 2 1 +1 +2

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 96 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

∗ χ H χ H or (ii) has no 2-neighbor in the color class (if ( i )=2or ( i+1)=2).Since 2lg(nj ) d> j kj k ∈Kj pj +3forevery ,novertexinGroup ,for , has any 2-neighbors with color ∗. v∗ v∗ ∗ Thus, 1 and 2 are the only two vertices with color that have exactly one 2-neighbor with color ∗. If χ(Hα) = 2, we may assume that χ(Hj ) = 2 for every j.Otherwise,wemay H χ H > v∗ permute the indices of j ’s so that ( α) 2 and apply the previous case. Then 1 v∗ {v∗,v∗} and 2 are at distance 3 from each other. We again set-distinguish 1 2 from the ∗ ∗ rest of the vertices with color by the number each vertex of color has of 2-neighbors ∗ v∗ v∗ and 3-neighbors in the color class .Both 1 and 2 have exactly one 3-neighbor with color ∗ and no 2-neighbors with color ∗. All of Group 1 is at distance 2 from the Origin, and each vertex in Group 1 has several 2-neighbors within Group 1. No vertex in Group 2 has any 3-neighbors with ∗ d > n  j k k ∈K color .Since j 2 lg j +3forevery ,novertexinGroup j ,for j ,has any 2-neighbors or 3-neighbors with color ∗. v∗ v∗ ∗ Thus, 1 and 2 are the only two vertices with color that have exactly one 3-neighbor with color ∗ and no 2-neighbor with color ∗. χ H v∗ v∗ f d Regardless of ( α), the colors of 1 and 2 under differ, and by Lemma 4, f ∗ v∗ v∗ these colors can be recovered from . Hence, 1 and 2 are distinguished. ∗ Step 2. We distinguish the Origin as the vertex in color class with the most number of 2-neighbors with color ∗. Note that all of Group 1 is at distance 2 from the Origin. If χ(H) > 2, there exists at least one vertex in Group 2 with distance 2 from the Origin. Moreover, if two vertices in Group 2 are 2-neighbors each other, then both of them are 2-neighbors x y of the Origin. By Claim 7, for each vertex in Group 1, there is another vertex in y x x e2 Group 1 such that is not a 2-neighbor of . Similarly, for the vertex = i,i+1 in e2 x Group 2, the vertex i+2,i+3 in Group 2 is not a 2-neighbor of . As shown above, since 2lg(nj ) d> +3foreveryj,novertexinGroupkj ,fork ∈Kj , has any 2-neighbors pj or 3-neighbors with color ∗.Ifχ(H) = 2, then any vertex in Group 1 (Group 2) has at most one 2-neighbor in Group 2 (Group 1). Moreover, for any vertex x in Group 1, there exist two vertices in Group 1 that are not 2-neighbors of x. ∗ Thus, the Origin is the vertex with color that has the most 2-neighbors in color class ∗. Step 3. We show that Group 1 and Group 2 are set-distinguished using their distances from the Origin and their colors under f d. Note that every element in Group 1 is at distance 2 from the Origin. Since 2lg(nj ) d> j kj k ∈Kj pj +3forevery ,novertexinGroup ,for , has any 2-neighbors, 3-neighbors, or 4-neighbors with color ∗. Therefore, the vertices in Group 1 or Group 2 are the only ∗-colored vertices with distance at most 4 from the Origin. If t>2, then the color of vertices in Group 1 under f d (which is recoverable by ≡ t Lemma 4) is different than the color of vertices in Group 2 since 2 4mod and 2 ≡ 3modt.Ift = 2, then Group 1 is at distance 2 from the Origin, while Group 2 is at distance 4 from the Origin. In either case, vertices in Group 1 can be distinguished from vertices in Group 2. d ≥ 2d K Step 4. Since 6 and since i=1 2 assigned binary vectors in the canonical 2d H v∗ way is an induced subgraph of i=1 , we apply Proposition 8 with distinguished 1 and the Origin from Steps 1 and 2 and set-distinguished Group 1 from Step 3. Hence, we distinguish all binary vectors.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 97

k ≤ j ≤ r k ∈K Step 5. Groups j ,for1 and j are distinguished using the binary vectors already distinguished. Let c =0ifk ≡ 1modχ(Hj ), and let c =1if k ≡ 1modχ(Hj ). x m ,...,m d − n  Let kj be the binary vector with coordinates j +1 j + j lg j equal c m d − n  ,...,m d b to ,coordinates j + j lg j +1 j + j containing the sequence k,and x the rest of the coordinates equal to 0. Then we claim that the vertex kj in Group  kj is the vertex in color class ∗ that is closest to xk . j 19. x k ≤ j ≤ r k ∈K Claim The vertex kj in Group j ,for1 and j , is the unique k d x ,x d − n  vector among the Groups j such that ( k kj )= j lg j . j Proof. Changing dj − lg nj  coordinates (starting at (mj +1)th coordinate) from   c k dj − nj x xk d x ,xk to contributes lg to the distance from kj to j .Thus, ( kj j )=    dj − nj  k  k k ∈Kj d x ,x >dj − nj  c lg .For = and , ( kj kj ) lg , since each must  be changed to a k ,andbk in the coordinates mj + lg nj  +1,...,mj + dj must   be changed to bk .Foreachj = j, for any l ∈Kj , d(x ,xl ) ≥ dj + dj > kj j max{dj − lg nj ,dj − lg nj }.     For each 1 ≤ j ≤ r,andk ∈Kj ,ifj = j,then d(x ,yk ) >dj − lg nj , kj j   since coordinates mj + lg nj +1,...,mj +dj must be changed to k , and, since k =0  and k = nj , at least one coordinate among the coordinates mj +1,...,mj + lg nj    must also be changed to match bk .Ifj = j,thend(x ,yk ) ≥ dj + dj > kj j max{dj − lg nj ,dj − lg nj }.  Similarly, define y to be the vector with coordinates mj +1,...,mj + lg nj  kj containing the sequence bk,coordinatesmj + lg nj  +1 ,...,mj + dj equal to c,and the rest of the coordinates equal to 0. Then the vertex ykj in Group kj is the vertex ∗ y in color class that is closest to kj . k Step 6. For all 1 ≤ i ≤ s, we distinguish ei for all k ∈Kj ,wherej is such that i ∈Ij . The proof is essentially the same as Proposition 16 applied separately for each

Hj . Proposition 20. Assume that all notations are the same as in Theorem 18 2d K and above. If all the binary vectors which induce an isomorphic copy of i=1 2 are distinguished, Groups k for k ∈Kare distinguished, and Group 2 is set-distinguished, then the weight 1 vectors are distinguished. i, j, k k ∈K j i ∈I ek Proof.Foreach ,where j and is such that j , we distinguish i . We have two cases: when χ(Hj )=2andwhenχ(Hj ) > 2. Case 1. χ(Hj )=2. 2 We want to establish v = ei .Notethatv has the following properties: v is 1 at distance 2 from the Origin and has ei as a neighbor; and v has at least two 2- S {w ∈ V H w neighbors in Group 2. Our goal is to show that = ( ): has distance e1 2 from the Origin, has i as a neighbor, and has at least two 2-neighbors in Group 2} = {v}.Notethatv ∈ S. Since any vector with weight at least 3 must have distance at least 3 from the Origin, S can only contain vectors with weight at most 2. More precisely, any vector in S must be either weight 1 with an even number as the nonzero

coordinate or weight 2 with odd numbers as two nonzero coordinates. Moreover, one i e1 nonzero coordinate of either case must be placed at the th coordinate to have i as a neighbor, and in fact the ith coordinate of any weight 2 vector in S must be 1. So any weight 2 vector in S can have at most one 2-neighbor in Group 2, and therefore, we can exclude weight 2 vectors from S. Only weight 1 vectors with an even number

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 98 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

i S e2 in the th coordinate can be vectors in .Butonly i has at least two 2-neighbors in Group 2 among weight 1 vectors having even numbers in the ith coordinate. Hence, S = {v}. 3 2 1 Note that ei is the only vector that has the Origin and ei as neighbors and ei as a 2-neighbor and minimum distance to Group 3j. ek k e1 e3 e2 Similarly, i with even is the only vector that has i and i as neighbors, has i k and the Origin as 2-neighbors, and has minimum distance to Group kj ;andei with 2 1 3 k odd is the only vector that has the Origin and ei as neighbors, has ei and ei as k d ≥ n  2-neighbors, and has minimum distance to Group j .Notethatsince j 2 lg j , x y k k i one of kj or kj in Group j has a in coordinate . Case 2. tj = χ(Hj ) > 2. 2 1 The vector ei has the Origin and ei as its neighbors. Any vector having the Origin and e1 as its neighbors must be of the form ec ,ande2 is the only possibility i i i to have a neighbor in Group 2. k Next, consider v = ei , k>2. For k ≡ 0modtj (resp., k ≡ 0modtj )andk>2, k 1 2 ei has ei and ei as neighbors and has distance 1 (resp., 2) from the Origin. Only c k vectors of the form ei have these properties. But ei is the only vector with distance at most dj − lg n−1+wt(bk) from a vector in Group kj .Notethatsincedj ≥ 2 lg nj , one of xkj or ykj in Group kj has a k in coordinate i. d Now, Proposition 17 applied to 2 H completes the proof of Theorem 18. =1 6. Cartesian powers of a general graph. We now state and prove our main result. The starting point of the proof will be to embed the given graph G into an appropriate complete multipartite graph H. However, it is not enough to prove Theorem 21 by simply applying Theorem 18 to H because it is easy to construct G H G H χ G >χ H graphs and where is a subgraph of but D ( ) D ( ). We must give a χ G ≤ χ H direct argument that D ( ) D ( ). Theorem 21. If G is a connected graph with at least two vertices, then there d χ Gd ≤ χ G d ≥ d G ∼ exists an integer G such that D ( ) ( )+1 for all G. Moreover, if = r pi 2lg ni 2i Gi with G1,...,Gr distinct and each pi ∈ N,thendG =maxi=1,...,r{ } +5 =1 pi suffices, where ni = |V (Gi)| for i =1,...,r. G G ∼ 2r Gpi G Note that by Theorem 2, any graph can be factored as = i=1 i with i distinct prime factors of G.

Proof. [Proof of Theorem 21] Let t = χ(G) and let fi : V (Gi) →{0, 1,...,t− 1} G G G be a proper coloring of i.Notethatsince is connected, each i is also connected and has at least two vertices. Let Hi denote the complete multipartite graph formed from Gi by adding an H 2r Hpi edge between every pair of vertices with different colors, and let = i=1 i .Let r d d di = pid and D = di.Wedefinethecoloringf of G by i=1 r di d f (v)= fi(vij )mod t. i=1 j=1 f d Gd Hd H Note that is a proper coloring of both and .Since is a product of connected complete multipartite graphs with at least two vertices, by Theorem 18 2lg ni dH i ,...,r{ } d ≥ dH there exists an integer =max=1 pi +5suchthatfor ,there exists a coloring f ∗ of Hd formed from f d by changing the color of some vertices to

∗ such that f ∗ is a distinguishing proper coloring of Hd. By Lemma 4, f ∗ has the d additional property that for every vertex v with color ∗, the color of v under f can be determined.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. DISTINGUISHING CHROMATIC NUMBER 99

Since Gd is a subgraph of Hd, f ∗ is also a proper coloring of Gd. We will show ∗ d d that f is a distinguishing coloring of G . Suppose that ρ is an automorphism of G that preserves the coloring f ∗.Sinceρ preserves the coloring f ∗ and since f d can be recovered from f ∗, ρ also preserves the coloring f d. We show that ρ is also an automorphism of Hd. x x ,x ,...,x y y ,y ,...,y Hd Let =( 11 12 rdr )and =( 11 12 rdr ) be two vertices of .We consider several cases. For clarity of exposition, we will use the notation u ↔F v to indicate that u and v are adjacent in the graph F ,and u F v to indicate that u and v are not adjacent.

If x ↔Gd y,thenx ↔Hd y and also ρ(x) ↔Gd ρ(y). Hence, ρ(x) ↔Hd ρ(y).    If x Gd y and x ↔Hd y, then there exists an index i j ,1≤ i ≤ r and  ≤ j ≤ d f x  f y x y 1 i , such that i ( i j ) = i ( i j )andsuchthat = for all   1 2 1 2 12 = i j . By Theorem 3, ρ is of the form of an automorphism in each coordinate, and then a permutation π of coordinates, where only isomorphic copies of Gi are

mapped to each other. Hence, ρ(x)=(ρ(x) ,ρ(x) ,...,ρ(x)i π j ,...,ρ(x)rd )and 11 12 ( ) r ρ(y)=(ρ(y) ,ρ(y) ,...ρ(y)iπ j ,...,ρ(y)rd ), where ρ(x) = ρ(y) for all 11 12 ( ) r 12 12   d 12 = i π(j ). Since ρ preserves the coloring f ,

f d(ρ(x)) = f d(x) = f d(y)=f d(ρ( y)).

f d f Using the definition of in terms of the i,wehave

r di r di d d f (ρ(x)) = fi(ρ(x)ij ) = fi(ρ(y )ij )=f (ρ(y)) mod t, i=1 j=1 i=1 j=1

and so

f ρ x  f ρ y , i ( ( )i π(j )) = i ( ( )i π(j ))

since all other terms in the sum are the same. Hence, ρ(x) ↔Hd ρ(y). If x Gd y (and thus ρ(x) Gd ρ(y)) and ρ(x) ↔ Hd ρ(y), then by considering the automorphism ρ−1 on the vertices ρ(x)andρ(y), by the case above we have that x ↔Hd y. Hence, if x Gd y and x Hd y,thenρ(x) Hd ρ(y).

Thus, ρ preserves adjacencies and nonadjacencies in Hd and so is an automor- d ∗ ∗ phism of H .Sinceρ preserves the coloring f and f is a distinguishing coloring of Hd, ρ must be the identity automorphism. Thus, f ∗ is also a distinguishing coloring Gd χ Gd ≤ t for , and hence D ( ) +1.

7. Concluding remarks. Theorems 18 and 21 hold only when d is large enough. Our proof gives a bound of at worst d = O(lg n), where n is the order of the graph under consideration. We do not know whether a smaller function of n suffices for d d χ G . Its seems unlikely that a fixed would work. Since D ( )equalsthenumber G G of vertices in if and only if is a complete multipartite graph, the distinguishing chromatic number and the chromatic number of a complete multipartite graph can be arbitrarily far apart. This suggests that the bound on d must depend on n, leading us to ρ> G χ Gd > Conjecture 22. For any fixed 0, there exists a graph such that D ( ) χ Gd d ≤ ρ ( )+1 for . d G χ G ≤ χ Gd ≤ When is large enough depending on , our results show that ( ) D ( ) χ G χ Kd χ K ( ) + 1. For hypercubes, we showed D ( 2 )= ( 2) + 1 = 3. It is natural to ask

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 100 JEONG OK CHOI, STEPHEN G. HARTKE, AND HEMANSHU KAUL

χ Gd χ G for a characterization of the graphs with D ( )= ( ) + 1. In general, it would be interesting to find other families of graphs for which the distinguishing chromatic χ G ≤ number is close to its chromatic number. Under what other conditions is D ( ) χ G χ G χ G ( ) + 1? If a graph G has no nontrivial automorphisms, then D ( )= ( ). But these are not the only graphs with χ (G)=χ(G), as F¨uredi [11] recently showed D that this equality holds for large enough Kneser graphs. What other graphs have χ G χ G D ( )= ( )?

Acknowledgments. We thank referees for detaile d comments that substantially improved the readability of the paper and forced us to rethink our proofs to avoid imprecise statements, especially in section 5. It has been brought to our attention that Jerebik and Klavzar [13] have recently determined the distinguishing chromatic number of Cartesian product of two complete graphs.

REFERENCES

[1] M. Aigner, E. Triesch, and Z. Tuza, Irregular assignments and vertex-distinguishing edge- colorings of graphs, Ann. Discrete Math., 52 (1990), pp. 1–9. [2] M. O. Albertson, Distinguishing Cartesian powers of graphs , Electron. J. Combin., 12 (2005), #N17. [3] M. O. Albertson and K. L. Collins, Symmetry breaking in graphs, Electron. J. Combin., 3 (1996), #R18. [4] P. N. Balister, A. Kostochka, H. Li, and R. H. Schelp, Balanced edge colorings, J. Combin. Theory Ser. B, 90 (2004), pp. 3–20. [5] B. Bogstad and L. J. Cowen, The distinguishing number of the hypercube, Discrete Math., 283 (2004), pp. 29–35. [6] A. C. Burris and R. H. Schelp, Vertex-distinguishing proper edge-colorings, J. Graph Theory, 26 (1997), pp. 73–82. [7] M. Chan, The distinguishing number of the augmented cube and hypercube powers, Discrete Math., 308 (2008), pp. 2059–2342. [8] M. Chan, The maximum distinguishing number of a group , Electron. J. Combin., 13 (2006), #R70. [9] M. Chan, The distinguishing number of the direct product and wreath product action,J.Alge- braic Combin., 24 (2006), pp. 331–345. [10] K. Collins and A. Trenk, The distinguishing chromatic number, Electron. J. Combin., 13 (2006), #R16. [11] Z. Furedi¨ , private communication, 2005. [12] W. Imrich and S. Klavzar, Product Graphs, Wiley-Interscience, New York, 2000. [13] J. Jerebic and S. Klavzar, The distinguishing chromatic number of Cartesian products of two complete graphs, Discrete Math., to appear. [14] W. Klockl¨ , On distinguishing numbers, submitted. [15] S. Klavzar and X. Zhu, Cartesian powers of graphs can be distinguished by two labels,Euro- pean J. Combin., 28 (2007), pp. 303–310. [16] T. R. Jensen and B. Toft, Graph Coloring Problems, Wiley-Interscience, New York, 1995. [17] J. Tymoczko, Distinguishing numbers for graphs and groups , Electron. J. Combin., 11 (2004), #R63. D. B. West [18] , Introduction to Graph Theory, 2nd ed., Prentice Hall, Upper Saddle River, NJ, 2001. [19] T. Wong and X. Zhu, Distinguishing labeling of group actions ,DiscreteMath.,toappear. [20] T. Wong and X. Zhu, Distinguishing sets of the actions of symmetric groups, submitted.

Copyright © by SIAM. Unauthorized reproduction of this article is prohibited.