Counting, Generating, and Solving Sudoku

Size: px
Start display at page:

Download "Counting, Generating, and Solving Sudoku"

Transcription

1 Counting, Generating, and Solving Sudoku Mathias Weller April 21, 2008 Abstract In this work, we give an overview of the research done so far on the topic of Sudoku grid enumeration, solving, and generating Sudoku puzzles. We examine possible extensions and generalizations of previous work on solving and generating Sudoku puzzles focusing mainly on rulebased solvers. A possible way to influence the difficulty of a generated Sudoku puzzle is described and we introduce new deduction rules for solving a puzzle based on the rules described by David Eppstein in his paper Nonrepetitive Paths and Cycles in Graphs with Application to Sudoku. We then generalize these new rules further leading to an efficient constraint propagation algorithm that is able to solve puzzles that could not be solved by applying only Eppstein s deduction rules. The implementation of this strategy and how it may be used to implement the special cases is explained, followed by a practical evaluation of the solving power of all presented solvers. 1

2 Contents 1 Introduction The Sudoku Game Sudoku Variants Prior Work Counting Sudoku Grids Complexity Short Introduction to NP-completeness Sudoku Decision Problem Complexity of the Sudoku Decision Problem Generating Sudoku Puzzles Incremental Generation Decremental Generation Judging the Difficulty of Generated Sudoku Puzzles Finding Solutions to Sudoku Puzzles Solving Sudoku Puzzles via Backtracking Solving Sudoku Puzzles via Constraint Programming Solving Sudoku Puzzles via Logic Deduction Graph Coloring Generalization and Contribution Counting Sudoku Generating Sudoku Puzzles Finding a Full Sudoku Grid Deletion Witnesses Judging the Difficulty of Generated Sudoku Puzzles Finding Solutions to Sudoku Puzzles Extension of Bilocation and Bivalue Group-Modified Rules Limited Constraint Propagation Experimental Results 31 5 Outlook and Future Work 32 2

3 1 Introduction Sudoku (or Number place, as it is called in the US) is a well-known logic puzzle popular for its appearance in newspapers and magazines. Its popularity is expressed in examples like a Boston Japanese restaurant that hands out $10 gift certificates to patrons who can finish a Sudoku puzzle before their Sushi is served. There are official tournaments in Europe and the US with the possibility to win monetary prizes [Sem05]. Solving a Sudoku puzzle is usually very satisfactory for the puzzler, or, to quote Henry Dudeney, A good puzzle, like virtue, is its own reward [Dud02]. Sudoku is a derivative of Latin Square, a puzzle first described by Leonhard Euler in The Sudoku puzzle was first created for Dell Magazines by Howard Garnes, an architect from Indianapolis and introduced to the US public in It was not until seven years later that Sudoku was successful in Japan, where it was first published by the Nikoli company under its current name, which is Japanese for single number. At the beginning of the 21 st century, the puzzle spread all over the world. This international success partially relies on using numbers instead of letters or words [Sem05]. When solving Sudoku puzzles, one naturally stumbles upon a variety of questions: Does my puzzle have a solution? If so, is it the only one for my puzzle? If not, how many solutions are there and is there a systematic way of determining all solutions? Does the puzzle become harder if there were less hints? What is the minimum number of hints in order to assure a unique solution? In this article, we will consider some of these and other questions. 1.1 The Sudoku Game Sudoku is a puzzle game played on a grid that consists of 9 9 cells each belonging to three groups: one of nine rows, one of nine columns and one of nine blocks (sometimes called boxes or subsquares). Three blocks in a row are called a band, three vertically stacked blocks are called a stack, a chute is either a band or a stack (see Figure 1). A Sudoku grid is full, if each group contains the numerals from 1 to 9 exactly once. Figure 1 shows a full Sudoku grid. A Sudoku puzzle is a Sudoku grid that is partially filled, meaning that a set of fixed cells (cells whose numerals are given, i.e. that cannot be chosen by the solver), also called hints or clues is provided by a puzzle master, whereas the other cells are blank. Figure 2 shows a possible Sudoku puzzle for the grid in Figure 1. The objective of the puzzle game is to fill the Sudoku grid by assigning a numeral to each blank cell in such a way that each numeral is unique in each of its three groups. A solution to a Sudoku puzzle is a full Sudoku grid that is consistent with the puzzle, meaning that all hints of the puzzle appear in the full grid as well. Figure 1 is a solution to the puzzle in Figure 2. A Sudoku grid is called proper or unisolvent if it has only one solution, ambiguous if it has more than one solution and invalid if it has no solution at all, due to contradicting hints. Most daily newspaper Sudoku puzzles provide about 28 or 30 clues, but for the difficulty of the puzzle, the number of hints matters less than the complexity of the logical leaps required to assign numerals to the blank cells 3

4 Figure 1: A full Sudoku grid. On the right, the first band and the second stack are marked Figure 2: A proper Sudoku puzzle. 4

5 [Sem05]. As opposed to the difficulty, the number of clues plays a crucial role in determining the properness of a puzzle. So far, no proper 9 9 Sudoku puzzles with less than 17 hints is known, whereas there are several proper puzzles with exactly 17 hints. The minimal number of hints necessary for an n n puzzle to have a unique solution is yet unknown [HM07], although a lower bound of n 1 is easy to prove: if a puzzle had only n 2 hints, then there are two numerals that are not specified by the puzzle. These two numerals may be exchanged throughout the solution to the puzzle in order to obtain another solution for it and thus, the puzzle cannot be proper (see also Section 2.6 on page 18). In order to do complexity analysis for solving Sudoku puzzles, we parametrize them. In this case, the size of each group (meaning the number of different numerals) (n = 9), the order of the Sudoku grid, meaning the length of a side of the blocks (m = n = 3), or the number of cells in the Sudoku grid (h = n 2 = 81) may be used. Since they are all polynomial in one another, an efficient algorithm with regard to any of these parameters is efficient with regard to all of them, hence efficiency is invariant under choosing one of the mentioned parameters. For reasons of compatibility with other papers, n will refer to the number of different numerals in the following part of the article, if not explicitly stated otherwise. Though it is common to use numerals to fill the Sudoku grid, letters, pictures or any kind of items dividable into at least n disjoint equivalence classes is suitable as well. Sudoku is closely related to the Latin Square problem: given an n n square of cells and a set of fixed cells, find a completely filled n n grid that is a superset of the fixed cells such that each item is unique for its column and row while still using only n different types of items. Figure 3 shows an example of a Latin Square puzzle and its solution Figure 3: A 9 9 Latin Square puzzle and its solution. 5

6 Figure 4: An 8 8 Sudoku puzzle with 2 4 groups. Figure 5: The 12 pentomino groups. 1.2 Sudoku Variants Although this article is mainly about plain Sudoku as described above, this short introduction to Sudoku variants may be of interest for the reader. As already mentioned, a Sudoku grid may have any dimension n, although 9 9 puzzles are by far the most common. There are also puzzles that do not have the same number of stacks and bands. An example is the 8 8 Sudoku puzzle shown in Figure 4. The groups may be irregular, which allows for 5 5 grids with pentomino groups (groups of irregular shape that contain exactly five cells, see Figure 5). This type of puzzle is also known as Logi-5. Apart from geometric differences, there are several Sudoku variants that impose new rules or modify the existing rules of the puzzle: The Sudoku X variant enforces the numerals in the cells on the diagonals to be unique for each diagonal (see Figure 6) [Mon05]. The Hypersudoku variant, also called Windocu consists of a normal Sudoku grid that is supplemented with additional regions that have to contain each numeral exactly once. These regions overlap the blocks, thereby giving additional information (see Figure 6). The Samurai Sudoku variant consists of five 9 9 Sudoku puzzles arranged in a quincunx 1 such that the grid in the 1 A quincunx is a formation of five entities similar to a cross. For example, the five dots on a side of a dice form a quincunx. 6

