1,024
Views
0
CrossRef citations to date
0
Altmetric
Research Articles

Sudoku number of graphs

, , &
Pages 209-216 | Received 23 Jan 2023, Accepted 13 Feb 2023, Published online: 16 Jun 2023

Abstract

We introduce a concept in graph coloring motivated by the popular Sudoku puzzle. Let G=(V,E) be a graph of order n with chromatic number χ(G)=k and let SV. Let C0 be a k-coloring of the induced subgraph G[S]. The coloring C0 is called an extendable coloring if C0 can be extended to a k-coloring of G. We say that C0 is a Sudoku coloring of G if C0 can be uniquely extended to a k-coloring of G. The smallest order of such an induced subgraph G[S] of G which admits a Sudoku coloring is called the Sudoku number of G and is denoted by sn(G). In this paper we initiate a study of this parameter. We first show that this parameter is related to list coloring of graphs. In Section 2, basic properties of Sudoku coloring that are related to color dominating vertices, chromatic numbers and degree of vertices, are given. Particularly, we obtained necessary conditions for C0 being extendable, and for C0 being a Sudoku coloring. In Section 3, we determined the Sudoku number of various families of graphs. Particularly, we showed that a connected graph G has sn(G) = 1 if and only if G is bipartite. Consequently, every tree T has sn(T) = 1. We also proved that sn(G)=|V(G)|1 if and only if G = Kn. Moreover, a graph G with small chromatic number may have arbitrarily large Sudoku number. In Section 4, we proved that extendable partial coloring problem is NP-complete. Extendable coloring and Sudoku coloring are nice tools for providing a k-coloring of G.

2010 AMS SUBJECT CLASSIFICATION:

1 Introduction

By a graph G=(V,E) we mean a finite undirected connected simple graph of order n=|V| and size m=|E|. For notations and concepts not defined here we refer to the book [Citation1].

We introduce a concept in graph coloring which is motivated by the popular Sudoku puzzle. Let V denote the 81 cells consisting of 9 rows, 9 columns and nine 3 × 3 subsquares. Let G be the graph with vertex set V in which each of the rows, columns and the nine 3 × 3 subsquares are complete graphs. Clearly χ(G)=9 and the solution of a Sudoku puzzle gives a proper vertex coloring of G with nine colors. A Sudoku puzzle corresponds to a proper vertex coloring C of an induced subgraph H of G using at most 9 colors with the property that C can be uniquely extended to a 9-coloring of G. This motivates the following definition.

Definition 1.1.

Let G be a connected graph of order n with chromatic number χ(G)=k2. Let SV and let G[S] be the induced subgraph of G. Let C0 be a proper k-coloring of G[S]. We also call C0a partial coloring of G. The coloring C0 is called an extendable coloring of G[S] if C0 can be extended to a k-coloring for G. We say C0 is a Sudoku coloring of G if C0 can be uniquely extended to a proper k-coloring of G. The smallest order of such an induced subgraph G[S] of G which admits a Sudoku coloring is called the Sudoku number of G and is denoted by sn(G).

Cooper and Kirkpatrick [Citation2] have considered the same concept and introduced several parameters using critical sets. However, in this paper, we adopted different approach and proof techniques.

The natural questions that arises in the context of Sudoku puzzle is “What is the lowest number of clues in a Sudoku puzzle?”. It was long suspected that the number is 17 and in [Citation8], the authors have proved that there is no 16-clue Sudoku puzzle. Thus the Sudoku number for the standard Sudoku puzzle is 17 (see also [Citation7]).

We need the following definitions.

Definition 1.2.

[Citation1] Let G=(V,E) be a graph with chromatic number k. The graph G is uniquely colorable if the partition {V1,V2,,Vk} of V induced by any k-coloring of G is unique up to a permutation.

The concept of list coloring was independently studied by Erdős et al. [Citation4] and Vizing [Citation9].

Definition 1.3.

Given a graph G and a set L(v) of colors for each vertex v, which is called a list or color-list of v, a list coloring is a coloring of G such that the vertex v is colored by a color in the list L(v). If G admits a list coloring for a given list L, then G is called list colorable or L-colorable.

Scheduling problem is one of the classical applications of graph colorings. If the graph associated with an instance of the problem has chromatic number k, then k is the minimum number of timeslots required for a scheduling and each color class represents a time slot. Thus for implementation of a scheduling, the knowledge of the chromatic number alone is not sufficient and we need a k-coloring of G. Extendable coloring and Sudoku coloring are nice tools for providing a k-coloring of G.

In this paper we formulate Sudoku coloring as a list coloring problem and determine the Sudoku number of several classes of graphs.

2 Extension: a list coloring problem

