Equations that work for any sudoku of the form n * n

Everything about Sudoku that doesn't fit in one of the other sections

Equations that work for any sudoku of the form n * n

Postby Maq777 » Mon Mar 22, 2021 9:49 pm

Sudoku Parameters

Natural number: n

Grid Size: n^2

Number of Cells: (n^2)^2

Number of cases: 2^((n^2)^2)

Number of Templates: n!^(2n)

Templates / Number of Cells: [n!^(2n)] / [n^2]

Geometric Transformations: 2*(n!)^((2n)+2)

Relabeling: (n^2)!

Maximum range: [2*(n!)^((2n)+2)] * [(n^2)!]
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby dobrichev » Tue Mar 23, 2021 6:55 am

Grid Diagonal Size: sqrt(2)*n

Number of cases: 2^((n^2)^2)

Number of cases: 1

And now what?
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 10:38 am

The thing is:

For n = 2 for example, we would be in the case of Sudoku 4x4.

for n = 3 we would be studying the numbers related to Sudoku 9x9

And for n = 4 we would be looking at the numbers for Sudoku 16x16

And so on...

The point is that there must be a formulation in mathematical equations that serve to generalize the study of the entire family of Sudoku Squares.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 10:56 am

On the wikipedia page where these topics are discussed

https://en.wikipedia.org/wiki/Mathematics_of_Sudoku

Are a table in which they give the value of for all square sudoku puzzles, and for the 16x16 case they use the value of [(4!)^10 ]× 2 × 16! for "Size of VPT group".

The only thing to do to obtain that value in sudokus nxn is to multiply the Geometric Transformations by the relabels

Size of VPT group = [Geometric Transformations] * [Relabels]

or what i called

Maximum range: [2*(n!)^((2n)+2)] * [(n^2)!]
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 11:28 am

I make a correction in one of the equations is Templates / Grid Size: [n!^(2n)] / [n^2]

Natural number (n): 2
Grid Size: 4
Number of Cells: 16
Number of cases: 65536
Number of Templates: 16
Templates / Grid Size: 4
Geometric Transformations: 128
Relabeling :24
Maximum range :3072

Natural number (n): 3
Grid Size: 9
Number of Cells: 81
Number of cases: 2,41785E+24
Number of Templates: 46656
Templates / Grid Size: 5184
Geometric Transformations: 3359232
Relabeling :362880
Maximum range :1218998108160

Natural number (n): 4
Grid Size: 16
Number of Cells: 256
Number of cases: 1,15792E+77
Number of Templates: 110075314176
Templates / Grid Size: 6879707136
Geometric Transformations: 126806761930752
Relabeling: 20922789888000
Maximum range: 2,65315E+27
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Serg » Tue Mar 23, 2021 3:24 pm

Hi, Maq777!
What do you mean by Templates?

Serg
Serg
2018 Supporter
 
Posts: 890
Joined: 01 June 2010
Location: Russia

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 6:30 pm

Hello Serg.

For example for the 4x4 we have these templates

https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/Templates4x4.png

Sorry for my bad English, I am relying on the translator that google which works much better now.

And that's why I add a lot of images. An image says more than a thousand words.

Or I send you links to the videos on my youtube channel.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 6:56 pm

For example, here is a video with the first template of the 4x4, 9x9 and 16x16 sudokus

https://www.youtube.com/watch?v=HNFdmN7aYfE&list=PLI40n2bVm44Re6y-qxrE4BLiRXRTvz_vy

And here is a video manipulating all the 9x9 templates to create solution grids

https://www.youtube.com/watch?v=KOR3vIfY6hg&list=PLI40n2bVm44Re6y-qxrE4BLiRXRTvz_vy&index=2
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Serg » Tue Mar 23, 2021 7:35 pm

Hi, Maq777!
Maq777 wrote:For example for the 4x4 we have these templates

https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/Templates4x4.png

And that's why I add a lot of images. An image says more than a thousand words.

