• No results found

An In-depth Analysis of ‘An analogue of Ryser’s Theorem for partial Sudoku squares’

N/A
N/A
Protected

Academic year: 2021

Share "An In-depth Analysis of ‘An analogue of Ryser’s Theorem for partial Sudoku squares’"

Copied!
45
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

MSc Mathematics

Master Thesis

An In-depth Analysis of ‘An analogue of

Ryser’s Theorem for partial Sudoku

squares’

Author: Supervisor:

Sam Jennings

dr. G. Regts

Examination date:

(2)

Abstract

This thesis is an in-depth analysis of two theorems stated in An analogue of Ryser’s Theorem for partial Sudoku squares by P. J. Cameron, A. J. W. Hilton, E. R. Vaughan. Their paper builds on Ryser’s Theorem for completing partial Latin squares and aims to create a Sudoku analogue. It looks at the conditions required to complete a partial Sudoku square, precisely when the partially filled cells form a rectangle in the upper left corner, and interprets these conditions in terms of Hall’s Condition. By finding flaws and demonstrating with counterexamples, my analysis of the paper concludes that not all of the results are valid.

Title: An In-depth Analysis of ‘An analogue of Ryser’s Theorem for partial Sudoku squares’

Author: Sam Jennings, sam.jennings@student.uva.nl, 11420340 Supervisor: dr. G. Refts

Second Examiner: dr.V.S. Patel Examination date: 8th July 2020

Korteweg-de Vries Institute for Mathematics University of Amsterdam

Science Park 105-107, 1098 XG Amsterdam http://kdvi.uva.nl

(3)

Contents

Introduction 4

1 The Basics 6

1.1 Latin Squares . . . 6

1.2 Sudoku . . . 6

1.3 List Colouring and Hall’s Condition . . . 7

1.4 Latin Squares and Ryser’s Theorem . . . 11

1.5 Sudoku Analogy . . . 12

2 Theorem 2: Block Case 15 2.1 Introduction . . . 15

2.2 Equitable Colouring . . . 15

2.3 Outline Latin Square . . . 20

2.4 Combining . . . 24

2.5 Worked Example . . . 26

3 Chapter 3 32 3.1 Introduction . . . 32

3.2 Families of (Counter)examples . . . 33

3.2.1 The Valid Case . . . 33

3.2.2 Single Column . . . 33

3.2.3 Multiple Columns . . . 35

3.2.4 Columns and Rows . . . 37

3.3 Theorem 3’ . . . 42

4 Concluding Remarks 43

Popular summary 44

(4)

Introduction

In 1945 An Existence Theorem for Latin Squares [4], Marshall Hall asked: “Is there any combinatorial restriction which prevents us from constructing a Latin square by adding a row at a time?”. In answer to his own question, he gave us his ‘Existence Theorem’ which said there always exists some rows which we can append to a Latin rectangle in order to make it a Latin square. Ryser used M. Hall’s result in 1951 A combinatorial theorem with an application to Latin rectangles [8], to come up with his own theorem which gave a necessary and sufficient condition for extending a partial Latin rectangle to a complete Latin square based on the number of times each symbol occurs. This did not just concern appending rows but columns as well. Further research on the topic was done in 2011 in a collaboration including A. J. W. Hilton titled Completing partial Latin squares: Cropper’s question [2] which reforms the question as a graph colouring prob-lem. The results heavily rely on Hall’s Condition named after Philip Hall (not known to be related to the previously mention Marshall Hall). The authors give many results on the topic significantly, restating Ryser’s initial theorem in terms of Hall’s Condition. A second collaborative paper, also written by Hilton in 2011, called An analogue of Ryser’s Theorem for partial Sudoku squares [3] aims, as the title suggests, to find an analogous result to Ryser’s theorem for Latin rectangles in the more restricted setting of Sudoku squares. The paper [3] culminates in three main theorems, which are reassessed in this thesis. By using the work of the previously mentioned mathematicians, as well as the structure of Sudoku grids, I attempted to reformulate the theorems by ironing out the flaws in the analogies. Of the three theorems, their first is watertight, the second is fundamentally flawed, and the third remains inconclusive. I take a more extensive exam-ination of the first theorem, explaining in more detail the lemmas the authors only refer to, which enables me to reformulate it as an algorithmic process. For the second, I delve into what went wrong in the authors’ proof. I attempt to salvage what I can; however, this results in multiple cases, of which only a couple are concrete. Their final theorem remains inconclusive since an erroneous method is used to prove the result. Redefined as a conjecture, the statement is left to further researchers in the topic to prove or disprove.

(5)

Content Summary

The following will provide a brief overview of what we will be exploring in the rest of this thesis. The remainder of this chapter will go through the preliminary requirements of graph colouring and list colouring. It will look at the mathematical structure of Latin squares and Sudoku squares and give the definitions and configurations which are needed for the later theorems. Chapter 2 will focus entirely on Theorem 2 which is extending a Sudoku rectangle when the predetermined cells form a rectangle and cover entirely a complete number of blocks. We will look at the prerequisite lemmas on equitable colour-ings and outline Latin squares and write them in pseudo-algorithmic form. Applying these lemmas, we will prove the result of Theorem 2 and, using the pseudo-algorithms, create a constructive proof out of it. The final chapter will look at Theorem 3, an attempt at generalising Theorem 2, and some of the details the original authors had overlooked. We will see how these oversights open up the possibility for counterexamples and see which situations we can remedy. Finally, we will explore Theorem 3’, a reformulation of the problem in terms of Hall’s Condition.

(6)

1 The Basics

1.1 Latin Squares

A Latin square of order n is an n × n grid of symbols arranged in such a way that each symbol appears in every row and column exactly once (Figure 1.1). Examples of Latin squares have been seen as early as the 12th century however Leonard Euler was one of the first to analyse them in-depth and bring them to the attention of the mathematical world.

Figure 1.1: An order 6 Latin square

1.2 Sudoku

The classic problem of ‘solving’ a Sudoku is, given a partially filled 9×9 grid (Figure 1.2), to fill the remaining empty cells using mathematical logic so that each row, each column and each of the nine 3×3 blocks contain the digits 1,...,9 (Figure 1.3). There are many variants to the standard puzzle such as changing the dimensions of the composite

(7)

Figure 1.2: A classic 9×9 Sudoku problem Figure 1.3: Its corresponding solution

3×3 blocks and killer Sudoku where the grid is broken into additional regions and the sum of the cells in each region must match a given value. A partially filled grid can either have no solutions, a unique solution, or multiple solutions. The goal of a Sudoku setter is to create a partially filled grid which has a unique solution. If a puzzle has multiple solutions, some of the commonly used solving strategies can fail. In the rest of this thesis, we will only be making the distinction between having solutions and not having solutions.

1.3 List Colouring and Hall’s Condition

Throughout this paper, we will use the idea of graph colouring. There are two distinct types of colouring; vertex (Figure 1.4) and edge (Figure 1.5) colouring. Let G = (V, E) be a graph. In a proper vertex colouring, we give each vertex in V a colour in such a way that no neighbouring vertices share the same colour. Similarly, in a proper edge colouring, no neighbouring edges share the same colour.