7 Figure 6: Left: A 9 9 Sudoku X grid. Right: A 9 9 Hypersudoku grid. middle is being overlapped by the other four grids in its four corners, such that the middle grid shares one block with each of the other grids while the outer grids are disjoint (see Figure 7) [Tel06]. The circular Sudoku variant employs a circular formation of cells that is divided into segments and rings. Each cell has to be assigned a numeral such that each ring and each pair of neighboring sectors contain each numeral exactly once (see Figure 8) [PMH06]. A variant combining the idea of the Rubik s cube with Sudoku puzzles is the Sudokucube, a cube that can be solved by turning plains of subcubes in such a way that each side becomes a valid Sudoku grid. Hence the cube contains the numbers 1 to 9 exactly 6 times each. Variants that use letters instead of numerals may enforce the formation of a valid word at some place in the grid. For almost every Sudoku variant, there is another variant with the nonconsecutive property, meaning that no two neighboring cells may be assigned consecutive numerals. Other variants may modify the way in which hints are given, for example the 2005 U.S. Puzzle Championship featured a puzzle that contained ranges of numerals as hints. 2 Prior Work In this chapter, publications about Sudoku puzzles are being introduced: For a start, we will consider the problem of counting possible Sudoku grids in Section 2.1. A general complexity consideration in Section 2.2 will introduce to the topic of generating (Section 2.3) and solving (Section 2.5) Sudoku puzzles. In Section 2.4, the problem of judging the difficulty of a generated puzzle will be addressed. We will show parallels to the Graph-n-Coloring problem in Section 2.6. Chapter 3 will introduce thoughts and ideas developed from the approaches of Chapter 2 and finally, results of applying some of these ideas are given in Chapter 4. 7

8 Figure 7: A 9 9 Samurai Sudoku grid. Figure 8: A circular Sudoku puzzle with n = 8. 8

9 2.1 Counting Sudoku Grids This section is a short summary of what was done so far on the topic of determining the number of full Sudoku grids of specific dimensions. For a more detailed view, please refer to the literature given in the section. First of all, we are interested in the number of different full Sudoku grids of a certain order. To calculate this number, we first need a definition of difference regarding Sudoku grids. Therefore, an equality relation is to be provided that relates equal Sudoku grids. Hence two grids that are not related are considered different. For the following lemmas, two Sudoku grids are considered equal if every cell of a grid contains the same numeral as the cell at the same position in the other grid. This equality relation will be referred to as E. Lemma 2.1 ([HM07]) There are N 4 4 = 288 valid full 4 4 Sudoku grids. Lemma 2.2 ([FJ06]) There are valid full 9 9 Sudoku grids. N 9 9 = 6, 670, 903, 752, 021, 072, 936, 960 Remark The lemmas were proved using a combination of symmetry consideration and brute force calculation, which did not allow for the calculation of the exact number of valid Sudoku grids yet, so this is an open problem. This result may satisfy for the time being, but the fact that in order to calculate these numbers a Sudoku grid and the version of the grid that is simply rotated by 90 are considered different may be disturbing. Hence another equality relation is presented: Definition Let S denominate the set of all full Sudoku grids of a certain order. A transformation t : S S is called validity-preserving. Let T be a set of validity-preserving transformations. We define the equality relation E T S S with (s 1, s 2 ) E T k N t 1,..., t k T ((t 1 t 2... t k )(s 1 ), s 2 ) E. Remark The relation E T relates two grids iff one can be transformed into the other by using only transformations in T. Note that being validity-preserving is invariant with respect to composition, thus t 1 t 2... t k is a validity-preserving transformation but is not necessarily in T. So far, a number of transformations that preserve the validity of a Sudoku grid are known. For example, a Sudoku grid may be rotated by a multiple of 90 without affecting its validity. Furthermore, it is possible to permute the numerals throughout the entire grid without changing the validity of the grid because generally the items in a Sudoku grid are not ordered. More transformations will be mentioned later in this section and additional possibilities will be discussed in Section

10 Definition Let T 1 be the set that consists of the following validity-preserving transformations: Permuting numerals Permuting rows in the same band Permuting bands Transposing the grid (That is, mirroring the grid by the main diagonal) The equality relation E := E T1 is being referred to when speaking of essentially different Sudoku grids. For irregular puzzle sizes, the transposition is not validity preserving. The following transformations are referred to when speaking of essentially different irregular Sudoku grids: Permuting numerals Permuting rows in the same band Permuting bands Permuting columns in the same stack Permuting stacks Lemma 2.3 ([HM07]) There are N 4 4 = 2 essentially different 4 4 Sudoku grids (see Figure 9) Figure 9: Representatives of the only two equivalence classes of 4 4 Sudoku grids with respect to essentially different Sudoku grids. Lemma 2.4 ([RJ06a]) There are N 9 9 = 5, 472, 730, 538 essentially different 9 9 Sudoku grids. Other Sudoku variants were analyzed as well. Applying the transformations listed in Definition 2.1 to different grid sizes results in different numbers of full grids. An overview about these results is given in Table 1. 10

11 Grid type Block types Number of essentially different Sudoku grids (See Lemma 2.3) [RJ06b] , 673, 187 [Rus06] , 743, 933, 602, 050, 718 [Pet06] , 472, 730, 538 (See Lemma 2.4) Table 1: Number of different Sudoku grids with respect to E for different puzzle sizes. Note that different transformations apply for irregular Sudoku puzzle sizes. 2.2 Complexity From the point of view of a student of theoretical computer science, a very important consideration is the complexity analysis of a problem. In this section, we will discuss the decision variant of the Sudoku problem. This will be defined in Section 2.2.2, after a short introduction to NP-completeness Short Introduction to NP-completeness This section will provide a brief overview over the topic of NP-completeness. First of all, it is important to know some terms: In computer science, an algorithm is called deterministic if each step is determined only by prior steps and the input data. A deterministic algorithm is called efficient if its running time is bounded by a polynomial in the size of the input data. The set of problems that are solvable efficiently is denominated by P, while NP denominates the set of problems whose solutions are efficiently verifiable. Let A and B be problems in NP, then a function f is called a reduction from A to B if for any input d, d A f(d) B and the computation of f(d) is deterministic and efficient. So the question whether d A can be answered by applying the reduction f to d and testing whether f(d) B. If such a function exists for two problems A and B, A is called reducible to B. Note that if f(d) B can be determined efficiently, so can d A. Also note that the binary reducible-relation is transitive, meaning that if A is reducible to B and B is reducible to C, A is also reducible to C. A problem Q in NP is called NP-complete, if all problems in NP can be reduced to it. Hence, if Q was solvable efficiently, all problems in NP would be. For example, the SAT Problem, which is to tell whether a given Boolean formula in conjunctive normal form has a satisfying assignment, in other words, if the formula can evaluate to true, is NP-complete. It is yet unknown if efficiently finding solutions to the problems in NP is possible. This is called the P vs. NP Problem. 11

