1 / 2

Lacey Johnson Summer 2013 Student Research Project – James Madison University

K-potent Gröbner Bases and Sudoku. Department of Mathematics and Statistics. Lacey Johnson Summer 2013 Student Research Project – James Madison University. Abstract. Spider Polynomials. Boolean Shidoku System. K-Potent Region Polynomials.

diallo
Download Presentation

Lacey Johnson Summer 2013 Student Research Project – James Madison University

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. K-potent Gröbner Bases and Sudoku Department of Mathematics and Statistics Lacey Johnson Summer 2013 Student Research Project – James Madison University Abstract Spider Polynomials Boolean Shidoku System K-Potent Region Polynomials One approach to limit degree growth is the Boolean Shidoku system. It assigns four variables to each cell on the Shidoku board, i.e. a1, a2, a3, a4 for cell a, giving us a total of 64 variables. So if cell a has the value 2, the variable a2=1 and all other variables a1=a3=a4=0. Therefore, for k=1,2,3,4, ak(ak-1) = 0 Simplifying we get Using this idempotent variable restricts the degree growth. However, the Boolean Shidoku system is slower than the sum-product Shidoku system because the complexity of Buchberger’s algorithm is double exponential in the number of variables. To build our k-potent region Shidoku system we begin with our 16 k-potent variable equations, a4 – a = 0 Then we set our first variable condition for each region giving us 12 polynomial equations of this form a + b + c + d = 0 Finally, for each region we need a spider polynomial to guarantee each variable is distinct. Again, we do this for each region so we have 12 polynomial equations of this form a3+a2b+ab2+b3-1 = 0 However, we can economize and just use 8 k-potent spider polynomials to represent the regions of the Shidoku board because a pair of variables can count for a row and a block. This leaves us with 8 k-potent spider polynomials. Altogether, this k-potent region Shidoku system contains 36 polynomials. Sudoku can be described as a system of polynomials which can then be solved using Gröbner basis techniques. A Boolean idempotent approach (x^2 = x) restricts degree growth of intermediate polynomials, but increases the number of variables. We use a k-potent approach (x^k =x) allowing each variable to take on k values. The approach restricts degree growth, but minimizes the number of variables. Preliminary results show the k-potent approach produces the fastest results. The spider diagram above allows us to better visualize which pairs of variables can’t be equal to each other because they lie in the same region, i.e. the same row, column, or block. Each leg of the spider needs a polynomial which we will call a spider polynomial. Consider any two variables, a and b, that lie in the same region, i.e. (a-1)(a-2)(a-3)(a-4)=0 and (b-1)(b-2)(b-3)(b-4)=0. Expanding, setting equal and factoring out (a-b) gives us, (a-b)(a3+a2b+ab2+b3-10a2+10ab-10b2+35a+35b-50) = 0 We want to force a and b to take on different values. If a-b≠0, we must have that a3+a2b+ab2+b3-10a2+10ab-10b2+35a+35b-50 = 0 This is our spider polynomial for a and b that we put into our ideal. With 56 spider polynomials of this form and 16 regular variable polynomials, we have a total of 72 polynomials to represent the constraints on a Shidoku board. What is a Gröbner basis? A Gröbner basis for a system of polynomials is a new system of polynomials, with the same solutions as the original set, but which is easier to solve. K-Potent Shidoku System The k-potent variable system was developed by Arnold and Lucas to restrict degree growth and at the same time use only one variable for each cell. ak = 0 ak – a = 0 For our purposes, the k-potent variable polynomials for a Shidoku system would be of the form a4 – a = 0 a = 0 or a3 – 1 = 0 Notice, a can take on four values, a=0, W1, W2, W3, were W1 is a primitive third root of unity. When all possible values for a are added together we get 0. 0 + W1 + W2 + W3 = 0 This can’t be the only condition because it would allow all four variables in the region to take on the value 0, 0 + 0 + 0 + 0 = 0 So if the regional polynomial is w + x + y + z = 0 we must have another condition to ensure that w,x,y, and z are distinct values. Notice, a spider polynomial would ensure that two variables in a region are not equal. In fact, for every pair that needs to have different values we will use spider polynomials. So, now we use k-potent variables to compute k-potent spider polynomials. The conditions on the variable gives us a4 – a = 0 and b4 – b = 0 Expanding and factoring out (a-b) gives us, (a-b)(a3+a2b+ab2+b3-1) = 0 If a-b≠0, we need a3+a2b+ab2+b3-1 = 0 This is the k-potent spider polynomial for a and b. Notice, it has fewer terms and no coefficients compared to the regular spider polynomials. Buchberger’s Algorithm Conclusion Buchberger’s algorithm is the algorithm that computes Gröbner bases in many variables in any degree. While utilizing Buchberger’s algorithm, many intermediate polynomials are computed and discarded before the final Gröbner basis is reached. The coefficients and degrees of these intermediate polynomials can grow to an enormous size. These problems are known as coefficient explosion and degree growth. Both of these issues can very quickly overload the computer’s memory, slow down and even stop the computation altogether. • Here are the computation times of the different variable and polynomial types. This was computed using Maple 16 on a 2.53 GHz Windows laptop with 4 GB RAM. • The system of polynomials with regular variables and spider polynomials has too many polynomials of high degree • The sum-product Shidoku system with regular variables and region polynomials could compute a Gröbner basis for Shidoku, but not for Sudoku. • The Boolean Shidoku system with idempotent variables and region polynomials restrict degree growth, but has too many variables. • The k-potent Shidoku system with k-potent variables and region polynomials restricts growth and uses one variable per cell. Shidoku Ideal We let the Shidoku polynomials be the generators for an ideal, I. Then we use Buchberger’s algorithm to compute a Gröbner basis for I to get a new system of polynomials which gives us more information about the ideal. If we add to the ideal polynomials which represent initial clues such as d-4, e-4, g-2, j-3, l-1, and m-1, the Gröbner basis is this system of 16 linear polynomials that are the solutions to the Shidoku puzzle, i.e. a-3, b-2, c-1, d-4, e-4, f-1, g-2, h-3, i-2, j-3, k-4, l-1, m-1, n-4, 0-3, p-2. Figure: Shidoku variables, puzzle, and board Sudoku and Shidoku Shidoku, a simpler version of Sudoku, is played on a 4x4 Latin square whose regions (rows, columns, and designated 2x2 blocks) each contain integers 1-4 exactly once. Shidoku board and complete board These constraints in a Shidoku board can be represented as a system of polynomials. Think of the 16 cells on a Shidoku board as 16 variables that can each take on only the values 1, 2, 3, or 4. For each of these variables w, we can encode this fact with a polynomial equation of the form (w-1)(w-2)(w-3)(w-4) = 0 Future Research Sum-Product Shidoku System • Develop k-potent system of regional polynomials for Sudoku. • Write code to modify Buchberger’s algorithm so it automatically reduces degree. The sum-product system uses the regular variables, i.e. (a-1)(a-2)(a-3)(a-4)=0. Consider four cells that make up a region (i.e. row, column, or 2x2 block). Each cell in the region must have a different value: 1, 2, 3, or 4. The only way to choose four distinct numbers from the set {1,2,3,4} whose sum is 10 and product is 24 is to choose each value exactly once. Let w,x,y, and z represent four cells in a Shidoku region. Then these two polynomials represent the constraints on a Shidoku region. w+x+y+z-10=0 and wxyz-24=0 In total, 40 polynomials encompass the rules of Shidoku. Acknowledgements E. Arnold, S. Lucas, and L. Taalman, Gröbner Basis Representation of Sudoku, College Mathematics Journal 41, 2010, 101-111. Thank you to my research advisor Dr. Elizabeth Arnold and Dr. Laura Taalman for the Spider Diagram graphic.

More Related