Suppose we have a graph in which we want to give a vertex colouring however there is a restriction on which colours each vertex can be. How do we know if it is possible to give it a proper colouring?

Let G = (V, E) be a simple graph, C a list of colours, and C the set of all subsets of C. Then L : V (G) → C is a list assignment from the vertices of the graph to its allowed colours (see Figure 1.6). Let φ : V (G) → C, then φ is a proper L-colouring if φ(v) ∈ L(v) for each v ∈ V (G) and φ(u) 6= φ(v) for each uv ∈ E(G) (see Figure 1.7).

(8)

1

2

3

4 5

Figure 1.4: A graph with a vertex colouring

1 2

3

4 5

Figure 1.5: A graph with an edge colouing

{1, 4} {3, 4} {2, 5} {1, 5} {3, 4} {1, 2} {1, 3} {2, 5}

Figure 1.6: A graph with its associated list from colours C = {1, 2, 3, 4, 5}

One might be familiar with Hall’s Marriage Theorem. This is a theorem which gives a necessary and sufficient condition for the existence of a one-sided matching in a bipartite graph.

Theorem (Hall’s Marriage Theorem). Let G = (U, V, E) be a bipartite graph. There is a U -saturated matching if and only if for each subset W ⊆ U , |W | ≤ |NG(W )| where |NG(W )| is the set of neighbours of W

Another way of considering the possible matchings of a bipartite graph is by reformu-Lating it as a list colouring problem on a complete graph. Construct a complete graph on the number of vertices of U , to each vertex in V we associate a colour and add this colour to the list of each vertex it is adjacent to in the bipartite graph.

This means the problem of finding a saturated matching of a bipartite graph is equivalent to finding a proper L-colouring in the corresponding complete graph. Hall’s Marriage

(9)

1 4 5 1 3 2 3 2

Figure 1.7: A proper L colouring of the graph in Figure 1.6

x1 x2 x3 x4 y1 y2 y3 y4 Figure 1.8: A bipartite graph

L(x1){1, 2} L(x2){2, 4}

L(x3){1, 2} L(x4){1, 3}

Figure 1.9: The corresponding complete graph with list colouring.

(10)

1, 2 2, 3

1, 3 3

Figure 1.10: A graph satisfying Hall’s Condition but with no proper colouring

Theorem can be rephrased as follows;

Theorem (Hall’s Theorem). Suppose L is a list assignment to a complete graph G. Then there is a proper L-colouring if and only if |W | ≤ |S

v∈WL(v)| for each subset W ⊆ V (G).

Hall’s Condition is a generalisation of Hall’s Theorem to simple graphs which are not necessarily complete.

For a graph H with list colouring, L, let H(L, σ) be the induced subgraph generated by those vertices of H which contain colour σ in their list, and α(L, σ, H) the maximum independent number of H(L, σ). A proper colouring, φ of a graph can be seen as partitioning the vertices into independent subsets, one for each colour. This means for any subgraph, H, in any proper colouring, φ−1(σ) ∩ V (H) is an independent set and P

σ∈C|φ

−1(σ) ∩ V (H)| = |V (H)|. Since α(L, σ, H) ≥ |φ−1(σ) ∩ V (H)|, a necessary condition for there to exist an L-colouring of G is that

X

σ∈C

α(L, σ, H) ≥ |V (H)| (1.1) for each subgraph H of G. This is known as Hall’s Condition.

Now let us consider the specific case when G is a complete graph with list colouring L. Since all induced subgraphs H of G are themselves complete graphs,