I saw the picture by your link. It looks like "template" is a pattern - 4 x 4 (for Shidoku) binary matrix having ones, corresponding clue cells. But what kind of patterns do you mean? Maq777, you are dealing with combinatorics, i.e with mathematics. Mathematicians usually prefer precise definitions and proofs, but not videos. Should I guess what do you mean by "templates"? Sorry, I am not so young to play game "Guess what I mean?"

Serg
Serg
2018 Supporter
 
Posts: 890
Joined: 01 June 2010
Location: Russia

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 7:45 pm

For 4x4 sudoku there are only 16 possible patterns to place 4 squares that do not collide in row, column or region.

On the other hand, for Sudoku 9x9 there are 46,656 patterns of the same style.

What I did was calculate them all and code them in a program to be able to manipulate them.

That allows me to think of solutions by abstracting from relabels.

And they are one more element to take into account when studying Sudoku.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 7:56 pm

To form a 4x4 sudoku solution you are forced to gather 4 of those 16 patterns that do not collide.

To form any 9x9 sudoku solution you have to choose 9 patterns from the 46656 available and put together to fill in the entire board, without repeating cells and without leaving empty cells.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 8:29 pm

They are very easy to calculate and very useful to know what sudoku we are working on.

For example

n=2 (Shidoku)
1--2
2--4
Template (pattern) = 1*2*2*4 = 16 (Sudoku 4x4)

n=3 (typical sudoku)
1--2--3
2--4--6
3--6--9
Template (pattern) =1*2*3*2*4*6*3*6*9= 46.656 (Sudoku 9x9)

n=4
1--2--3---4
2--4--6---8
3--6--9--12
4--8-12--16
Template (pattern) =1*2*3*4*2*4*6*8*3*6*9*12*4*8*12*16= 110.075.314.176 (Sudoku 16x16)

The matrix is ​​filled by multiplying the row and column that intersect, and the total number of templates or patterns is obtained by multiplying all the elements of the matrix, And it works for all square sudoku puzzles of any size.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Serg » Tue Mar 23, 2021 10:07 pm

Hi, Maq777!
Maq777 wrote:To form a 4x4 sudoku solution you are forced to gather 4 of those 16 patterns that do not collide.

To form any 9x9 sudoku solution you have to choose 9 patterns from the 46656 available and put together to fill in the entire board, without repeating cells and without leaving empty cells.

Now I understand you. What you mean is called "1-rookery" or "templates", but not "patterns". Ones mark not clue cells, but cells containing the same digit. There exist not only 1-rookeries, but 2-rookeries (for 9 x 9 Sudoku solution grids 2-rookery contains 18 cells, all cells have one of 2 given digits), 3-rookeries, n-rookeries. See, for example Red Ed's post on this theme: http://forum.enjoysudoku.com/post13940.html?hilit=rookery#p13940.

Serg
Serg
2018 Supporter
 
Posts: 890
Joined: 01 June 2010
Location: Russia

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Tue Mar 23, 2021 10:45 pm

Serg wrote:... cells containing the same digit...


exactly.

Almost all the research work my dad and I did was based on templates.

From there we develop a sudoku solver. A program to create problems and a few other things.

One of the equation I give is for the calculation of the number of Templates in square sudokus of any size.
Maq777
 
Posts: 56
Joined: 30 April 2016

Re: Equations that work for any sudoku of the form n * n

Postby Maq777 » Wed Mar 24, 2021 1:12 am

dobrichev wrote:Grid Diagonal Size: sqrt(2)*n

Number of cases: 2^((n^2)^2)

Number of cases: 1

And now what?


Good that you ask! Dobrichev

What we have to do now is to find the meaning of each of the numbers obtained with the calculations.

For example, did you know that exactly 4 and only 4 templates pass for each cell of the 4x4 sudoku puzzle, and that 5184 and only 5184 templates pass for each cell of the 9x9 sudoku puzzle.

This allows us if we number the cells from top to bottom and from left to right and assign values ​​to all templates from the celss in the first row. We can build a solution of the form.

https://github.com/MiguelQuinteiro/ImagenesSudoku/blob/master/UsoTemplatesSudoku%209x9.png

In which we know exactly which templates we are using.
Maq777
 
Posts: 56
Joined: 30 April 2016


Return to General