Let C0 be an extendable coloring of G. Then for each uncolored vertex v there are some possible colors that can be used to color the vertex v. The set of all possible colors for v is a color-list of v. The problem of extending C0 to a k-coloring of G is equivalent to a list coloring problem.

In this paper, we use {i|1ik} as the color set for a graph G if χ(G)=k.

Example 2.1.

The partial coloring C0 for the graph given in is an extendable coloring. Also two extensions of C0 to a 3-coloring of G are given in . Thus C0 is an extendable coloring, but not a Sudoku coloring.

Fig. 1 An extendable coloring with at least two extensions.

Fig. 1 An extendable coloring with at least two extensions.

Example 2.2.

Consider the partial coloring C0 for the graph given in .

Fig. 2 A coloring which is not extendable.

Fig. 2 A coloring which is not extendable.

Clearly L(v4)=L(v1)=L(v2)={2,3} and G[{v1,v2,v4}]=K3. Hence G is not L-colorable and so C0 is not an extendable coloring.

Example 2.3.

Consider the partial coloring C0, which involves 2 colors, for the graph given in .

Fig. 3 A Sudoku coloring and its unique extension.

Fig. 3 A Sudoku coloring and its unique extension.

Clearly L(v2)=L(v1)={2,3} and L(v3)=L(v4)={1,3}. So we have . Let C be an extension of C0 to a 3-coloring of G. If v2 is assigned color 3, then the color list of the two adjacent vertices v3 and v4 becomes {1}. Hence the color for v2 is 2. Now the colors to be assigned to the remaining vertices are uniquely determined and hence the coloring C given in is the unique extension of C0. Thus C0 is a Sudoku coloring of G.

Example 2.4.

The partial coloring C0, which involves 3 colors, for the graph given in is a Sudoku coloring.

Fig. 4 A Sudoku coloring and its unique extension.

Fig. 4 A Sudoku coloring and its unique extension.

The argument is similar to Example 2.3. We omit here.

We now present a few results on list coloring of paths and cycles, which are used in the next section.

Lemma 2.1.

Let L(xi) be a list of colors of a vertex xi in the path Pn=x1x2xn,1in. If |L(xi)|2 for each i, then there are at least two list colorings of Pn.

Proof.

We color xi in natural order starting at i = 1. When xi, 1in1, has been colored, then there is at least one color in L(xi+1) can be assigned to xi+1. So we have a list coloring for Pn. Since there are two choices for coloring x1, we have the lemma. □

Lemma 2.2.

Suppose that there exists a list coloring of the cycle Cn=x1x2xnx1 such that the list of colors for each vertex xi satisfies the following conditions:

  1. |L(xi)|2;

  2. L(xi){1,2,3}.

Then there are at least two list colorings of Cn.

Proof.

To show this lemma, we may assume a weaker condition that |L(xi)|=2 for each i. Suppose L(xi) are the same for all i, 1in. Since Cn admits a list coloring, it follows that n is even. Now we are going to show that there exist two list colorings.