12 2.2.2 Sudoku Decision Problem We refer to the Sudoku problem as the problem of finding a solution to a given Sudoku puzzle. Much like SAT, where the decision problem is to find whether a satisfying assignment of all variables of a given formula exists, the decision problem for Sudoku is to find whether a solution to a given Sudoku puzzle exists. Note that it does not matter if the solution is ambiguous or not, the uniqueness of a solution is not of interest. The decision variant of the Latin Square problem is defined analogously Complexity of the Sudoku Decision Problem The Sudoku decision problem is in NP. Obviously, the size of an n n Sudoku grid is polynomial in n and thus a given solution to the grid can be verified efficiently. It has been shown that the decision problem of Sudoku is NPcomplete by reducing Latin Square, which is known to be NP-complete, to Sudoku [YS03]. In the following, a sketch of the proof will be presented: To solve an n n Latin Square, we construct a k k Sudoku grid with k = n 2 as follows: let S(i, j) denote the numeral in the cell of the Sudoku grid whose column is i and whose row is j and let L(r, s) denote the cell of the Latin Square whose column is r and whose row is s. The Sudoku grid is then constructed respecting the equation { r(l(i 1, (j 1)/n)), if stack((i, j)) = rowband((i, j)) = 1, S(i, j) = tr n ((i, j)), otherwise with tr n (x) = (colstack(x) n + stack(x) + row(x)) mod n where rowband(x) stands for the number of the row in the band of cell x, and colstack(x) stands for the number of the column in the stack of cell x. The functions stack(x) and row(x) stand for the stack and the row of x respectively. This leads to { r(l(i 1, j 1 S(i, j) = n )), if i 1 n = (j 1) mod n = 0, tr n ((i, j)), otherwise. with r being a bijection that maps the n numerals of the Latin Square to n of the k numerals of the Sudoku: and r(x) = (x 1) n + 1, i 1 tr n (x) = (((i 1) mod n) n + + j 1) mod n n This construction enforces the assignment of all numerals d with x {0,..., n} : d = r(x) 12

13 Figure 10: An example for the reduction from Latin Square to Sudoku. to the cells with i 1 = (j 1) mod n = 0 n but does not enforce any ordering on them other than the Latin Square rules for the resulting grid to comply with the Sudoku rules. Figure 10 shows an example for the reduction of a 3 3 Latin Square: together, the gray cells make up a solution to the given Latin Square. The numerals 1, 4 and 7 in the gray cells of the Sudoku grid are translated to the numerals 1,2 and 3 in the Latin Square. 2.3 Generating Sudoku Puzzles Generating a Sudoku puzzle is the task of choosing a subset of cells of the Sudoku grid to contain hints to enable the solver to calculate a solution for the puzzle. To be satisfactory for human solvers, the solution implied by the hints should be unique, so it is desirable to generate proper puzzles. Basically, there are two different methods to create a proper Sudoku puzzle: Incremental generation, which assigns numerals to one cell after another until sufficient hints are given for the puzzle to have a unique solution. Decremental generation removes numerals from the cells of a full Sudoku grid for as long as desired or possible in order for the solution to stay unique Incremental Generation Several Sudoku programmer forums advice to implement Sudoku generators that (randomly) pick cells and assign a (random) non-conflicting numeral to them until an automated solver can solve it. The disadvantage of this method is that determining if a numeral contradicts another in a partially filled Sudoku grid in general requires a solver. When assigning a random numeral to a random cell, the puzzle may become invalid so the generator must either utilize backtracking to find another cell or numeral, or discard the whole puzzle and start over when a puzzle becomes invalid. 13

14 Figure 11: Trivial Sudoku grid generated by S(x, y) = (( x/m +m (x mod m)+ y) mod n) + 1, where x is the number of the row of the cell starting with 0 and y is the number of its column starting with 0, n is the number of numerals and m = n is the order of the Sudoku grid Decremental Generation To generate a Sudoku puzzle decrementally, we have to create a completely filled grid first. There are multiple methods for how this can be achieved: For instance, we could just take an existing Sudoku grid or generate a trivial Sudoku grid by employing a mathematical formula (see Figure 11). The transformation of an existing grid using validity-preserving transformations will also yield a new Sudoku grid. We can also employ an algorithm for incremental generation of Sudoku puzzles and apply a solver to it. This last method may seem intricate but may be of interest for complexity analysis. After generating a full Sudoku grid, the numerals from this grid are being removed for as long as possible for the solution to stay unique. Therein lies the problem of indirect generation of Sudoku puzzles, because determining if a Sudoku grid is proper is not trivial and usually requires a solver. If the removal of a numeral causes the puzzle to not be proper anymore, backtracking is used or the puzzle is discarded. 2.4 Judging the Difficulty of Generated Sudoku Puzzles With the generation of a Sudoku puzzle comes the task to judge its difficulty. To the best of our knowledge, all Sudoku puzzle generators determine the difficulty of a puzzle after its generation, which has the disadvantage that one cannot choose the difficulty of the puzzle to be generated. In order to get a puzzle of desired difficulty, the generator may have to be run multiple times. Eppstein s generator judges a puzzle by the logic rules needed to solve it. Each rule is assigned a value and the difficulty value of the puzzle equals the maximum difficulty value of all rules needed to solve it, where the solver only applies a difficult rule if all simpler rules have been exhausted [Epp05b]. This means that if we were to generate a Sudoku puzzle of a certain difficulty, we would need an 14

15 automated solver. 2.5 Finding Solutions to Sudoku Puzzles Finding solutions to Sudoku puzzles is easily done by a simple backtracking algorithm explained in Section However, there are two main reasons why this is not desirable: Backtracking in general takes too much time and it is not fitting to judge the difficulty of a Sudoku puzzle. For the purpose of simulating a human solver and thus evaluating the difficulty of a Sudoku puzzle in context of human strategies, solving it with a set of deduction-rules is of great interest. For these reasons this article is focused on (efficient) non-backtracking algorithms for solving Sudoku puzzles and just briefly introduces other options Solving Sudoku Puzzles via Backtracking To solve a given Sudoku puzzle we can traverse the search tree of all compatible Sudoku grids, that is, grids that extend the puzzle. This leads to a trial and error backtracking algorithm: 1. Find an unfixed cell in the grid. 2. Choose a possible numeral for it. 3. With the new fixed cell, solve the grid (recursively). 4. If the choice leads to an invalid grid, track back and try another possible numeral. The worst case running time of such an algorithm is Ω(n n k ), with k being the number of fixed cells, hence, if n k ω(1) it exceeds polynomial boundaries. It is easy to see that performing backtracking on a constant part of a Sudoku puzzle is generally not enough to solve it. However, in practice, the backtracking algorithm can be modified so that it often takes linear time to solve a given puzzle: instead of randomly picking a cell to branch from, choose the one with the least number of possible numerals. Although it has a superpolynomial worst case running time, the backtracking algorithm is capable of solving any proper Sudoku puzzle and determining every solution to an ambiguous Sudoku puzzle Solving Sudoku Puzzles via Constraint Programming Constraint Programming is the problem of finding an assignment to a given set of variables in a given domain that complies to a given set of constraints. For example, solving alphametic puzzles can be solved by Constraint Programming. A famous alphametic puzzle is shown in Figure 12. Applied to this puzzle, the Constraint Programming algorithm will come up with an assignment of the variables respecting the given constraints. One may utilize Constraint Programming to solve Sudoku puzzles by implementing the fundamental rules of Sudoku as constraints over the domain 15

16 s e n d m o r e m o n e y Figure 12: A popular alphametic puzzle. The objective is to find values for s, e, n, d, m, o, r, y {0... 9} with s 0, m 0, (1000s + 100e + 10n + d) + (1000m + 100o + 10r + e) = 10000m o + 100n + 10e + y, and no two different variables being assigned the same value. {1,..., n}: Each numeral must be unique for its column, row and block. In general, Constraint Programming is NP-complete and equally suitable for solving any given Sudoku puzzle as the backtracking algorithm. In the Internet, there are a lot of examples and tutorials on how to tweak constraint programming for Sudoku, effectively improving the performance for example by cutting down symmetric branches Solving Sudoku Puzzles via Logic Deduction This method tries to mimic a human solver by applying a set of rules that rule out possibilities for numerals in certain cells or fix unfixed cells in the grid thus simplifying the task of solving the puzzle. As long as each of these rules can be implemented efficiently, the whole solving process can, because the number of cells is polynomial in n and the number of possible numerals per cell is at most n. Hence not every given Sudoku puzzle is solvable by a solver using only logic deduction, unless P=NP. However, it is an open problem whether there is a ruleset that is able to solve all proper Sudoku puzzles. A set of deduction rules to solve a Sudoku puzzle is the following [Epp05a]: Eliminate If there is only one numeral left for a cell, assign it to this cell. Locate If there is only one cell left for a numeral in a group, assign it to this cell. Align Eliminate possibilities for numerals that would leave no choices for another group. This means that if all cells of a group g that may contain a numeral x share two of their three groups (g and g ), all possibilities of x in cells of g that are not part of g may be removed, because if placed in any of these cells, there would be no cell in g that may contain x. For example, if all possibilities of 1 in a block are in the same row, then all possibilities of 1 in this row outside of the block may be removed. Pair/Triad Eliminate possibilities for numerals that would leave no choices for two (three) other numerals in a group. This means that if two (three) cells that share two of their three groups contain the only two (three) possibilities 16

17 for two (three) numerals in one of their shared groups, then all possibilities of these numerals may be removed from both groups. For example, if the only possibilities for the numerals 1 and 2 in a block are in two cells in the same row, all possibilities of 1 and 2 may be removed from the rest of the row and the rest of the block. Digit Eliminate possibilities for numerals that cannot be extended to a placement of n copies of that numeral covering each group. For each numeral d, consider the bipartite graph G d = ({R, C}, E) with R being the set of all rows, C being the set of all columns and {r, c} E iff the cell of row r and column c may contain d. In order for a solution to exist, G d has to have a perfect matching. The Digit rule removes possibilities for any numeral in any cell that prevents a perfect matching of rows and columns for this numeral to exist. Rectangle, Trapezoid These only apply if we know that the given Sudoku puzzle is proper. If so, avoid formation of ambiguities in the grid. This means that if a puzzle is known to be proper, the possibility of any numeral in any cell that would imply the formation of an ambiguous rectangle (see Section 3.1) may be removed. Subproblem Eliminate possibilities for numerals that cannot be extended to a complete arrangement of all its groups. For each group g, consider the bipartite graph G g = ({N, C g }, E) with N being the set of all numerals, C g the set of all cells in g, and {k, c} E iff k is a possible assignment of c. In order for a solution to exist, G g has to have a perfect matching. The Subproblem rule removes possibilities for any numeral in any cell that prevents such a perfect matching of numerals and cells of any group. Bilocation Find non-repetitive cycles in the graph of bilocated cells and remove any other possibility from the their cells. For explanation please refer to Eppstein [Epp05a]. Bivalue Find non-repetitive cycles in the graph of bivalued cells and remove any other possibility. For explanation please refer to Eppstein [Epp05a]. Repeat Find repetitive cycles and assign the repeating numeral to the incident cell. For explanation please refer to Eppstein [Epp05a]. Path Find conflicting paths in the graphs of bivalued and bilocated cells. For explanation please refer to Eppstein [Epp05a]. 17

18 With this ruleset, Eppstein managed to solve about 96% of the proper puzzles generated by a puzzle generator that works as follows [Epp05b]: 1. generate a full Sudoku grid: (a) choose a random cell (b) assign a random, non-conflicting numeral (c) propagate the changes by applying the most simple deduction rules as often as possible 2. revert the changes step by step for as long as the puzzle stays proper (determined by a backtracking solver) Solving by logic deduction is a suitable method to determine the difficulty of a Sudoku puzzle, that is, how hard it is for a human solver to find a solution, for example by applying a difficulty index to each deduction rule. 2.6 Graph Coloring An n n Sudoku grid may be interpreted as a graph in the following way: for each cell there is a vertex of the graph. Each two vertices are connected iff they share a group. Each numeral is represented by a different color. A full Sudoku grid belongs to an n-coloring of this graph, so that no two adjacent vertices have the same color. Solving a Sudoku puzzle is therefore equal to completing a partial coloring of the graph representing it. Note that this induces a reduction from Sudoku to Graph-n-Coloring: Given an n n Sudoku puzzle, build a graph G with n 2 vertices, one for each of the cells of the grid and connect two vertices iff they share at least one of their groups. The size of the graph is polynomial in n and the partial coloring of G given by the hints in the Sudoku puzzle can be extended to an n-coloring of G iff the Sudoku puzzle has a solution. The number of ways to complete a partial coloring is a monic polynomial 2 of degree at most n 2 and due to the reduction, the same holds for the number of different solutions to a Sudoku puzzle [HM07]. Note that this is an exponentially growing function in n. 3 Generalization and Contribution In this chapter, the previously presented approaches will be extended and generalized. We will extend the term essentially different and consider the impacts on the number of Sudoku grids. After presenting a different way to generate Sudoku puzzles, we will introduce generalizations of parts of the set of deduction rules presented in Section and a limited constraint propagation algorithm to solve Sudoku puzzles. 2 A polynomial is called monic if all its coefficients are integer. 18

19 3.1 Counting Sudoku In Section 2.1, the transformations leading to the term essentially different grid are mentioned. Recall also the difference between two Sudoku grids being equal with respect to E and being equal with respect to E. Additionally to the four transformations considered by E, the ambiguous rectangle transformation may be taken into account: Definition An ambiguous rectangle is a formation of four cells that share exactly two different rows, columns, blocks, and numerals. Flipping such a rectangle means to replace the content of each cell with the content of the cell it shares a block with. Remark Figure 9 on page 10 shows an ambiguous rectangle (the gray cells form one) and its flipped variant. This is exactly the same as Eppstein [Epp05a] defined to test whether a Sudoku grid was ambiguous (a grid is ambiguous if it contains an ambiguous rectangle). If a solution to a Sudoku puzzle contains an ambiguous rectangle that is not part of the puzzle, this solution cannot be unique, because the ambiguous rectangle may be flipped to obtain a second solution to the puzzle. Flipping a flipped ambiguous rectangle reverts the transformation, thus, flipping is its own inverse transformation. The equivalence relation that takes the five transformations mentioned so far into account will be referred to as E. As shown in Figure 9 on page 10, the only two essentially different 4 4 Sudoku grids are in fact equal under flipping an ambiguous rectangle. Hence, with respect to E there is just one equivalence class of 4 4 Sudoku grids (this means, there are no essentially different grids of this type), which in turn means that all 4 4 Sudoku grids can be obtained from a single one by applying a series of the stated transformations. It is now of interest how many full 9 9 Sudoku grids exist that are essentially different with respect to E. Unfortunately, applying the ambiguous rectangle transformation to 9 9 Sudoku grids is not trivial. Using Burnside s lemma like Jarvis and Russel [RJ06a] did to calculate N 9 9 (see Lemma 2.4 on page 10) is not applicable to the ambiguous rectangle transformation, because of its dependency on numerals, not just geometric shapes. Thus, there is at the moment no better way than to look at all N 9 9 = 5, 472, 730, 538 equivalence classes and checking all pairs of classes for equality by brute force. However, for the sheer size of these classes it is overwhelmingly costly to handle them. In the following, we will estimate how many comparisons it would take to calculate the number of different Sudoku grids taking the ambiguous rectangle transformation into account. If the average number of grids in an equivalence class with respect to E is k N N 9 9 = and a uniform distribution of grids in each class is assumed, the estimated number of comparisons is N 9 9 /2, which is approximately Hence 19

20 even if we compared a trillion Sudoku grids per second it would take 104 years to finish calculation. However it is still interesting how many 9 9 grids are essentially different with respect to E, because from a list of these grids, it would be possible to generate every valid 9 9 Sudoku grid, which is useful for generating Sudoku puzzles. 3.2 Generating Sudoku Puzzles As we have already seen, Sudoku puzzle generators employ backtracking when the puzzle becomes invalid while adding or removing a numeral. To avoid this, we will try to retrace the actions a potential solver would take to solve a Sudoku puzzle and reverse them to reconstruct a puzzle from a given Sudoku grid. Of course there are multiple puzzles for a single grid. The idea is to select an available trace that is closest to a desired difficulty level whenever there are multiple choices. This eliminates the need for backtracking in the generation process. However, a full Sudoku grid has to be obtained first Finding a Full Sudoku Grid When trying to find a full Sudoku grid, it is possible to apply a composition of validity-preserving transformations on a previously saved grid. In Section 2.1 on page 9 we introduced the equality relation E T that relates two grids if one can be transformed into the other by using only transformations of T. E T partitions the set of all full Sudoku grids into equivalence classes. If we had a representative of each of the classes, we were able to generate every full Sudoku grid there is by applying a composition of transformations of T to a representative of an equivalence class. For this reason, we take a look at implementing such transformations. To get a better overview the previously mentioned transformations (see Section 3.1) can be split into numeric transformations and geometric transformations: Relabeling entries and flipping ambiguous rectangles are both considered numeric, while the permutation of bands, the permutation of rows in the same band and transposing the grid are considered geometric transformations. All of the previously mentioned transformations can be written as a combination of these five. It is interesting to note that numeric transformations and geometric transformations are orthogonal, meaning they can be applied independently, or in other words, in the order of application any occurrence of a numeric transformation may be swapped with an adjacent geometric transformation without changing the overall result. This enables us to first apply all geometric transformations and then apply all numeric transformations. Also note that all transformations that relabel entries can be replaced by a single transformation that relabels entries, because the concatenation of two permutations is itself a single permutation. Unfortunately, we could not come up with a way to efficiently enumerate all Sudoku grids of one class, neither with a way to efficiently calculate a list of representatives from each class. 20

21 3.2.2 Deletion Witnesses To decide whether the numeral in a certain cell may be removed it is of great importance whether it can be restored using the rules of a potential solver. One possibility would be to just try and remove that numeral. If the solver can derive it from the information left, it can be safely removed. However, there is a better way than this trial and error technique. In the following, we will use structures called deletion-witnesses (DW) to know in advance which rules applied on which cells would cause the numeral in a certain cell to be derived. Definition A witness of a numeral k of a cell c is a pair (R, S) of a logic deduction rule R and a set S of pairs of cells and numerals such that the collectivity of the pairs in S implies the assignment of k for the cell c by the rule R. The numeral k is then called witnessed by (R, S). Remark Witnessed numerals may be removed in the generation process because a solver can deduct them with the help of its witnesses. This will enable us to remove only those numerals deductible by a given set of rules and thus effectively influencing the difficulty level of the puzzle. This method still does not generally allow for choosing a difficulty level in advance because the rule that causes the deduction of the content of a selected cell is not necessarily the easiest. Since the solver applies rules with a high difficulty rating only if the easier rules are exhausted, the puzzle may be easier than expected. However, a puzzle generated by this method will not be harder than expected. Also note that this method does not require backtracking. 3.3 Judging the Difficulty of Generated Sudoku Puzzles When generating a Sudoku puzzle incrementally, the difficulty may be controlled by picking the numerals in such a way that deduction by rules with the desired difficulty-level are possible. Whereas, when generating decrementally, the difficulty of the puzzle may be controlled by removing those numerals whose recalculation has the desired difficulty. 3.4 Finding Solutions to Sudoku Puzzles When looking at Eppstein s Bilocation and Bivalue rules [Epp05a] a distinct feeling that they are two occurrences of a common phenomenon arises. In our work, this phenomenon is called constraint propagation, meaning that changing the grid in a certain way may affect other cells. However, not all possible constraint propagation mechanisms can be considered efficiently, hence we focus on four ways in which such propagation may occur: 1. Not assigning a numeral to a certain cell may force not assigning another numeral to another cell. 2. Not assigning a numeral to a certain cell may force assigning another numeral to another cell. 21

22 3. Assigning a numeral to a certain cell may force not assigning another numeral to another cell. 4. Assigning a numeral to a certain cell may force assigning another numeral to another cell. In fact, Eppstein s Bilocation and Bivalue rules [Epp05a] only cover points 2 (by the Bilocation rule) and 4 (by the Bivalue rule). Additionally, the Bilocation and Bivalue rules are separated from one another, which further limits their potential. A cycle of Bivalued and Bilocated cells in a puzzle may exercise a constraint on other cells of the puzzle. This source of information is not exploited by applying Bivalue and Bilocation rules separately. Therefore the next two sections will discuss a combination of these two. In Section 3.4.3, we will discuss a further step of generalization and the implementation of all mentioned rules Extension of Bilocation and Bivalue Inspired by Eppstein s cycle analysis approach [Epp05a] Bivalue and Bilocation rules were combined. This is possible since they are, as described above, constraint propagating rules. The combination of the two rules can be condensed into two rules for a human Sudoku solver. In the following, those are going to be explained. Definition If two cells c 1,c 2 in a group share a possible numeral x, these two cells are called grouped by x (written as c 1 g x c 2 ). If c 1 g x c 2 and x cannot be assigned to any other cell in the group, these two cells are called bilocated by x (written as c 1 l x c 2 ). If c 1 g x c 2 and c 1,c 2 have only two possible numerals each, the two cells are called bivalued by x (written as c 1 v x c 2 ). Remark Note that for two cells to be bivalued, the intersection of the sets of their respective possible numerals may contain both numerals, although this is not required for the Bivalued property to apply. Also note that the grouped, bilocated, and bivalued relations are symmetric and intransitive. Definition For an n n Sudoku grid S, the graph G = (W, E) with with the edge-labeling function W = {c c is a cell in S} E = {{c, c } c, c W x(c l x c c v x c )} label : E P({L, V } {1,..., n}) (L, x) label({c, c }) c l x c (V, x) label({c, c }) c v x c 22

23 is called Force-Propagation-Graph or short FPG. Note that an edge may have multiple labels. Let (x, y) be a label, then x = type((x, y)) is the type of the label and y = numeral((x, y)) is the numeral of the label. The function d : ({L, V } {1,..., n}) 2 N calculates the distances of two labels. It is much like the Hamming-Distance in that it specifies how many parts of the labels differ. 0, if p = x q = y d((p, q), (x, y)) = 1, if p = x q y 2, else. A path in the FPG of length p + 2 is called alternating if for each edge e i in the path, there is a label b i l(e i ) such that i {0,..., p} : d(b i, b i+1 ) = 1. That means that only one part of the label may differ from edge to edge. An alternating cycle is defined analogously. The additional rules are defined as follows. 1. Alternating Cycle Rule (ACR) Suppose there is an alternating cycle in the FPG. Let c i be a cell of the cycle and e i and e i+1 its incident edges. If there are two numerals x and y with (L, x) label(e i ) and (L, y) label(e i+1 ), remove all possible numerals except x and y from consideration for c i (see Figure 13). 2. Repetitive Cycle Rule (RCR) Suppose there is an alternating path of p + 1 edges in the FPG that starts and ends at the same vertex (cell) but is not an alternating cycle - this means that the edges incident to the starting cell prevent the alternating path from being an alternating cycle. Let e 0, e p denote these two edges and b 0, b p the labels of e 0 and e p that were used to form the alternating path (note that d(b 0, b 1 ) = d(b p 1, b p ) = 1, but d(b 0, b p ) 1). Then, the starting cell may not be assigned the numeral of the label whose type is V if there are any, and must be assigned the numeral of the label whose type is L if there are any. These two numerals cannot be the same because the equality would yield d(b 0, b p ) = 1 and thus the alternating path would as well be an alternating cycle. Also, if both labels were of the same type, then for the same reason, their numerals would not differ. While being an improvement to applying the Bilocation and Bivalue rules separately, the Alternating Cycle and Repetitive Cycle rules alone are not powerful enough to provide a substantial gain of solving power, as shown in Section 4. Further generalization of the rules will be considered in the following sections. 23

24 Figure 13: An example for the application of the ACR. The grid on the right shows the alternating cycle and the labels of its edges. Note the two marked cells in the top row. The left one may only contain 1 or 2, whereas the right one may only contain 1 or 3. Because each of them may only contain two numerals one of which is 1, the two cells are connected by an edge labeled V1, which stands for bivalued by 1, with respect to the top row. That means that by assigning 1 to any of them, the other cell is forced not to contain 1 but the other possible numeral. Not being able to contain the 1 propagates by the edge labeled L1. This label means that the two cells are bilocated by 1 with respect to their group, meaning that if 1 cannot be assigned to any of them, the other cell is forced to contain 1. The other edges are formed in the same manner. 24

25 3.4.2 Group-Modified Rules The definition of the FPG can be extended to support propagation through grouping. That means that propagation may occur among cells that do not have to be bivalued or bilocated, but just in the same group. Since there are a lot of cells that are related by being in the same group, the extended FPG will be much bigger (although still polynomial in n) than the FPG. The size may be too much for a human solver to handle, which is why this was not included into the (previous) definition of FPG. However, for an automated solver, this is still of interest, so we will define the extended FPG in the following: Definition For an n n Sudoku grid S, the graph G = (W, E ) with with the edge-labeling function W = {c c is a cell in S} E = {{c, c } c, c W x(c g x c } label : E P({L, V, G} {1,..., n}) (L, x) label ({c, c }) c l x c (V, x) label ({c, c }) c v x c (G, x) label ({c, c }) c g x c is called extended Force-Propagation-Graph or short EFPG. The function d : ({L, V, G} {1,..., n}) 2 N calculates the distance of two labels.,if p = x = G q y d 0, if (p = L x = L) q = y ((p, q), (x, y)) = 2, if (p = L x L) q y 1, otherwise. Analogous to FPG, a path in the EFPG of length p + 2 is called alternating if for each edge e i in the path, there is a label b i label(e i ) such that i {0,..., p} : d (b i, b i+1 ) = 1. Now, both additional rules stated in the previous section may also be used with d instead of d: 1. Extended Alternating Cycle Rule (EACR) Suppose there is an alternating cycle in the FPG. Let c i be a cell of the cycle and e i and e i+1 its incident edges. If there are two numerals x and y with (L, x) label(e i ) and (L, y) label(e i+1 ), remove all possible numerals except x and y from consideration for c i. 25

Enumerating possible Sudoku grids

Enumerating possible Sudoku grids Enumerating possible Sudoku grids Bertram Felgenhauer Department of Computer Science TU Dresden 00 Dresden Germany bf@mail.inf.tu-dresden.de Frazer Jarvis Department of Pure Mathematics University of Sheffield,

More information

Sudoku puzzles and how to solve them

Sudoku puzzles and how to solve them Sudoku puzzles and how to solve them Andries E. Brouwer 2006-05-31 1 Sudoku Figure 1: Two puzzles the second one is difficult A Sudoku puzzle (of classical type ) consists of a 9-by-9 matrix partitioned

More information

Mathematics of Sudoku I

Mathematics of Sudoku I Mathematics of Sudoku I Bertram Felgenhauer Frazer Jarvis January, 00 Introduction Sudoku puzzles became extremely popular in Britain from late 00. Sudoku, or Su Doku, is a Japanese word (or phrase) meaning

More information

Midterm Practice Problems

Midterm Practice Problems 6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator

More information

Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

More information

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP

PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP PARALLELIZED SUDOKU SOLVING ALGORITHM USING OpenMP Sruthi Sankar CSE 633: Parallel Algorithms Spring 2014 Professor: Dr. Russ Miller Sudoku: the puzzle A standard Sudoku puzzles contains 81 grids :9 rows

More information

Kenken For Teachers. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles June 27, 2010. Abstract

Kenken For Teachers. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles June 27, 2010. Abstract Kenken For Teachers Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles June 7, 00 Abstract Kenken is a puzzle whose solution requires a combination of logic and simple arithmetic skills.

More information

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

Sudoku Puzzles Generating: from Easy to Evil

Sudoku Puzzles Generating: from Easy to Evil Team # 3485 Page 1 of 20 Sudoku Puzzles Generating: from Easy to Evil Abstract As Sudoku puzzle becomes worldwide popular among many players in different intellectual levels, the task is to devise an algorithm

More information

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

More information

Labeling outerplanar graphs with maximum degree three

Labeling outerplanar graphs with maximum degree three Labeling outerplanar graphs with maximum degree three Xiangwen Li 1 and Sanming Zhou 2 1 Department of Mathematics Huazhong Normal University, Wuhan 430079, China 2 Department of Mathematics and Statistics

More information

Graph Theory Problems and Solutions

Graph Theory Problems and Solutions raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

More information

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

More information

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

More information

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions. Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.

More information

Guessing Game: NP-Complete?

Guessing Game: NP-Complete? Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

More information

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH ZACHARY ABEL 1. Introduction In this survey we discuss properties of the Higman-Sims graph, which has 100 vertices, 1100 edges, and is 22 regular. In fact

More information

Discrete Mathematics Problems

Discrete Mathematics Problems Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: wkloster@unf.edu Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................

More information

School Timetabling in Theory and Practice

School Timetabling in Theory and Practice School Timetabling in Theory and Practice Irving van Heuven van Staereling VU University, Amsterdam Faculty of Sciences December 24, 2012 Preface At almost every secondary school and university, some

More information

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

More information

Pigeonhole Principle Solutions

Pigeonhole Principle Solutions Pigeonhole Principle Solutions 1. Show that if we take n + 1 numbers from the set {1, 2,..., 2n}, then some pair of numbers will have no factors in common. Solution: Note that consecutive numbers (such

More information

Linear Codes. Chapter 3. 3.1 Basics

Linear Codes. Chapter 3. 3.1 Basics Chapter 3 Linear Codes In order to define codes that we can encode and decode efficiently, we add more structure to the codespace. We shall be mainly interested in linear codes. A linear code of length

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004 Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

More information

Lecture 7: NP-Complete Problems

Lecture 7: NP-Complete Problems IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

More information

Methods for Solving Sudoku Puzzles

Methods for Solving Sudoku Puzzles Methods for Solving Sudoku Puzzles CSCI - 5454, CU Boulder Anshul Kanakia kanakia@colorado.edu John Klingner john.klingner@colorado.edu 1 Introduction 1.1 A Brief History This number puzzle is relatively

More information

CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

More information

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,

More information

S on n elements. A good way to think about permutations is the following. Consider the A = 1,2,3, 4 whose elements we permute with the P =

S on n elements. A good way to think about permutations is the following. Consider the A = 1,2,3, 4 whose elements we permute with the P = Section 6. 1 Section 6. Groups of Permutations: : The Symmetric Group Purpose of Section: To introduce the idea of a permutation and show how the set of all permutations of a set of n elements, equipped

More information

MATHEMATICAL ENGINEERING TECHNICAL REPORTS. An Improved Approximation Algorithm for the Traveling Tournament Problem

MATHEMATICAL ENGINEERING TECHNICAL REPORTS. An Improved Approximation Algorithm for the Traveling Tournament Problem MATHEMATICAL ENGINEERING TECHNICAL REPORTS An Improved Approximation Algorithm for the Traveling Tournament Problem Daisuke YAMAGUCHI, Shinji IMAHORI, Ryuhei MIYASHIRO, Tomomi MATSUI METR 2009 42 September

More information

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

A Note on Maximum Independent Sets in Rectangle Intersection Graphs A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada tmchan@uwaterloo.ca September 12,

More information

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012 276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the

More information

Offline sorting buffers on Line

Offline sorting buffers on Line Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: rkhandekar@gmail.com 2 IBM India Research Lab, New Delhi. email: pvinayak@in.ibm.com

More information

Lecture 17 : Equivalence and Order Relations DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/31/2011 Lecture 17 : Equivalence and Order Relations Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last lecture we introduced the notion

More information

Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

More information

Problem Set 7 Solutions

Problem Set 7 Solutions 8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

More information

Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms. Part 3: P, NP Hard Problems Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10 Introduction to Discrete Probability Probability theory has its origins in gambling analyzing card games, dice,

More information

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

More information

Sudoku as a SAT Problem

Sudoku as a SAT Problem Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal ines@sat.inesc-id.pt Joël Ouaknine Oxford University Computing Laboratory, UK joel@comlab.ox.ac.uk Abstract Sudoku

More information

Sudoku: Bagging a Difficulty Metric & Building Up Puzzles

Sudoku: Bagging a Difficulty Metric & Building Up Puzzles Sudoku: Bagging a Difficulty Metric & Building Up Puzzles February 18, 2008 Abstract Since its inception in 1979, Sudoku has experienced rapidly rising popularity and global interest. We present a difficulty

More information

Lecture 16 : Relations and Functions DRAFT

Lecture 16 : Relations and Functions DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence

More information

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, 2010. Connect Four

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, 2010. Connect Four March 9, 2010 is a tic-tac-toe like game in which two players drop discs into a 7x6 board. The first player to get four in a row (either vertically, horizontally, or diagonally) wins. The game was first

More information

Battleship. Big bands

Battleship. Big bands Ball Fill in the grid so that every row, column (six smaller cells and three bigger circles or stars), outlined figures (eight smaller cells and a bigger circle), nine bigger circles and nine bigger stars

More information

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013 Notes on Orthogonal and Symmetric Matrices MENU, Winter 201 These notes summarize the main properties and uses of orthogonal and symmetric matrices. We covered quite a bit of material regarding these topics,

More information

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

More information

ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu

ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a

More information

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n + 3 2 lim m 2 1

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n + 3 2 lim m 2 1 . Calculate the sum of the series Answer: 3 4. n 2 + 4n + 3. The answer in decimal form (for the Blitz):, 75. Solution. n 2 + 4n + 3 = (n + )(n + 3) = (n + 3) (n + ) = 2 (n + )(n + 3) ( 2 n + ) = m ( n

More information

Mathematical Induction

Mathematical Induction Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,

More information

Algebra 1 2008. Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Algebra 1 2008. Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard Academic Content Standards Grade Eight and Grade Nine Ohio Algebra 1 2008 Grade Eight STANDARDS Number, Number Sense and Operations Standard Number and Number Systems 1. Use scientific notation to express

More information

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover Friedrich-Schiller-Universität Jena Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie Studienarbeit An Iterative Compression Algorithm for Vertex Cover von Thomas Peiselt

More information

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1

Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1 GRAPH THEORY LECTURE STRUCTURE AND REPRESENTATION PART A Abstract. Chapter focuses on the question of when two graphs are to be regarded as the same, on symmetries, and on subgraphs.. discusses the concept

More information

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

More information

The Classes P and NP

The Classes P and NP The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

Line Segments, Rays, and Lines

Line Segments, Rays, and Lines HOME LINK Line Segments, Rays, and Lines Family Note Help your child match each name below with the correct drawing of a line, ray, or line segment. Then observe as your child uses a straightedge to draw

More information

Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison

Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison Random vs. Structure-Based Testing of Answer-Set Programs: An Experimental Comparison Tomi Janhunen 1, Ilkka Niemelä 1, Johannes Oetsch 2, Jörg Pührer 2, and Hans Tompits 2 1 Aalto University, Department

More information

INCIDENCE-BETWEENNESS GEOMETRY

INCIDENCE-BETWEENNESS GEOMETRY INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full

More information

POLYNOMIAL FUNCTIONS

POLYNOMIAL FUNCTIONS POLYNOMIAL FUNCTIONS Polynomial Division.. 314 The Rational Zero Test.....317 Descarte s Rule of Signs... 319 The Remainder Theorem.....31 Finding all Zeros of a Polynomial Function.......33 Writing a

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

The Basics of FEA Procedure

The Basics of FEA Procedure CHAPTER 2 The Basics of FEA Procedure 2.1 Introduction This chapter discusses the spring element, especially for the purpose of introducing various concepts involved in use of the FEA technique. A spring

More information

PYTHAGOREAN TRIPLES KEITH CONRAD

PYTHAGOREAN TRIPLES KEITH CONRAD PYTHAGOREAN TRIPLES KEITH CONRAD 1. Introduction A Pythagorean triple is a triple of positive integers (a, b, c) where a + b = c. Examples include (3, 4, 5), (5, 1, 13), and (8, 15, 17). Below is an ancient

More information

Small Maximal Independent Sets and Faster Exact Graph Coloring

Small Maximal Independent Sets and Faster Exact Graph Coloring Small Maximal Independent Sets and Faster Exact Graph Coloring David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science The Exact Graph Coloring Problem: Given an undirected

More information

Comments on the Rubik s Cube Puzzle

Comments on the Rubik s Cube Puzzle Comments on the Rubik s Cube Puzzle Dan Frohardt February 15, 2013 Introduction The Rubik s Cube is a mechanical puzzle that became a very popular toy in the early 1980s, acquiring fad status. Unlike some

More information

A Review of Sudoku Solving using Patterns

A Review of Sudoku Solving using Patterns International Journal of Scientific and Research Publications, Volume 3, Issue 5, May 2013 1 A Review of Sudoku Solving using Patterns Rohit Iyer*, Amrish Jhaveri*, Krutika Parab* *B.E (Computers), Vidyalankar

More information

Genetic Algorithms and Sudoku

Genetic Algorithms and Sudoku Genetic Algorithms and Sudoku Dr. John M. Weiss Department of Mathematics and Computer Science South Dakota School of Mines and Technology (SDSM&T) Rapid City, SD 57701-3995 john.weiss@sdsmt.edu MICS 2009

More information

Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

More information

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

More information

Permutation Groups. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles April 2, 2003

Permutation Groups. Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles April 2, 2003 Permutation Groups Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles April 2, 2003 Abstract This paper describes permutations (rearrangements of objects): how to combine them, and how

More information

Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c

Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c Lesson Outline BIG PICTURE Students will: manipulate algebraic expressions, as needed to understand quadratic relations; identify characteristics

More information

Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours

Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours Essential Question: LESSON 4 FINITE ARITHMETIC SERIES AND RELATIONSHIP TO QUADRATIC

More information

Graphs without proper subgraphs of minimum degree 3 and short cycles

Graphs without proper subgraphs of minimum degree 3 and short cycles Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract

More information

Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

More information

Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

More information

Design and Analysis of ACO algorithms for edge matching problems

Design and Analysis of ACO algorithms for edge matching problems Design and Analysis of ACO algorithms for edge matching problems Carl Martin Dissing Söderlind Kgs. Lyngby 2010 DTU Informatics Department of Informatics and Mathematical Modelling Technical University

More information

HOLES 5.1. INTRODUCTION

HOLES 5.1. INTRODUCTION HOLES 5.1. INTRODUCTION One of the major open problems in the field of art gallery theorems is to establish a theorem for polygons with holes. A polygon with holes is a polygon P enclosing several other

More information

On the k-path cover problem for cacti

On the k-path cover problem for cacti On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China zeminjin@eyou.com, x.li@eyou.com Abstract In this paper we

More information

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7 (67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives 6 EXTENDING ALGEBRA Chapter 6 Extending Algebra Objectives After studying this chapter you should understand techniques whereby equations of cubic degree and higher can be solved; be able to factorise

More information

LAMC Beginners Circle: Parity of a Permutation Problems from Handout by Oleg Gleizer Solutions by James Newton

LAMC Beginners Circle: Parity of a Permutation Problems from Handout by Oleg Gleizer Solutions by James Newton LAMC Beginners Circle: Parity of a Permutation Problems from Handout by Oleg Gleizer Solutions by James Newton 1. Take a two-digit number and write it down three times to form a six-digit number. For example,

More information

Just the Factors, Ma am

Just the Factors, Ma am 1 Introduction Just the Factors, Ma am The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive

More information

GRAPH THEORY LECTURE 4: TREES

GRAPH THEORY LECTURE 4: TREES GRAPH THEORY LECTURE 4: TREES Abstract. 3.1 presents some standard characterizations and properties of trees. 3.2 presents several different types of trees. 3.7 develops a counting method based on a bijection

More information

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No. # 11 Block Cipher Standards (DES) (Refer Slide

More information

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various

More information

Representing Reversible Cellular Automata with Reversible Block Cellular Automata

Representing Reversible Cellular Automata with Reversible Block Cellular Automata Discrete Mathematics and Theoretical Computer Science Proceedings AA (DM-CCG), 2001, 145 154 Representing Reversible Cellular Automata with Reversible Block Cellular Automata Jérôme Durand-Lose Laboratoire

More information

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS Alexander Burstein Department of Mathematics Howard University Washington, DC 259, USA aburstein@howard.edu Sergey Kitaev Mathematics

More information

Load Balancing. Load Balancing 1 / 24

Load Balancing. Load Balancing 1 / 24 Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait

More information

Geometry. Higher Mathematics Courses 69. Geometry

Geometry. Higher Mathematics Courses 69. Geometry The fundamental purpose of the course is to formalize and extend students geometric experiences from the middle grades. This course includes standards from the conceptual categories of and Statistics and

More information

BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle

BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle Page 1 of?? ENG rectangle Rectangle Spoiler Solution of SQUARE For start, let s solve a similar looking easier task: find the area of the largest square. All we have to do is pick two points A and B and

More information

Chapter 3. Distribution Problems. 3.1 The idea of a distribution. 3.1.1 The twenty-fold way

Chapter 3. Distribution Problems. 3.1 The idea of a distribution. 3.1.1 The twenty-fold way Chapter 3 Distribution Problems 3.1 The idea of a distribution Many of the problems we solved in Chapter 1 may be thought of as problems of distributing objects (such as pieces of fruit or ping-pong balls)

More information

The Graphical Method: An Example

The Graphical Method: An Example The Graphical Method: An Example Consider the following linear program: Maximize 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2 0, where, for ease of reference,

More information

Introduction to Graph Theory

Introduction to Graph Theory Introduction to Graph Theory Allen Dickson October 2006 1 The Königsberg Bridge Problem The city of Königsberg was located on the Pregel river in Prussia. The river divided the city into four separate

More information

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations

More information

Orthogonal Projections

Orthogonal Projections Orthogonal Projections and Reflections (with exercises) by D. Klain Version.. Corrections and comments are welcome! Orthogonal Projections Let X,..., X k be a family of linearly independent (column) vectors

More information

The positive minimum degree game on sparse graphs

The positive minimum degree game on sparse graphs The positive minimum degree game on sparse graphs József Balogh Department of Mathematical Sciences University of Illinois, USA jobal@math.uiuc.edu András Pluhár Department of Computer Science University

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

REPEATED TRIALS. The probability of winning those k chosen times and losing the other times is then p k q n k.

REPEATED TRIALS. The probability of winning those k chosen times and losing the other times is then p k q n k. REPEATED TRIALS Suppose you toss a fair coin one time. Let E be the event that the coin lands heads. We know from basic counting that p(e) = 1 since n(e) = 1 and 2 n(s) = 2. Now suppose we play a game

More information

Million Dollar Mathematics!

Million Dollar Mathematics! Million Dollar Mathematics! Alissa S. Crans Loyola Marymount University Southern California Undergraduate Math Day University of California, San Diego April 30, 2011 This image is from the Wikipedia article

More information

TEACHER S GUIDE TO RUSH HOUR

TEACHER S GUIDE TO RUSH HOUR Using Puzzles to Teach Problem Solving TEACHER S GUIDE TO RUSH HOUR Includes Rush Hour 2, 3, 4, Rush Hour Jr., Railroad Rush Hour and Safari Rush Hour BENEFITS Rush Hour is a sliding piece puzzle that

More information