α(L, σ, H) = (

1 if σ ∈S

v∈HL(v)

0 otherwise (1.2)

as complete graphs have an independence number of 1. Therefore, for complete graphs, Hall’s Condition becomes Hall’s Theorem.

We know that Hall’s Condition is a necessary condition for the existence of a proper colouring and in the case of complete graphs, it is also sufficient, but is it sufficient for all graphs? The most simple counterexample to this is with G = C4.

This leads us to the question of which other graphs is Hall’s Condition sufficient to have a proper colouring.

(11)

Theorem (HJW). [7] The following are equivalent:

(a) for every list assignment L to G such that G and L satisfy Hall’s Condition, there is a proper L-colouring of G;

(b) every block of G is a clique;

(c) G has no induced subgraph isomorphic to Cn, for any n ≥ 4, nor to K4-minus-an-edge

1.4 Latin Squares and Ryser’s Theorem

Definition. For r, s ≤ n, an r × s order n Latin rectangle is an r × s array where each cell contains a symbol from 1, ..., n and each row and column contain at most one of each symbol.

Suppose we have a Latin rectangle in the top left-hand corner of an n × n grid. Ryser proved in [8] 1956 a necessary and sufficient condition required to extend it to a full Latin square.

Theorem (1/Ryser’s Theorem). Let Rl be an r × s Latin rectangle on the symbols {1, 2, ..., n}. Then Rl can be completed to form an n × n Latin square on the symbols {1, 2, ..., n} if and only if N (i) ≥ r + s − n for all 1 ≤ i ≤ n, where N (i) is the number of times the symbol i occurs in Rl.

We can also think of this from a vertex colouring perspective of a graph. Let each of the n2 cells in a Latin square correspond to a vertex in a graph with an edge between two vertices if their associated cells are in the same row or column. The graph we end up with is the Cartesian product of two Kn graphs. It is not difficult to see how an n colouring of this graph is equivalent to a completed Latin square. For a partial Latin square, i.e. one where some of the cells are already filled in, we need to reflect this in the graph by restricting what colours certain vertices can be.

Definition. We define the list assignment for partial Latin Squares:

Ll(i, j) =  

the symbol in the cell (i, j), if cell is filled;

the set of symbols which are not used in row i or column j, if cell is empty.

Recall Hall’s Condition (1) gave us a necessary condition for a graph G and list assign-ment L to have a proper list colouring of its vertices. Using our Cartesian product graph and list assignment for partial Latin squares, we can form a necessary condition for the completion of a partial Latin square in the form of Hall’s Condition.

Hilton and Johnson in [6] 1990 showed that Hall’s Condition could be used to reformulate Ryser’s Theorem to give us the following theorem.

(12)

Theorem (Theorem 1’). Let Rlbe an r × s Latin rectangle on the symbols {1, 2, ..., n}. Let Pl be a partial n × n Latin square with Rl in the top left-hand corner, and the remaining cells empty. Then Pl can be completed to an n × n Latin square if and only if Pl satisfies Hall’s Condition for partial Latin squares.

1.5 Sudoku Analogy

If n = pq, an n × n (p, q)-Sudoku square is an n × n grid filled with the digits 1, .., n satisfying the conditions; each row contains each digit exactly once, each column contains each digit exactly once, each block contains each digit exactly once. The blocks are defined as the set of cells {((x − 1)p + i, (y − 1)q + j) : 1 ≤ i ≤ p, 1 ≤ j ≤ q} for 1 ≤ x ≤ q and 1 ≤ y ≤ p. We will call a row of p blocks a big row, and a column of q blocks, a big column.

An r × s (p, q)-Sudoku rectangle Rs is an r × s grid partitioned into p × q blocks with a possible margin at the bottom and right sides. Each row, column, and block contains the symbols 1, ..., n at most once.

It begs the question of whether there is an analogous result to Ryser’s theorem or its reformulation in the Sudoku setting.

The Sudoku graph is constructed in a similar way to the Latin square graph however edges are also included between vertices if the corresponding cells are in the same block. We define the list assignment for a partial Sudoku in the expected way:

Ls(v) =       

the symbol in the cell v, if cell v is filled;

the set of symbols which are not used in the cells in the same row as v, nor in same column as v, nor in the same block containing v.

With the preliminaries out of the way, we come to the statements of the three main theorems to be discussed in the remainder of this thesis.

Theorem (Theorem 2). Let p|r, q|s and n = pq. Any r × s (p, q)-Sudoku rectangle Rs can be extended to an n × n (p, q)-Sudoku square.

Theorem (Theorem 3). Let n = pq. An r × s (p, q)-Sudoku rectangle Rs can be extended to an n × n (p, q)-Sudoku square if and only if, when r - p, for 1 ≤ α ≤ dr/qe, the graph Sα has a matching from the replicated row vertices into the symbol vertices, and, when s - q, for1 ≤ β ≤ ds/qe, the graph Bβ has a matching from the replicated column vertices into the symbol vertices.

(13)

Figure 1.11: A partially filled (4, 3)-Sudoku square with a 3 × 7 Sudoku rectangle Rs in the upper left corner.

(14)

Figure 1.12: A (2, 2)-Sudoku grid with its corresponding Sudoku grid overlaid

Theorem (Theorem 3’). Let n = pq. Let RS be an r × s (p, q)-Sudoku rectangle on the symbol set C = {1, 2, ..., n}. Let PS be a partial (p, q)-Sudoku square with RS in the top left-hand corner, and the remaining cells empty. Then PS can be completed to an n × n (p, q)-Sudoku square if and only if PS satisfies Hall’s Condition for partial Sudoku squares.

(15)

2 Theorem 2: Block Case

2.1 Introduction

This chapter looks at Theorem 2 in An Analogue of Ryser’s Theorem [3].

Theorem (Theorem 2). Let p|r and q|s, let Rs be an r × s(p, q)-Sudoku rectangle in the upper left corner of a (p × q)-Sudoku grid. Then Rs can be extended to a complete n × n-(p, q) Sudoku square.

Notice that when p|r and q|s, Rs completely covers a whole number of blocks in the upper left corner of the Sudoku grid. For this reason, we will call it the block case when we need to refer back to it in the future. The theorem and proof in the paper tell us we can always extend Rs in the block case however it only alludes to a constructive proof. In the rest of this chapter, we will go through the theorem in much more detail including providing a worked example. Before we begin, we require three lemmas which we will write in their algorithmic form to make the proof of Theorem 2 constructive.

2.2 Equitable Colouring

Let G = (V, E) be a graph and φ : E → {1, 2, ..., k} a k-edge-colouring.

For any vertex v ∈ V , the vertex set of G, and any i ∈ {1, ..., k}, let Ei(v) be the set of edges incident with v of colour i.

Definition. A k-edge-colouring is called equitable if |Ei(v)|−|Ej(v)| ≤ 1 for all v ∈ V (G) and i, j ∈ {1, 2, ..., k}

Lemma. (Lemma 1) Every bipartite multigraph has an equitable 2-colouring.

Proof. Let G = (V, E) be a bipartite multigraph. We are going to use a constructive algorithm to colour the edges by groups, once we have coloured a set of edges, we consider the remaining uncoloured edges to see what to colour next. Since G is bipartite, all cycles are of even length. For each edge independent cycle of G, we can colour its edges alternating the two colours, say red and blue, and see the number of red and blue edges

(16)

incident to each vertex is equal. Once there are no more cycles to be found, we are left with an uncoloured tree or forest. To colour the rest of the graph, we start with a leaf and make a path to another leaf, giving the edges along it an alternating pattern. As long as we have uncoloured edges remaining, this will be possible since we removed all cycles. The vertices between the two endpoints of the path maintain an equal number of red and blue adjacent edges and for the endpoints, this number will differ by one. Therefore, for every vertex, the difference between the number of red and blue edges incident to a vertex is at most one.

Algorithm 1: Equitable 2 colouring 1 BiColour (G);

Input : Bipartite graph G = (V, E)

Output: A partition of E into (E1, E2) such that no e1, e2 ∈ Ei are adjacent 2 for cycle in G do

3 add alternating edges of cycle to E1; 4 add remaining edges of cycle to E2; 5 remove edges of cycle from E; 6 for leaf in G do

7 find path from leaf to another leaf; 8 add alternating edges of path to E1; 9 add remaining edges of path to E2; 10 remove edges of path from E;

The following lemma and proof have been adapted from [9]

Lemma. (Lemma 2) Let k ≥ 1 be an integer, and let G be a bipartite multigraph. Then G has an equitable k-edge-colouring.

Proof. Give G a k-edge-colouring C (not necessarily equitable). For each vertex v ∈ V define the vector E(v) = (E1(v), ..., Ek(v)) where Ep(v) is the number of incident edges of colour p. Then let e(v) = maxp,q(Ep(v) − Eq(v)) and let e∗ = maxve(v). If e∗ < 2, C is equitable. Otherwise, let v, p.q be such that e(v) = e∗ = Ep(v) − Eq(v). Consider the subgraph G0 spanned by the edges of G coloured p and q. We proved in the previous lemma that this has an equitable p, q-colouring, C0so we can update C in such a way. The values Er(v) remains unchanged for r 6= p, q and every v. Thus at least one value e(v) is such that the number of pairs p, q with |Ep(v)−Eq(v)| ≤ e(v)−1 has increased by at least one. The other e(u) have not increased. To see this suppose e∗ = e(v) = Ep(v) − Eq(v) and e(u) = Er(u) − Es(u). If (p, q) = (r, s), then the edges incident to u become more balanced after applying C0. If p, q are distinct from r, s, then Er(u), Es(u) are unchanged hence so is e(u). Now suppose p, q and r, s have one colour in common e∗ = e(v) = Ep(v) − Eq(v) and e(u) = Eq(u) − Es(u). If e(u) were to increase, then Eq(u) must increase after updating C with C0. This can only happen if Ep(u) > Eq(u).

(17)

Otherwise, Ep(u) − Es(u) > Eq(u) − Es(u) so Eq(u) − Es(u) 6= e(u), hence e(u) does not increase. The other three cases of p, q and r, s having one colour in common can be shown to not increase e(u) in a similar way. This procedure of reducing the number of pairs p, q such that e∗ = |Ep(v) − Eq(v)| can be repeated until e∗ < 2 and we get an equitable k-colouring

Algorithm 2: Equitable k colouring 1 Equit (G, k);

Input : Bipartite graph G, k ∈ N

Output: A partition of E into E1, ..., Ek such that no e1, e2 ∈ Ei are adjacent 2 Give G an arbitrary k-edge-colouring, C;

3 for v ∈ V do

4 for i = 1, ..., k do

5 Ei(v) := edges incident to v of colour p 6 e(v) :=maxp,q(Ep(v) − Eq(v))

7 e∗ :=maxve(v); 8 if e∗< 2 then

9 end

10 else

11 choose v ∈ V such that e(v) = e∗= Ep(v) − Eq(v);

12 let G0 be the subgraph spanned by the edges coloured p and q; 13 do C0 :=BiColour(G0);

14 update C with C0; 15 go to 2

We will go through an example of how the algorithm is used in action. Suppose we want to give

Since we split the big column into three smaller columns, we will give the graph an equitable 3-colouring. We will go through this step by step as it is not as straight forward as a 2-colouring. First, give the graph some edge colouring. This could have been any colouring on 3 colours however, to reduce the number of iterations of the algorithm, I have coloured the edges so they are ‘not far from’ equitable (Figure 2.2). We calculate the e value for each vertex and see that e∗ = e(σ1) = 3, i.e. σ1 has 3 more red edges than green ones, so consider the subgraph generated by all red and green edges. We recolour the edges of the subgraph to give it an equitable (red-green) 2-colouring (Figure 2.3) and update the red and green edges in our original graph (Figure 2.4). We repeat the process by choosing the vertex with maximum e, in this case e∗ = e(σ5)

(18)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.1: Bipartite graph to split big column

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

(19)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9 ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.3: Left: red-green subgraph. Right: subgraph after equitable recolouring.

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

(20)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9 ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.5: Left: red-blue subgraph. Right: subgraph after equitable recolouring.

has three more blue edges incident to it than red edges. Again, consider the subgraph of red and blue edges and give them an equitable 2-colouring (Figure 2.5) before updating the red and blue edges in our full graph (Figure 2.6)

Finally, we do the same with σ9 and the green and blue edges (Figure 2.7) so we are left with an equitable 3-coloured graph (Figure 2.17).

We next analyse the time complexity of the giving a bipartite graph an equitable k-colouring. To find the cycles and paths required to give a 2-colouring we can use a depth-first search traversal which is done in O(n + m) where n is the number of vertices of G and m the number of edges. The maximum number of edge-independent cycles and paths in a bipartite graph is O(m) so the run-time of the 2-colouring is O(mn + m2). To calculate the time complexity of giving G an equitable k-edge-colouring, we need to find an upper limit on the number of times we need to update the colouring. To decrease the value of e∗ by at least one, we need to balance each pair of colours p, q such that |Ep(v) − Eq(v)| = e∗ for some v. There are at most k2 pairs of colours which contribute to a fixed e∗. Therefore an upper bound on the number of recolourings we would need before getting an equitable k-colouring is e∗ k2. The overall time complexity is bounded by then O(e∗ k2(mn + m2) = O((mn2+ m2n)k2)

2.3 Outline Latin Square

Recall that a Latin Square is an n × n grid with entries in 1, ..., n such that every row and column contain each symbol exactly once. An Outline Latin Square is a generalised

(21)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.6: Full graph after the second update

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9 ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

(22)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.8: Full graph after the final update

version of a Latin Square where columns, rows and symbols are combined.

Definition. A composition of n is an ordered set of positive integers which sum to n E.g. (3, 1, 2) is a composition of 6.

Definition. Let L be a Latin square of order n, and let S = (p1, ..., ps), T = (q1, ..., qt) and U = (r1, ..., ru) be three compositions of n. An (S, T, U )-amalgamation of L is an s × t array constructed as follows. We place a symbol k in cell (i, j) every time that a symbol from {r1+ ... + rk−1+ 1, ..., r1+ ... + rk} occurs in one of the cells (α, β) of L where α ∈ {p1+ ... + pi−1+ 1, ..., p1+ ... + pi} and β ∈ {q1+ ... + qj−1+ 1, ..., q1+ ... + qj}. The S vector determines the structure of the rows, T determines the structure of the columns, and U determines how multiple values are. See Figures 2.9 and 2.10 for an example of how we create an (S, T, U )-amalgamation from L.

Definition. Let n ≥ 1 be an integer and let S = (p1, ..., ps), T = (q1, .., qt) and U = (r1, .., ru) be three compositions of n. An (S, T, U )-outline Latin square of order n is an s × t array containing n2 symbols from {1, ..., u} (each cell may contain more than one symbol), such that the following conditions hold:

(i) row i contains symbol k pirk times; (ii) column j contains symbol k qjrk times;

(23)

Figure 2.9: An order 6 Latin square L Figure 2.10: An (S, T, U )-amalgamation of L, with S = (3, 1, 2), T = (1, 1, 2, 2), U = (1, 2, 1, 1, 1)

Let L∗ be the (S, T, U )-amalgamation of a Latin square, L, of order n. We will check that L∗ is also an (S, T, U )-outline Latin square of order n. Row i of L∗ has width pi, each occurrence of symbol k in row i of L∗ comes from rk different symbols of L. Since L is a Latin square, each row contains each symbol once so, after combining the rows and symbols, row i contains symbol k pirk times. The two other conditions can be shown similarly.

Lemma. (Lemma 3) Let O be an (S, T, U )-outline Latin square. Then there is a Latin square L such that O is an (S, T, U )-amalgamation of L. [5]

We can think of an order n Latin square as the complete tripartite graph, Kn,n,n with vertex sets corresponding to the rows, columns and symbols, decomposed into triangles. Each triangle describes an entry in the square. An amalgamated Latin square corre-sponds to the grouping of vertices within the three parts of Kn,n,n as defined by S, T, U . In this way, we can see that the conditions of an outline Latin square are symmetric upon switching S, T, U .

Proof. For an (S, T, U )-outline Latin square such that S = T = U = (1, ..., 1), it is easy to see that it is a Latin square. Condition (i) implies each row contains each symbol exactly once. Condition (ii) implies each column contains each symbol exactly once. Condition (iii) implies each cell contains only one symbol. To prove there is an underlying Latin square for each outline Latin square, we split each coordinate of S, T, and U which is not already equal to 1 into unit components. For example in Figure 2.10 we would split the first row into 3 separate rows of width 1. By the symmetry of S, T and U , we can treat splitting a group of columns, rows or symbols in the same way. Without loss of generality, let qj 6= 1, we want to split the jth column of O into qj unit

(24)

columns. Construct a bipartite multigraph, B, with vertex set {ρ1, ..., ρs} corresponding to the rows of O and {σ1, ..., σu} corresponding to the symbols. For each occurrence of k in cell (i, j), draw an edge between ρi and σk. The degree of σk is qjrk and the degree of ρi is piqj. Give the edges of B an equitable edge colouring on colours κ1, ..., κqj. The

number of edges incident to ρi of colour κc is pi. We construct a new (S, T0, U )-outline Latin square, O0, where T0 = (q1, ..., qj−1, 1, ..., 1, qj+1, ..., qt}. Columns 1, ..., j − 1 stay the same. For column c = j, ..., j + qj − 1 put symbol k in cell (i, c) for each edge coloured κcbetween ρi and σk. Then append columns j + 1, ..., t of O to O0. We want to check that O0is an outline Latin square. Condition (i) remains satisfied since we haven’t changed the configuration of rows and symbols. For condition (ii), the new columns contain symbol k rktimes since this is the number of incident edges to σk of each colour in B. It follows that condition (iii) also holds.

2.4 Combining

We now have all of the pieces we need to extend the Sudoku rectangle in the block case. Theorem. (Theorem 2) Let p|r and q|s, let Rs be an r × s(p, q)-Sudoku rectangle in the upper left corner of a (p × q)-Sudoku grid. Then Rs can be extended to a complete n × n − (p, q) Sudoku square.

We will roughly follow the proof as it is written in the main paper [3].

Proof. Our initial configuration is an r × s rectangle in the upper left corner of an n × n grid with the remaining cells all empty. Define a large row to be a p × n rectangle of cells that cover an entire row of blocks (and similarly for a large column). We’ll start filling the empty cells with symbols 1, ..., n, firstly with the first r/p big rows, then the first s/q big columns and finally the remaining lower right rectangle. To fill the remaining blocks in each big row, split each block into p medium (1 × q) cells. We want to fill these medium cells with q symbols in such a way that each small row contains the digits 1, ..., n exactly once and each symbol appears in exactly one of the p medium cells of each block. To do this we create a bipartite graph, G, for each of the big rows. The first vertex set has p vertices; r1, ..., rp for each of the small rows and the second has n; w1, ..., wnfor each of the symbols. Make riwj an edge if symbol j does not already occur in row i. Each ri vertex has degree n − s and each wj has degree (n − s)/q. Now we use Lemma 2 to give G an equitable k colouring with colours 1, ..., (n − s)/q each colour corresponding to one of the remaining blocks. To use the equitable colouring, for edge riwj coloured k, place symbol j in the ith row of the kth empty block of the big row. Since the degree of each symbol vertex is (n − s)/q, the equitable colouring will mean there is exactly one edge of each colour adjacent to each wj. In other words, each symbol will be placed in each block exactly once. Similarly, each row vertex will be adjacent to

(25)

Algorithm 3: Latin Square from Outline Latin Square 1 Latin (S, T, U, O);

Input : S = (p1, ..., ps), T = (q1, ..., qt), U = (r1, ..., ru), O Output: O a Latin square

2 for i = 1, ..., s do 3 if pi 6= 1 then

4 construct bipartite multigraph B with vertex set ρ1, ..., ρs, σ1, ..., σu; 5 for each occurrence of k in cell (i, j), make φjσk an edge;

6 do Equit(B, pi);

7 construct (S0, T, U )-outline Latin square, O0, where S0 = (p1, ..., pi−1, 1, ..., 1, pi+1, ..., ps);

8 for c = i, ..., i + pi− 1 do

9 put symbol k in cell (c, j) for each edge φjσk coloured c; 10 append rows i + 1, ..., s of O to O0

11 S := S0; 12 O := O0 13 for j = 1, ..., t do 14 if qj 6= 1 then

15 construct bipartite multigraph B with vertex set ρ1, ..., ρs, σ1, ..., σu; 16 for each occurrence of k in cell (i, j), make ρiσk an edge;

17 do Equit(B, qj);

18 construct (S, T0, U )-outline Latin square, O0, where T = (q1, ..., qj−1, 1, ..., 1, qj+1, ..., qt);

19 for c = j, ..., j + qj − 1 do

20 put symbol k in cell (i, c) for each edge ρiσk coloured c; 21 append columns j + 1, ..., t of O to O0

22 T := T0; 23 O := O0 24 for k = 1, ..., u do 25 if rk6= 1 then

26 construct bipartite multigraph B with vertex set ρ1, ..., ρs, φ1, ..., φt; 27 for each occurrence of k in cell (i, j), make ρiφj an edge;

28 do Equit(B, rk);

29 construct (S, T, U0)-outline Latin square, O0, where U0 = (r1, ..., rk−1, 1, ..., 1, rk+1, ..., ru);

30 keep symbols 1, ..., k − 1 the same; 31 for c = k, ..., k + rk− 1 do

32 put symbol c in cell (i, j) for each edge ρiφj coloured c;

33 increase the value of the remaining cells by rk− 1 before adding them to O0

34 U := U0; 35 O := O0

(26)

Figure 2.11: Starting Puzzle

exactly q vertices of each colour, so each medium cell will contain q symbols as required. Once the first r/p big rows have been filled, we do the analogous process to the columns. For the last (n − r) × (n − s) cells in the bottom right corner, we treat each block as a single cell and fill them with the digits 1, ..., n.

It is easy to check that what we are left with is an (S, T, U )-Outline Latin Square where S = (1, ..., 1, p, ..., p), T = (1, ..., 1, q, ..., q), U = (1, ..., 1) where S has r 1’s and (n − s)/q p’s and T has s 1’s and (n − r)/p p’s. It has the additional property that grouping the cells into p×q blocks, each block contains 1, ..., n exactly once. By Lemma 3, there exists a Latin square, L, such that the (S, T, U )-amalgamation of L gives us our constructed Latin square which, by our additional property, is also a Sudoku with the same entries as Rs

2.5 Worked Example

We will go through a worked example to show how to extend Rs to a complete Sudoku square in the block case. Let Rs be the 6 × 3 rectangle (Figure 2.11).

Using a bipartite graph G, we will add symbols to the empty cells of the first big row. Here, v1, v2, v3 represent the first three rows of the grid and they are connected to the unused symbols in each row (Figure 2.12).

Since there are two remaining blocks to be filled, G is given an equitable 2-colouring with edges coloured red and blue. The red edges corresponding to the first empty block, and blue to the second. The order of the colours is entirely arbitrary (Figure 2.13).

(27)

v1 v2 v3 w1 w2 w3 w4 w5 w6 w7 w8 w9

Figure 2.12: Bipartite graph for first big row

v1 v2 v3 w1 w2 w3 w4 w5 w6 w7 w8 w9

(28)

v1 v2 v3 w1 w2 w3 w4 w5 w6 w7 w8 w9

Figure 2.14: Coloured bipartite graph for second big row

We create a second bipartite graph with an equitable 2-colouring in a similar fashion for the second big row (Figure 2.14).

Since there is only one empty block in the first big column, the corresponding bipartite graph would be given an equitable 1-colouring so we can just fill each of the three medium (vertical) cells with the three symbols which do not occur in the respective columns. The two final blocks are filled with the symbols 1, ..., 9

What we are left with is an (S, T, U )-Outline Latin square (Figure 2.15), where S = (1, 1, 1, 3, 3), T = (1, 1, 1, 1, 1, 1, 3), U = (1, 1, 1, 1, 1, 1, 1, 1, 1). We will use the Lemma 3 to create a Latin Square from this. The first step is to break down the first big column after Rs into three separate columns. To do this we create a bipartite graph with one vertex set ρ1, ..., ρ7 for the seven rows (remember, now this is an outline Latin square, we are treating the final three rows of the original grid as a single row) and the second vertex set for the nine symbols, with an edge if the corresponding row contains that symbol (Figure 2.16).

Since we split the big column into three smaller columns, we will give the graph an equitable 3-colouring. To see the step by step process of how this is done, see the example in the section on Equitable Colouring.

To use this we associate each colour with one of the sub-columns of the big column (say, red: 1, green: 2, blue: 3) and put each symbol of each row in its corresponding sub-column (Figure 2.18).

(29)

Figure 2.15: (S, T, U )-Outline Latin Square ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

(30)

ρ1 ρ2 ρ3 ρ4 ρ5 ρ6 ρ7 σ1 σ2 σ3 σ4 σ5 σ6 σ7 σ8 σ9

Figure 2.17: Full graph after the final update

(31)

Figure 2.19: Completed Sudoku Square

(32)

3 Chapter 3

3.1 Introduction

We will now move on from the block case and see what changes when p - r or q - s. Let r∗ = br/pcp and s∗ = bs/qcq. If p - r then Rs ‘overflows’ to the right into partially filled blocks and if q - s it overflows beneath. The way An Analogue of Ryser’s Theorem attempts to deal with this is by first filling the partially filled overflow blocks to form a larger Sudoku rectangle, say R+s, and then applying Theorem 2 since we are in the block case. To see whether we can complete the partially filled blocks, we need to define some graphs. We create bipartite graphs Sα for α = 1, 2, ..., (r∗/p) + 1 corresponding to the partially filled big rows and Bβ for β = 1, 2, ..., (s∗/q) + 1 corresponding to the partially filled big columns. To help with clarity of describing these graphs, we first define intermediate graphs Sα∗ and Bβ∗. The bipartite graph Sα∗ has vertex set v1, ..., vp corresponding to the p rows in the α-th big row, i.e. rows (α − 1)p + 1, ..., αp and vertices w1, ..., wn corresponding to the n symbols. At this point, the paper states “The edge [viwj] is placed in Sα∗ if symbol j does not occur in row (α − 1)p + i of Rs.” Whilst this construction would work for Latin squares, Sudoku squares have the stricter condition that a symbol must not occur more than once within the same block. Since the edges in the bipartite graphs represent the possible candidates in each row, we should also discount any clashes within the block. Now we, therefore, place the edge viwj in S∗α if symbol j does not occur in row (α − 1)p + i of Rs AND if symbol j does not occur in the same block. For α = 1, 2, ..., (r∗/p), Sα is constructed from Sα∗ by making q − (s − s∗) copies of the row vertices v1, ..., vp, now labelled v1j, ..., vpj for j = 1, ..., q − (s − s∗) with vij neighbouring the same vertices as vi in Sα∗. We now have a vertex, vx, for each empty cell in the partially filled block of the α-th big row, which is connected to the possible candidates. For the final partially filled block, α = (r∗/p) + 1, Sα is defined similarly with vertex set vij for i = 1, ..., r − r∗ and j = 1, ..., q − (s − s∗) and w1, ..., wn. The bipartite graphs Bβ are constructed similarly but for the (s∗/q) + 1 partially filled big columns.

We are now in a position to state a misleading Theorem 3 from the paper.

Theorem (Theorem 3). Let n = pq. An r×s (p, q)-Sudoku rectangle Rscan be extended to an n × n (p, q)-Sudoku square if and only if, when r - p, for 1 ≤ α ≤ dr/qe, the graph Sα has a matching from the replicated row vertices into the symbol vertices, and, when s - q, for1 ≤ β ≤ ds/qe,the graph Bβ has a matching from the replicated column vertices

(33)

into the symbol vertices.

False proof. Now the bipartite graphs we will need have been defined, we will show how these can be used to fill the partially filled blocks. The empty cells in first r∗/p blocks of big column s∗/q + 1 can be broken into p horizontal medium cells of size 1 × (q − (s − s∗)). We use a matching, Mα, of Sα to fill these horizontal medium cells. If Mα is a matching for Sα, for edge vijwk ∈ Mα, we put symbol k in the empty horizontal medium cell of the ith row in the αth big row. We can use the same method as in the previous theorem to fill the rest of the blocks in the first r∗/p big rows.

Whilst the proof given in the paper is invalid, we can at least take away that the required matchings in Sαand Bβ give us a necessary condition for extending Rsto an n × n (p, q)-Sudoku square. If at least one of the Sα or Bβ graphs does not have a matching, then the corresponding block can not be filled in and, therefore, Rs can not be extended.

3.2 Families of (Counter)examples

In this section, we will show that the statement of Theorem 3 can not be sufficient by examining some counter-examples. We will categorise them, attempt to remedy them some of them, and see which cases we can find a sufficient condition to extend them. Note that for most of these examples they have a symmetric equivalence by interchanging rows and columns. For simplicity, we will only look at one case and the other is implied.

3.2.1 The Valid Case

If we limit ourselves to the case where we have only one partially filled block, Theorem 3 (with redefined bipartite graphs) holds. Let r = p and q - s so we only have one bipartite graph to consider, S1. A complete matching from the replicated row vertices to the symbol vertices can be used to fill in the remaining symbols in the only partially filled block. Since there is only one partially filled block, there is no need to take into account any conflicts with other partially filled blocks (which we will later see is what causes problems in different settings). When we have such a configuration of Rs, then Theorem 3 holds without any modifications.

3.2.2 Single Column

For our first family of grids, let r = r∗ and s = s∗+ q − 1. Here we need to fill in a single column before we can reduce it to the block case. The idea here is to force a symbol to

(34)

Figure 3.1: A 6 × 2 Rsin (3, 3)-Sudoku grid. In this example, it is easy to find matchings for the individual bipartite graphs, just choose symbols 7, 8, 9 in some order for each, but we are now stuck in the situation where symbols 7, 8, 9 appear multiple times in the same column.

appear more than once in the column whilst still making sure each individual bipartite graph has a possible matching(Figure 3.1, 3.2).

We can use this as a way to define our first family; any valid r × s Sudoku rectangle, Rs, with r = r∗ and s = s∗+ q − 1 where at least one symbol is missing from more than one block will force this counterexample. For this family of counter-examples q ≥ 3; if q = 2, each big column would consist of two blocks and each block would have two columns. We would need to find a symbol that does not appear in both blocks of the partially filled big column however since the two blocks make up the whole big column, all symbols will appear exactly once. q = 1 is trivially impossible. For a general (p, q)-Sudoku grid the smallest example of Rs which enforces this contradiction would be is size 2p × (q − 1). Although Theorem 3 does not hold for this family, it is possible to make some modifications to create an alternative sufficient condition.

Lemma. When p|r and s + 1|q or when s|q and p + 1|r. If Rs is an r × s (p, q)-Sudoku rectangle on the symbol set C = {1, 2, ..., n}. Then Rs can be completed to an n × n (p, q)-Sudoku square if and only if Rs satisfies Hall’s Condition for partial Sudoku squares.

Proof. We either have one partial row or one partial column left to fill to reduce to Rs on whole blocks. Without loss of generality, let p|r and s + 1|q so we have cells in a column to fill first. An approach to dealing with grids in this format is to combine the bipartite graphs for each of the partially filled blocks into a single bipartite graph with r row vertices and n symbol vertices. Since we are considering cells in a single column, they are all neighbours, and the induced subgraph of those cells gives a complete graph

(35)

Figure 3.2: A 4 × 5 Rs in (2, 3)-Sudoku grid. Another example of our first family. Here, 6 needs to appear in both of the partially filled blocks however, they can not both be in the same column; the only column available.

on r vertices. A saturated matching from the row vertices to the symbol vertices will ensure that no symbol appears in the column more than once. If such a matching does exist, we can complete the first r entries of the column in one go and can then extend the whole grid. We know that a necessary and sufficient condition for the existence of a matching in a bipartite graph is given in Hall’s Marriage Theorem. Since Hall’s Condition when restricted to complete graphs is equivalent to Hall’s Marriage Theorem, Hall’s Condition is sufficient to extend Rs to the whole block case. By Theorem 2, this can then be extended to a complete n × n (p, q)-Sudoku square which, therefore, must satisfy Hall’s Condition

3.2.3 Multiple Columns

We will now look at the case where we have multiple columns left to fill but still restricting to p|r.

Suppose s ≡ −k mod q, so we have k columns left to fill in the partially filled big column. The idea for this family of counterexamples is to force a symbol to appear k + 1 times within the k columns. To do this Rs must cover at least k + 1 big rows. We construct Rs by assuring at least one symbol does not occur in k + 1 of the partially filled blocks. Note that in order for Rs to be a valid Sudoku rectangle there must be at least one empty big row =⇒ (k + 1)p ≤ r ≤ (q − 1)p. To see this recall that each symbol must occur in each row exactly once. The partially filled big column contains q − k columns of Rs, so if r = n, the ‘missing’ symbol must appear q − k times within

(36)

Figure 3.3: An 8 × 2 Rsin (2, 5)-Sudoku grid. Since s = q − 3 we have three columns to fill in the partially filled blocks. The symbols 9 and 10 must go in all four of the blocks however, there are only three columns to place them in. By the pigeonhole principle, both 9 and 10 must appear in at least one column more than once, creating an invalid puzzle. This does not satisfy Hall’s Condition. The four cells under the two partially filled columns give us the induced subgraph in Figure 3.4

{9, 10} {9, 10}

{9, 10} {9, 10}

Figure 3.4: The induced subgraph of the four cells in Figure 3.3. This does not satisfy Hall’s Condition since P

(37)

the intersection of Rsand the partially filled big column. Since there are q blocks in this intersection, there is no way to assure the ‘missing’ symbol does not appear in k + 1 of the partially filled blocks (see Figure 3.3).

This family of configurations of Rs does also not satisfy Hall’s condition. It is sufficient to check the inequality for the induced subgraph generated by the vertices corresponding to the empty cells in the partially filled blocks which don’t contain the missing symbol. It is difficult to know whether we can extend the approach of dealing with a single column to that of the multiple columns. We can no longer combine the bipartite graphs and make use of Hall’s Marriage Theorem since not all of the cells are neighbours. In other words, in the corresponding graph, it is no longer complete. It also doesn’t satisfy any of the other properties required for Hall’s Condition to be sufficient. However, we can see that none of these examples satisfies Hall’s Condition. For this reason, I suspect that for any configuration such that p|r, Hall’s Condition is sufficient to verify the extendability of Rs.

One may notice that in none of these examples Rs fills an entire column. It is easy to find such examples when we keep the authors’ original definition of edges in Sα and Bβ, see Figure 3.5. However, with the updated definition, I have been unable to find any. It is left as an open question to prove or disprove the existence of these examples.

3.2.4 Columns and Rows

When p - r and q - s we have all of the same possibilities as before but also the interaction between the partially filled big row and column. If we assume that we can fill the big row and big column independently, we just need to consider what happens in their intersection block.

Our next family resembles the single-column case in one dimension. Here we have one column and one row left to fill to complete the partially filled blocks and p > q − 1. For a valid (2p − 1) × (q − 1) Sudoku rectangle in which at least q symbols do not appear, we force a contradiction. The q symbols must appear in the remaining column of the first block. This means they can not appear in the same column of the second block. Since there are q − 1 cells left in the second block and q symbols to place there, this configuration is incompletable. We can extend this to multiple rows being left to fill given the Sudoku grid having the correct dimensions. When p > k(q − 1) we can force the same sort of error with a (2p − k) × (q − 1) Sudoku rectangle where k(q − 1) symbols don’t appear. Again we need to place k(q − 1) + 1 symbols in k(q − 1) cells.

The remaining examples (Figure 3.10, 3.7) are more difficult to classify as they depend a lot more on the dimensions of the starting Sudoku grid. Verifying their existence in higher dimensions becomes a tedious task but it should be clear these can be generalised.

(38)

Figure 3.5: A 9 × 5 Rs in (3, 3)-Sudoku grid. This is an example where Rs fills entire columns. I would not officially classify this as a counter-example since it relies on the original definition of edges in the bipartite graph.

Figure 3.6: A 5 × 2 Rs in (3, 3)-Sudoku grid. This is a simple example of the problems caused in the intersection block. A matching in the first block restricts the symbols 3, 6 and 9 from being used in the third column. Since all three symbols still need to be entered into the second block and they are restricted to two cells, it is impossible to extend this Sudoku rectangle even though the matchings are possible.

(39)

Figure 3.7: A 7 × 5 Rs in (3, 3)-Sudoku grid. This example gives us something similar to Figure 3.6. We can find matchings in the top and middle right blocks (see Figure 3.8, 3.9); these would place 4,9,1 in the top block and 3,5,8 in the middle block. Considering the cell directly below these, due to the new symbols above and the predefined cells in its row, it leaves no possible candidates for this cell.

v1 v2 v3 w1 w4 w9

Figure 3.8: The bipartite graph S1 for Fig-ure 3.7 with a saturated match-ing v1 v2 v3 w3 w5 w8

Figure 3.9: The bipartite graph S2 for Fig-ure 3.7 with a saturated match-ing

(40)

Figure 3.10: A 5 × 5 Rs in (3, 3)-Sudoku grid. The normally defined bipartite graphs; S1, S2, B1, B2, have matchings however recall in section 3.2.2, we showed we could combine the Sα’s (or Bβ’s) if there was a single empty column (row) in the partially filled big column (row). In this case, for the combined biparite graphs we can find matchings (see Figures 3.11 and 3.12) however we are left with one final cell in the intersection of the empty row and column which becomes impossible to fill. This shows that we can not extend the idea of combining bipartite graphs in this way when we have an empty column and row to fill.

(41)

v1 v2 v3 v4 v5 w1 w2 w3 w4 w5 w7

Figure 3.11: The combined bipartite graph S for Figure 3.10 with a satu-rated matching v1 v2 v3 v4 v5 w1 w2 w3 w4 w5 w7

Figure 3.12: The combined bipartite graph B for Figure 3.10 with a satu-rated matching

(42)

In this section we have analysed counterexamples to Theorem 3, primarily focusing on the configurations where either p|r or q|s. In the case where we have a single row/column to complete the partially filled blocks, we have successfully remedied the problem with the use of Hall’s Condition.

3.3 Theorem 3’

The goal of the paper was to find an analogue of Ryser’s Theorem for partial Sudoku squares and the authors’ end product materialises itself/culminates as Theorem 3’. Theorem (Theorem 3’). Let n = pq. Let Rs be an r × s (p, q)-Sudoku rectangle on the symbol set C = {1, 2, ..., n}. Let Ps be a partial (p, q)-Sudoku square with Rs in the top left-hand corner, and the remaining cells empty. Then Ps can be completed to an n × n (p, q)-Sudoku square if and only if Ps satisfies Hall’s Condition for partial Sudoku squares.

The paper claims that Theorem 3’ is a reformulation of Theorem 3, however, since Theorem 3 proved to be incorrect, we must be careful when going through the proof of Theorem 3’ about any assumptions we use. We follow the proof as written in An analogue of Ryser’s Theorem for partial Sudoku squares [3]

’Proof ’: Rs can indeed be extended to a complete Sudoku square if and only if it can be extended to R+s, an (r∗+ p) × (s∗+ q) (p, q)-Sudoku rectangle. Therefore it is sufficient to focus on filling the partially filled blocks. The authors use the matchings from bipartite graphs Sα and Bβ to fill the medium cells as in the proof of Theorem 3. They correctly state that a necessary and sufficient condition for the existence of such a matching in each bipartite graph is Hall’s Theorem

|A| ≤ | [ v∈A

N (v)|

for each subset A of the row/column vertices, and note its equivalence to Hall’s Condi-tion as seen in SecCondi-tion 1.4. If we momentarily disregard the mistake of not considering the interactions of matchings between blocks and imagine Theorem 3 holds, then Hall’s Condition would be sufficient for extendablity. If Hall’s Condition holds then Hall’s in-equality holds for each subgraph, particularly those localised to each individual partially filled block and their subsets. This would mean Hall’s Theorem would be satisfied and we would have the matches required to complete the partial blocks and, hence, the whole square. Unfortunately, the invalidity of Theorem 3 means we can not confirm that a Sudoku rectangle, Rs, satisfying Hall’s Condition is sufficient to give extendability how-ever it also doesn’t disprove the claim. Since none of the counter-examples in section 3.2 satisfy Hall’s Condition, it seems reasonable to conjecture that Theorem 3’ does hold, but we just need to find another way of proving it.

(43)

4 Concluding Remarks

We started this thesis with a chapter on the basics. This introduced all of the tools we would need to dismantle the problem, fix the broken parts and rebuild them into something that works. In chapter two we saw Theorem 2: The Block Case. This showed us that we can always extend Rsto a complete Sudoku square when p - r and s - q. This theorem did not need fixing so we instead turned it into an algorithmic process showing exactly what steps are required to fill the remaining cells. Chapter 3 discussed Theorem 3 and Theorem 3’, utilising counterexamples, we showed that Theorem 3 did not hold. We categorised the counterexamples into families and analysed what went wrong for each case, coming up with some potential solutions however, not all were completely salvageable. Chapter 3 finished with the open question of whether Hall’s Condition is sufficient for the extendibility of Rs. If it is not the case, then precisely which families is it not sufficient for and why? Perhaps we need to use a stronger condition*. If however Theorem 3’ does hold, it will be a nice way to unify all of the families in Section 3.2 and provide a simple (if laborious) test for extendability. It would then open the possibility to research whether it is sufficient for different configurations, such as shifting Rs away from the corner or even non-rectangular configurations. During my research, I spent a lot of time understanding a strengthened version of Hall’s Condition which, although is not used in the bulk of my thesis, could be a vital tool in further research of this topic. Sudoku Hall Condition [1] is a stronger necessary condition for the existence of a proper list colouring and is so named as it mimics techniques used to solve standard Sudoku puzzles. Such a strong link between Hall’s Condition and Sudoku makes me believe it could be crucial in extending this topic however very little research has been done on the condition as admitted in the only paper referencing it.

(44)

Popular summary

When most people come across a Sudoku grid there is little doubt that it can be solved, it, of course, wouldn’t be such a popular puzzle if it wasn’t designed in such a way to give a unique solution. To a mathematician, this isn’t necessarily the most interesting thing about these structures. Studying whether or not the predefined cells can give a solution can open up further application in more general areas of mathematics like graph colouring.

For the sake of familiarity, we will begin with an empty 9 × 9 grid. Start by filling the cells in the top left 3×6 rectangle with digits 1,...,9 making sure none of the digits appear more than once in each column or row as well as each digit appearing exactly once in each of the two 3 × 3 blocks. From this configuration, do you think we can continue filling the remaining cells in the same manner without breaking any of the rules? This thesis shows you can and not only for this specific case but for any dimension Sudoku grid where our starting rectangle covers a whole number of blocks.

Naturally, you may be curious to know what happens when the rectangle overflows into further blocks. This situation is not so straight forward. If we can fill in the partially filled blocks whilst still abiding by the rules then clearly we can fill the rest of the grid without any problems. In An analogue of Ryser’s Theorem for partial Sudoku squares, mathematicians came up with a condition in the area of graph colouring which they believed was sufficient to fill the partially filled blocks however, in my analysis of their paper, I explain why their condition is not enough and attempt to remedy it.

(45)

Bibliography

[1] J. Allagan, M. C. B. Bobga, A. Hilton, P. Johnson, and D. L. J. Lehel. Refinements of hall’s condition. Australasian Journal of Combinatorics, 73:42–70, 2019.

[2] B. B. Bobga, J. L. Goldwasser, A. J. W. Hilton, and P. D. J. Jr. Completing partial latin squares: Cropper’s question. Australasian Journal of Combinatorics, 49:127– 151, 2011.

[3] P. J. Cameron, A. J. W. Hilton, and E. R. Vaughan. An analogue of ryser’s theorem for partial sudoku squares. Journal of Combinatorial Mathematics and Combinatorial Computing, 80, 2011.

[4] M. Hall. An existence theorem for latin squares. Bulletin of the American Mathe-matical Society, 51(6):387–388, 1945.

[5] A. Hilton. The reconstruction of latin squares with applications to school timetabling and to experimental design. Math. Programming Study, 13:68–77, 2009.

[6] A. Hilton and P. Johnson. A variation of ryser’s theorem and a necessary condition for the list- colouring problem. Graph Colourings, 128, 1990.

[7] A. J. W. Hilton and P. D. J. Jr. Extending hall’s theorem. Topics in Combinatorics and Graph Theory: Essays in Honour of Gerhard Ringel, 1990.

[8] H. Ryser. A combinatorial theorem with an application to latin rectangles. Proc Amer Math Soc, 2, 1951.

[9] D. D. Werra. Equitable colorations of graphs. Revue fran¸caise d’Informatique et de Recherche Op´erationnelle, 5, 1971.

Referenties

GERELATEERDE DOCUMENTEN

All of us who eat animals and animal products are 29 how farm animals are treated, so first we should consider more carefully how we as a country treat farm animals on

Generally, the computational time of the traversal algorithm is acceptable and selecting a suitable τ (particularly, for some applications, the best τ is indeed negative) can

There is a further possibility that the techniques used to improve compressed air usage at South African mines could be applied and implemented at similar mines or

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication:.. • A submitted manuscript is

part and parcel of Botswana life today, the sangoma cult yet thrives in the Francistown context because it is one of the few symbolic and ritual complexes (African Independent

Two possible explanations have been discussed by Duchêne (1999) for a low multiplicity of the Ophiuchus star forming region when compared to Taurus-Auriga. a) The distribution of

So far, AKI biomarkers have been thought to fall roughly into three categories: classical biomarkers for kidney function, such as serum creatinine and urinary output, which form

(martin) Registered revision name (*): Revision 1.3 Behaviour if value is not registered: Not registered user name: someusername Not registered revision name: Revision 1.4