Now we assume that not all L(xi) are same. Then there exist two adjacent vertices whose lists are different. Hence we may assume without loss of generality that L(x1)={1,2} and L(xn)={1,3}. Let k be the least positive integer such that 2kn and L(xk)L(x1). If k=n, then we assign color 3 to x1 and by Lemma 2.1 we get two list colorings for the path Cnxn. Suppose kn1. Let ϕ be a list coloring of Cn. Let P=x1x2xk1 and Q=xkxk+1xn. We claim that there exists a list coloring of Cn different from ϕ. We consider two cases.

  1. Let L(xk)={1,3}.

    1. Suppose ϕ(xn)=ϕ(xk)=3. Then by interchanging the colors of the vertices of P, we get another list coloring of Cn.

    2. Suppose ϕ(xn)=ϕ(xk)=1. Then P is an odd path and ϕ(x1)=ϕ(xk1)=2. Now recolor xk with color 3. By Lemma 2.1 we get a list coloring of the path Q and this gives a list coloring of Cn different from ϕ.

    3. Suppose ϕ(xn) and ϕ(xk) are distinct. Without loss of generality, let ϕ(xn)=1 and ϕ(xk)=3. Then ϕ(x1)=2 and ϕ(xk1)={2if k1 is odd1 if k1is even.

      If k – 1 is odd we recolor xk by color 1 and by Case A2, we get a list coloring of Cn different from ϕ. If k – 1 is even, we swap the colors 1 and 2 for P and then recolor xk by 3. Similarly we recolor the inverse path Q1=xnxn1xk and obtain a list coloring different from ϕ.

  2. L(xk)={2,3}.

    If ϕ(xk)=ϕ(xn)=3, the proof is similar to that of Case A1. Suppose ϕ(xk)ϕ(xn).

    1. Suppose ϕ(kn)=1. Using Lemma 2.1, we get a list coloring of the path R=xnxn1x1 in which xn is assigned color 3. Since the color assigned for x1 is 1 or 2, this coloring is also a list coloring of Cn different from ϕ.

    2. Suppose ϕ(xn)=3 and ϕ(xk)=2. Consider a list coloring of the path xkxk+1xnx1x2xk1 in which xk is colored 3. Since the color assigned to xk1 is 1 or 2, this is also a list coloring of Cn which is different from ϕ.

Thus there exist two list colorings of Cn.

We now proceed to present basic properties of Sudoku coloring.

Observation 2.3.

Let G be a connected graph with χ(G)3. Let C0={V1,V2,,Vr} be a Sudoku coloring defined on an induced subgraph G[S], for some SV(G). If rk2, then at least two new color classes are created in the extension process and hence the extension is not unique. Therefore, r=k1 or k.

Let C0 be an extendable coloring of G[S] and let W=V(G)S. Let w1W be the first vertex to be colored in the extension process. Let C1 be the coloring on G[S{w1}]. Let w2 be the next vertex to be colored and let C2 be the resulting coloring of G[S{w1,w2}]. Continuing this process we get a sequence of colorings C0,C1,C2,, Ct where t=|W| and Ct is the required extension of C0 to a k-coloring of G. In the extension process, we update the color-list of the vertices as follows. If a vertex w is assigned color i, then L(w) is replaced by the empty set and the color i is removed from the list of all neighbors of w.

Definition 2.1.

Let G be a graph with χ(G)=k3. Let C0={V1,V2,,Vk1} be an extendable coloring of G[S] and let wW=VS. The vertex w is called a color dominating vertex if w is adjacent to at least one vertex in each color class Vi,1ik1.

Observation 2.4.

If w is a color dominating vertex, then in the extension process, k is the unique color assigned to w.

Definition 2.2.

Let G be a graph with χ(G)=k3. Let C0={V1,V2,,Vk} be an extendable coloring of G[S] and let wVS. The vertex w is called a near-color dominating vertex if there exists a unique color class Vj such that v is not adjacent to any vertex in Vj.

Observation 2.5.

If w is a near-color dominating vertex, then in the extension process, j is the unique color that can be assigned to w.

Example 2.5.

Consider the Sudoku coloring C0 of the graph in . There is no color or near-color dominating vertex.

Example 2.6.

Let C13=v1v2v13v1 be the 13-cycle. Let C0={V1,V2,V3} be a coloring of C13[S], where S={vi|1i13,i is odd},V1={v1,v5,v9},V2={v3,v7,v11} and V3={v13}. Here every vertex w in VS is a near-color dominating vertex and can be assigned a unique color. Thus C0 is a Sudoku coloring of C13 and the unique extension C is given by C=({V1{v12},V2,V3{v2,v4,v6,v8,v10}).

Example 2.7.

Consider the partial coloring C0 for the graph C6(K4) given in .

Fig. 5 A Sudoku coloring for C6(K4).

Fig. 5 A Sudoku coloring for C6(K4).

Clearly C0={{v1},{v3},{v5},{v7,v9,v12}}. The vertex v6 is a near-color dominating vertex for C0 and receives the color 2. Hence C1={{v1},{v3,v6},{v5},{v7,v9,v12}}. Now v11 is a near-color dominating vertex for C1. (Note that v11 is not a near-color dominating vertex for C0). The unique color for v11 is 1. Hence C2={{v1,v11},{v3,v6},{v5},{v7,v9,v12}}. Proceeding like this we get C3={{v1,v11},{v3,v6},{v5,v2},{v7,v9,v12}},C4={{v1,v11},{v3,v6,v8},{v5,v2},{v7,v9,v12}},C5={{v1,v11,v4},{v1,v6,v8},{v5,v2},{v7,v9,v12}}andC6={{v1,v11,v4},{v1,v6,v8},{v5,v2,v10},{v7,v9,v12}}

C6 is the unique extension of C0 to a 4-coloring of G. Also W=VS={v6,v11,v2,v8,v4,v10} where the vertices in W are listed in the order in which colors are assigned in the extension process.

The above examples illustrate the significant role of color dominating vertex and near-color dominating vertex in the extension process of a Sudoku coloring. The following concept provides another tool in this regard.

Definition 2.3.

Let G be a graph with χ(G)=k3. Let C0={V1,V2,,Vk} be an extendable coloring defined on G[S] for some SV. Suppose L is the corresponding list of the vertex set VS. The vertex wVS is called an i-attractive vertex if w satisfies the following conditions.

  1. The chromatic number of the subgraph induced by the closed neighborhood N[w] is k.

  2. There exists a color i{1,2,,k} such that iL(v) for all vN(w), the neighborhood of w.

Clearly if w is an i-attractive vertex, then in any extension of C0, the vertex w is assigned color i. In solving a Sudoku puzzle, this condition is very often used in determining the entry in a cell. But there may be no such vertex in some cases. Please see Example 2.4.

Lemma 2.6.

Let G be a graph with χ(G)=k3. Suppose C0 is an extendable coloring of G[S] for SV(G). If there is a pendant vertex vS, then C0 is not a Sudoku coloring.

Proof.

Let C be an extension of C0 to Gv. Let u be the unique neighbor of v and let i be the color assigned to u. Then v can be assigned any of the colors from the set {1,2,,k}{i}. Thus, C0 has more than one extension and hence the result follows. □

Lemma 2.7.

Let G be a graph with χ(G)=k3. Suppose C0 is an extendable coloring of G[S] for SV(G). If there is an edge xy for which x,yS such that deg(x)k1 and deg(y)k1, then C0 is not a Sudoku coloring of G.

Proof.

Let C be the extension of C0 to G{x,y}. Now the lists of available colors of x and y are {i|1ik}{C(u)|uN(x){y}} and {i|1ik}{C(v)|vN(y){x}}, respectively. By assumption, both of these lists contain at least 2 colors. Thus, C0 can be extended to at least 2 different colorings for G. □

3 Sudoku numbers for some graphs

Theorem 3.1.

Let G be a connected graph of order n. Then sn(G) = 1 if and only if G is a bipartite graph.

Proof.

Let G be a connected bipartite graph. Since the bipartition (V 1, V 2) is uniquely determined, if one vertex of G is assigned color 1, then the 2-coloring of G is uniquely determined. Thus, sn(G) = 1.

Conversely, suppose sn(G)=1. Then there exists a vertex v of G such that the 1-coloring C of K1={v} determines a χ-coloring of G. If χ(G)3, then χ(Gv)2 and any extension of C to a χ-coloring of G is not unique, which is a contradiction. Thus χ(G)=2 and G is bipartite. □

Corollary 3.2.

Every tree T has sn(T) = 1.

In what follows, we only consider graph G with χ(G)3.

Theorem 3.3.

Let G be a uniquely colorable graph and let χ(G)=t. Then sn(G)=t1.

Proof.

Let C={V1,V2,,Vt} be the unique t-coloring of G. Let uiVi and let S={u1,u2,,ut1}. Let C0 be a coloring of G[S] in which ui is assigned the color i. Clearly C0 is uniquely extendable to a t-coloring of G. Hence, sn(G)t1.

Now, let SV(G) and |S|t2. Clearly χ(GS)2. Hence for any coloring of GS, its extension to a χ-coloring of G is not unique. Hence sn(G)t1 and the theorem follows. □

Corollary 3.4.

Let G be a complete t-partite graph with t3, then sn(G)=t1.

In the following theorem we obtain a characterization of connected graphs with order n having Sudoku number n – 1.

Theorem 3.5.

Let G be a connected graph of order n. Then sn(G)=n1 if and only if G = Kn.

Proof.

Suppose sn(G)=n1. Let χ(G)=k and let ϕ={V1,V2,,Vk} be a k-coloring of G. Then each color class Vi has at least one vertex, say vi, which is adjacent to at least one vertex in Vj, ji. Otherwise, there is a (k1)-coloring for G. Let S={v1,v2,,vk}. We claim that the induced subgraph G[S] is complete. Without loss of generality, suppose v1 and v2 are not adjacent. Let w1N(v1)V2 and w2N(v2)V1. Let ψ=ϕ|V{v1,v2} or equivalently ψ is obtained from ϕ by uncoloring v1 and v2. Clearly, v1 can be colored only with color 1 and v2 can be colored only with color 2. Thus, ψ is a Sudoku coloring of G and sn(G)n2, which is a contradiction. Hence, G[S] is complete.

Now, suppose SV. Since G is connected, there exists a vertex uVS such that u is adjacent to a vertex viS, for some i. Suppose uVj,ij. Then η=ϕ|V{vi,vj} is a Sudoku coloring of G, which is again a contradiction. Hence, S = V and G = Kn. The converse follows from Corollary 3.4. □

In the following theorem, we determine the Sudoku number of cycles. This result is given in [Citation2] and for the scope of completeness, we include its proof.

Theorem 3.6.

For n3, sn(Cn)={1 if n is even,n+12otherwise.

Proof.

The case n is even follows from Theorem 3.1. So we assume that n is odd. Hence χ(Cn)=3.

The case n = 3 is obvious. For n5, let Cn=v1v2vnv1. Let S={vj|1jn2,j is odd}{vn1}. Define a coloring C for Cn[S] by C(vi)=1 for i1(mod4),C(vj)=2 for j3(mod4) and C(vn1)=3. This can be uniquely extended to a 3-coloring of Cn since we must have C(vk)=3 for even k=n1 and C(vn)=2. Thus, C is a Sudoku coloring of Cn. Since Cn[S] is of order n+12, we have sn(Cn)n+12.

Suppose there is an extendable coloring ϕ of G[S] with |S|n12. Then |V(G)S|n+12. By pigeonhole principle, there is a K2 subgraph which satisfies the condition of Lemma 2.7. Thus ϕ is not a Sudoku coloring. Hence sn(Cn)=n+12. □

For m2 and 1im, let Gi be a simple graph with an induced subgraph H. An amalgamation of G1,,Gm over H is the simple graph obtained by identifying the vertices of H of each Gi so that the obtained new graph contains a subgraph H induced by the identified vertices. This subgraph H is called the common core of the amalgamation of G1,,Gm. Suppose G is a graph with a proper subgraph Kr, r1. Let A(mG,Kr) be the amalgamation of m2 copies of G over Kr. Note that there may be many non-isomorphic A(mG,Kr) graphs. When r = 1, the graph is also known as one-point union of graphs. Note that A(mK2,K1)K1,m and A(mK3,K1) is the friendship graph fm, m2.

Theorem 3.7.

For m2,n3 and 1r<n, if G=A(mKn,Kr), then sn(G)=m(nr1)+r1.

Proof.

Note that |V(G)|=r+m(nr) and χ(G)=n. Let KKr be the common core of G and let Gi be the i-th copy of Kn.

Choose one vertex in K, say x0, and choose one vertex in each GiK, say xi. Let S=V(G){xi|0im}. Then |S|=m(nr1)+r1.

Now color the vertices of Kx0 from 1 to r – 1; those of G1x1 from r + 1 to n – 1 and those of Gixi (2im) from r + 2 to n, arbitrary. Note that, if n=r+1, then we do not perform the last two assignments. Clearly, this coloring can be extended to an n-coloring of G uniquely. Thus, sn(G)m(nr1)+r1.

Suppose there is an extendable coloring ϕ of G[S] with |S|<m(nr1)+r1. Then |V(G)S|m+2. Considering the m + 1 subgraphs, K and GiK,1im, by pigeonhole principle, there is an edge xy in either K or GiK for i, for which x and y have not been colored.

Let ϕ̂ be an extension of ϕ. Then ϕ̂(x)ϕ̂(y). For convenience, we assume ϕ̂(x)=1 and ϕ̂(y)=2.

  1. Suppose x,yV(GiK) for some i. Since χ(Gi)=n,{ϕ̂(v)|vV(Gi){x,y}}={j|3jn}. Now, if we swap the colors of x and y, then we get another extension of ϕ for all i. Hence ϕ is not a Sudoku coloring.

  2. Suppose x,yV(K). Similar to Case 1, we will obtain that {ϕ̂(v)|vV(Gi){x,y}}={j|3jn} for all i. Again, we may swap the colors of x and y to obtain another extension of ϕ. Hence ϕ is not a Sudoku coloring.

Thus, sn(G)=m(nr1)+r1. □

Corollary 3.8.

For m2,sn(fm)=m.

A tadpole graph T(n, m) is obtained from a cycle Cn and a Pm by identifying a vertex of Cn to an end vertex of Pm.

Theorem 3.9.

For n3 and m2, sn(T(n,m))={1 if n even,n+m2 if n odd.

Proof.

Let Cn=v1v2vnv1 and Pm=u1u2um with v1 = u1. Also let G=T(n,m). The case n is even follows from Theorem 3.1. So, following we assume n is odd.

Suppose m is even. Let S={vi|2in1,i is even}{uj|2jm,j is even} Define a coloring C on G[S] by C(uj)={2 if j2(mod4)3 if j0(mod4) and C(vi)={3 if i2(mod4)2 if i0(mod4)

Now, we can extend this coloring C to a unique 3-coloring of T(n, m) with C(vn)=3,2 depending on whether n1 or 3(mod4), and C(v)=1 for each remaining vertex v. Thus, sn(T(n,m))n+m12=n+m2.

Suppose there is an extendable coloring ϕ of G[S] with |S|n+m32. Then |V(G)S|n+m+12. By Lemma 2.6 we may assume that vmS. Now, consider n+m12 subsets {u2j,u2j+1},1j(m2)/2; {v2i,v2i+1},1i(n1)/2; and {v1}. By pigeonhole principle, there is a K2 in GS which satisfies the condition of Lemma 2.7. Thus ϕ is not a Sudoku coloring. Thus sn(T(n,m))=n+m2.

Suppose m is odd. Let S={vi|2in1,i is even}{uj|1jm,j is odd}. Define a coloring C on G[S] by C(uj)={1 if j1(mod4)3 if j3(mod4) and C(vi)={3 if i2(mod4)2 if i0(mod4)

Now, we can extend this coloring C to a unique 3-coloring of T(n, m) with C(vn)=3,2 depending on whether n1 or 3(mod4), C(vi)=1 for each remaining vertex vi and C(uj)=2 for each remaining vertex uj. Thus, sn(T(n,m))n+m2=n+m2.

Suppose there is an extendable coloring ϕ of G[S] with |S|n+m22, then |V(G)S|n+m2. By Lemma 2.6 we may assume that vmS. Now, consider n+m21 edges u2j1u2j,1j(m1)/2; and v2iv2i+1,1i(n1)/2. By pigeonhole principle, there is an edge xy in GS. If xyu1u2, then by Lemma 2.7 ϕ is not a Sudoku coloring. Now let xy=u1u2. We may additionally assume that no edge of the graph Gu1 lies in GS.

If vnS, then the path vnu1u2 lies in GS. We extend ϕ to G{vn,u1,u2}. Then the color-list of vn,u1,u2 are of at least 2 colors. By Lemma 2.1, ϕ can be extended to at least two 3-colorings of G. Thus ϕ is not a Sudoku coloring.

If vnS, then v2S by the additional condition. This is the same case as the above case.

Thus, sn(T(n,m))=n+m2. □

A lollipop graph L(n, m) is obtained from a Kn and a path Pm by identifying a vertex of Kn to an end vertex of Pm. Note that T(3,m)=L(3,m).

Theorem 3.10.

For n4 and m2,sn(L(n,m))=n+m3.

Proof.

Let the vertices of Kn be vi,1in and Pm=u1u2um with v1 = u1. Obviously χ(L(n,m))=n.

Let G=L(n,m). Let S={vi|3in}{uj|2jm}. Then |S|=n+m3. Define C(vi)=i,3in,C(uj)=2 for even j and C(uj)=1 for odd j, where 2jm. If we extend C, then v1 = u1 must be colored by 1 and v2 by 2. So C is a Sudoku coloring. Hence sn(G)n+m3.

Let ϕ be an extendable coloring of G[S], for some SV(G) with |S|<n+m3. In other words |V(G)S|3. Let x, y, z be three vertices in V(G)S. We extend ϕ to G{x,y,z} first.

Suppose x = ui, 2im. Then the color-list of x contains at least n – 2 colors. Thus ϕ has at least two extensions.

Suppose x, y, z are in Kn. Without loss of generality let x = v2 and y = v3. Hence ϕ is not a Sudoku coloring by Lemma 2.7.

Thus sn(G)=n+m3. □

Let C2n(Km) be a graph obtained from a 2n-cycle C2n by identifying every alternate edge of C2n with an edge of a distinct complete graph Km. Thus, C2n(Km) contains n copies of complete subgraph Km such that the edges not belong to any Km are alternate edges of C2n. If C2n=x1x2x2n1x2nx1, then x2i1x2i is an edge of the i-th complete graph Km, 1in. We will denote the i-th complete graph Km by Ki. When we remove the vertices x2i1 and x2i from the Ki, then the resulting subgraph HiKm2.

Theorem 3.11.

For n2,m3,sn(C2n(Km))=n(m2).

Proof.

Keep the notation defined above. Color any m – 3 vertices of each Hi by {j|4jm},1in. For even n, color x4j+1 by 1 and x4j+3 by 2 for 0j(n2)/2. For odd n, color x4j+1 by 1; x4j+3 by 2 for 0j(n3)/2 and x2n1 by 3.

Clearly, this is a proper coloring for the subgraph of C2n(Km) induced by the colored vertices. To extend this coloring to the whole graph, all x2j’s must be colored by 1, 2, or 3 uniquely. After that, the color of the last uncolored vertex in each Hi is also fixed. Thus, sn(C2n(Km))n(m2).

Suppose there is an extendable coloring ϕ of C2n(Km)[S] with |S|n(m2)1. Then at least 2n+1 vertices of C2n(Km) have not been colored under ϕ. By pigeonhole principle, at least one Ki, say i = 1 for convenience, contains at least three uncolored vertices, say u, v, w. We extend ϕ to be an m-coloring of C2n(Km){u,v,w}. Now, the color-lists of u, v, w are the same and are of size 3. By Lemma 2.2, ϕ is not a Sudoku coloring. Thus sn(C2n(Km))=n(m2). □

Example 3.1.

Two Sudoku colorings for C6(K4) and C8(K4) are given in .

Fig. 6 Sudoku colorings of C6(K4) and C8(K4).

Fig. 6 Sudoku colorings of C6(K4) and C8(K4).

Keep the notation of defining the graph C2n(Km). Let C2n(Km) be the graph obtained from C2n(Km) by removing the n edges x2i1x2i,1in. Thus C2n(Km) is an (m1)-regular graph.

Theorem 3.12.

For n2 and m4,sn(C2n(Km))=(m3)n+1.

Proof.

Let G=C2n(Km). Let yi,j,1jm2, be the vertices of Hi, 1in. Note that χ(G)=m1. We shall first show that sn(G)(m3)n+1.

Suppose n is even. Define a partial coloring C on C2n(Km) by C(yi,j)=j+1 for 1in and 2jm2,C(y1,1)=2. To extend C as an (m1)-coloring, the odd path x2x3y2,1x4x2n1yn,1x2nx1 must be colored alternatively by 1,2 starting from x2 and ending at x1. So C is a Sudoku coloring for G.

Suppose n is odd. Define a partial coloring C on C2n(Km) by C(yi,j)=j+1 for 1in1 and 2jm2,C(y1,1)=2,C(yn,j)=j+1 for 3jm2 (no this case if m = 4), and C(yn,2)=1. To extend C as an (m1)-coloring, the even path x2x3y2,1x4x2n1yn,1x2nx1) must be colored alternatively by 1,2 starting from x2 and ending at x2n3. And then the last 6 vertices yn1,1,x2n2,x2n1,yn,1,x2n,x1 must be colored by 1, 2, 3, 2, 3,1, respectively. So C is a Sudoku coloring for G.

So we have sn(C2n(Km))(m3)n+1 for both cases of n.

Suppose there is an extendable coloring ϕ of G[S] with |S|(m3)n. Let the extension of ϕ be ψ. Then at least 3n vertices of G have not been colored under ϕ.

  1. Suppose yi,j1 and yi,j2 have not been colored under ϕ, for some i, 1j1<j2m2. Then ψ(yi,j1)ψ(yi,j2). Now we may exchange the colors of yi,j1 and yi,j2 to obtain another (m1)-coloring for G. Thus ϕ is not a Sudoku coloring for G.

  2. Suppose at most one yi,j is uncolored by ϕ, for each i. In other word, at most 3 vertices of each Kix2i1x2i have not been colored. By pigeonhole principle, exactly three vertices of Kix2i1x2i have not been colored for each i. That is, x2i1,yi,ji and x2i have not been colored, for some ji. All uncolored vertices induce a 3n-cycle C. The color-list of each vertex containing exactly two colors. By Lemma 2.2, ϕ is not a Sudoku coloring for G.

Thus, sn(C2n(Km))=(m3)n+1. □

Example 3.2.

A Sudoku coloring for C10(K5) and its extension are given in .

Fig. 7 A Sudoku coloring and its extension for C10(K5).

Fig. 7 A Sudoku coloring and its extension for C10(K5−).

Let G1 = K3 with vertices x1,y,z. For i2, let Gi be obtained from Gi1 by adding a vertex xi adjacent to two adjacent vertices of Gi1 (to form a new triangle) so that Gi is a 2-connected plane graph whose faces are triangles. Note that for i3, Gi is not unique. Consequently, every maximal outerplanar graph of order n + 2 is a possible Gn, n1. A fan graph Fn, n2, is obtained from Pn=v1v2vn by joining a vertex u to every vertex of Pn. Thus, Fn is a possible Gn1.

Theorem 3.13.

For i1, let Gi be defined as above. Then sn(Gi)=2.

Proof.

Since χ(Gi)=3, we have sn(Gi)2 for i1. Let S={y,z} and Gi[S] has a coloring C(y)=1,C(z)=2. This coloring can be extended to a unique 3-coloring of Gi since we must color x1 by 3 and for i2, we must color xi by exactly one of 1, 2, or 3 which is different to the colors assigned to its two neighbors. So, sn(Gi)2. Thus, sn(Gi)=2. □

Corollary 3.14.

Every fan graph (and maximal outerplanar graph) G has sn(G) = 2.

A wheel graph Wn, n3 of order n + 1 is obtained from an n-cycle Cn=v1v2vnv1 by joining a vertex u to every vertex of Cn. In each of these graphs, the maximum degree vertex is called the core of the graph.

Theorem 3.15.

For n3,sn(Wn)=2 if n is even, sn(W3)=3 and sn(Wn)=n+12 if n5 is odd.

Proof.

Since Wn is not bipartite, sc(Wn)2.

Suppose n even. It is known that χ(Wn)=3. Let S={u,v1}, then Wn[S] has a coloring C(u)=1,C(v1)=2. This coloring can be uniquely extended to a 3-coloring of Wn since we must have C(vi)=2 for remaining odd i, and C(vi)=3 for even i. So, sn(Wn)2. Hence sn(Wn)=2.

Suppose n is odd. It is known that χ(Wn)=4. The case W3 = K4 follows from Corollary 3.4. We assume n5. Let S={vi | 1in,n is odd}. Now, Wn[S] has a coloring C(vn)=4,C(vi)=2 for i1(mod4),in and C(vi)=3 for i3(mod4),in. This coloring can be uniquely extended to a 4-coloring of Wn since we must have C(u)=1,C(vi)=4 for even in3, and C(vn1)=2 if n1(mod4) while C(vn1)=3 if n3(mod4). So, sn(Wn)n+12.

Suppose there is an extendable coloring ϕ of Wn[S] with |S|n12. Since Cn is Hamiltonian, the number of components of Cn(S{u}) is most |S|n12. Since Cn(S{u}) contains n+12 vertices, there is a K2 subgraph in Cn(S{u}). By Lemma 2.7, ϕ is not a Sudoku coloring. Hence, sn(Wn)=n+12. □

4 Complexity for deciding extendable coloring

We now proceed to prove that for a given partial coloring ϕ of a graph G with χ(G)=k, the problem of deciding whether ϕ is an extendable coloring is NP-complete.

The following is a classical result on graph colorings due to Grötzsch [Citation6].

Theorem 4.1.

Any triangle-free planar graph is 3-colorable.

Extendable Partial Coloring Problem (EPCP)

Instance: A graph G with χ(G)=k and a partial coloring ϕ of G.

Question: Can ϕ be extended to a k-coloring of G?

Garey et al. [Citation5] have proved that 3-colorability of planar graphs with maximum degree at most four is NP-complete. Using this, Dalley [Citation3] proved that 3-colorability of 4-regular planar graphs is NP-complete. Also by Theorem 4.1, any triangle-free planar graph is 3-colorable. Hence the following problem is NP-complete.

3-colorability of 4-regular planar graphs having a triangle T (3C4PG)

Instance: A 4-regular planar graph G having a triangle T.

Question: Can G be colored with 3 colors?

Theorem 4.2.

EPCP is NP-complete.

Proof.

The proof is by reduction from 3C4PG. Let G be a 4-regular planar graph having a triangle T. We construct an instance of EPCP. Let H=G+O2 and let V(O2)={u,v}. Let ϕ be a partial coloring of H which assigns color 4 to u and v, and colors 1, 2, and 3 to the vertices of T. Since color 4 cannot be used for any vertex of G in an extension of ϕ, it follows that is an extendable coloring of H if and only if G is 3-colorable. Hence EPCP is NP-complete. □

5 Conclusion and scope

The standard Sudoku graph is the Cartesian product K9K9 together with nine more copies of K9 corresponding to the nine 3 × 3 subsquares. Hence determining the Sudoku number of KnKn is an interesting problem for further investigation. If G is a disconnected graph with c components, then sn(G)c. Investigation of Sudoku number of disconnected graphs is another interesting direction for further research.

Acknowledgments

The authors are thankful to Stijn Cambie and Bernardo Anibal Subercaseaux Roa for their helpful suggestions in proving Theorems 3.5 and 4.2, respectively.

References

  • Bondy, J. A., Murty, U. S. R. (1976). Graph Theory with Applications. New York: MacMillan.
  • Cooper, J., Kirkpatrick, A. (2014). Critial sets for Sudoku and general graph colorings. Discrete Math. 315–316: 112–119.
  • Dalley, D. P. (1980). Uniqueness of colorability and colorability of planar 4-regular graphs are NP-complete. Discrete Math. 30: 289–293.
  • Erdős, P., Rubin, A. L., Taylor, H. (1979). Choosability in graphs. Congr. Numer. 26: 125–157.
  • Garey, M. R., Johnson, D. S., Stockmeyer, L. (1976). Some simplified NP-complete graph problems. Theor. Comput. Sci. 1: 237–267.
  • Grötzsch, H. (1958–9). Zur Theorie der diskreten Gebilde VII. Ein Dreifarbensatz für dreikreisfrei Netze auf der Kugel. Wiss. Z. Martin-Luther-Univ. Halle-Wittenberg Math.-Natur. Reihe. 8: 109–120.
  • Grötzsch, H. Proper Sudoku with only 17 clues (49 Book series), Kindle Edition.
  • McGuire, G., Tugemann, B., Civario, G. (2014). There is no 16-clue Sudoku: Solving the Sudoku minimum number of clues problem via hitting set enumeration. Exp. Math. 23(2): 190–217.
  • Vizing, V. G. (1976). Vertex colorings with given colors. Metody Diskret. Analiz. 29: 3–10 (in Russian).