Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   

This Is An Infinite Sudoku(?)

 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Exotic sudoku
View previous topic :: View next topic  
Author Message
wustvn

Joined: 29 Aug 2008
Posts: 12
:
Location: Bali - Indonesia

Items
PostPosted: Sun Aug 31, 2008 12:33 pm    Post subject: This Is An Infinite Sudoku(?) Reply with quote

Hi to all of you guys, I’m new here…
Basically, I just wonder how to make an algorithm to scramble numbers 0-9 in m rows x n columns, where m & n can be infinite, to be looked “cryptographically random”, which if it is seen by every four columns, there will be at least one number repeated, not just to the next four columns, but also to the next row. Sometimes this may not happen indeed.
Can somebody help me about this?
Thank you very much for your attentions.

Best regards,
Steven Wu
Bali - Indonesia
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Mon Sep 01, 2008 12:43 pm    Post subject: Re: This Is An Infinite Sudoku(?) Reply with quote

wustvn wrote:
Hi to all of you guys, I’m new here…
Basically, I just wonder how to make an algorithm to scramble numbers 0-9 in m rows x n columns, where m & n can be infinite, to be looked “cryptographically random”, which if it is seen by every four columns, there will be at least one number repeated, not just to the next four columns, but also to the next row. Sometimes this may not happen indeed.
Can somebody help me about this?

Given that nobody else has replied, perhaps this might help:

Case 1 (m and n both finite) Here, you can call a random number generator to get m numbers. These can be manipulated such that they all become integers from 0 to 9 and then can be set into the first row:
Code:

real    :: r_n(m)
integer :: crypt(n, m)

call random_number(r_n)
crypt(1, : ) = 10 * r_n

and shuffle values to fit your repetition requirement.
You can then do the same for the second row, and also shuffle any values that do not fit your repetition requirement. And so on for subsequent rows. Maybe there are smarter ways, but I've used a similar approach to generate sudoku grids. I've no idea how well it will work for large m and/or n.

Case 2 (m and/or n infinite) As above, but you will have to code it in binary code suitable for a Turing Machine, but these are in short supply Sad (or maybe you meant indefinite rather than infinite).

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
wustvn

Joined: 29 Aug 2008
Posts: 12
:
Location: Bali - Indonesia

Items
PostPosted: Mon Sep 01, 2008 1:34 pm    Post subject: Reply with quote

Hi m_b_metcalf, nice to meet you...
Thx for your suggestion. Can it result like this table? This table actually has 284 columns and infinite rows, but here I give you the example with 100 rows x 20 columns. The file named puzle.pdf. I can't attach the file here, but I also can't put link yet to point to the file hosting service, where I put it.
Thank you very much for your attention.
Back to top
View user's profile Send private message
m_b_metcalf

Joined: 13 Mar 2006
Posts: 210
:
Location: Berlin

Items
PostPosted: Mon Sep 01, 2008 2:15 pm    Post subject: Reply with quote

wustvn wrote:
I also can't put link yet to point to the file hosting service, where I put it.

You need to make three more posts. They can be trivial ones.

Regards,

Mike Metcalf
Back to top
View user's profile Send private message
wustvn

Joined: 29 Aug 2008
Posts: 12
:
Location: Bali - Indonesia

Items
PostPosted: Tue Sep 02, 2008 12:42 pm    Post subject: Reply with quote

Ok Mike (can I call you Mike? Just call me Steven).
As I do, I bet you've never seen an infinite sudoku, haven't you? Smile
Thx for your attention.
Back to top
View user's profile Send private message
wustvn

Joined: 29 Aug 2008
Posts: 12
:
Location: Bali - Indonesia

Items
PostPosted: Wed Sep 10, 2008 1:00 pm    Post subject: Reply with quote

I put a table at Mediafire.com (a file hosting service) name puzle.pdf:
http://www.mediafire.com/?sharekey=c7ba82a6b7006656d2db6fb9a8902bda

A friend of mine gave me this table actually with 350 rows x 284 columns, which every cell contains of a single number from 0-9. Then by finding its patterns, he asked me to fill in the columns 1-20 for the rows 351,352,etc (meanwhile, ignore the columns 21-284 to make it simpler). I just can't find its patterns, that's why I need your help guys...

I just found by myself that THIS IS THE MAGIC OF THIS TABLE: no matter how you arrange the order of each four columns, there will be at least one number repeated, not just to the next four columns [(x-4,y) to (x+4,y)], but also to the next row [(x,y-1) to (x,y+1)]. Sometimes this may not happen indeed.

Take rows 1-2 as example. Let’s say columns 1-4 as section A, columns 5-8 as section B, columns 9-12 as section C, columns 13-16 as section D, columns 17-20 as section E.
The numbers that repeated to the next row (row 1 to row 2):
5,6 in section A ; 8 in section B ; 7,3,8 in section C ; 9 in section D ; 4 in section E.
The numbers that repeated to the next four columns (section):
Row 1:
No numbers from section A to section B.
7,8 from section B to section C.
No numbers from section C to section D.
6 from section D to section E.
Row 2:
4,3 from section A to section B.
8,3 from section B to section C.
No numbers from section C to section D.
9 from section D to section E.
Now you can try by changing the order of section from A-B-C-D-E to A-C-E-B-D or A-D-B-E-C or A-E-D-C-B or B-C-D-E-A.

Lately, I also found that this occurs on the opposite way too, if it is seen by every four rows.
Take columns 1-2 as example. Let’s say rows 1-4 as section A, rows 5-8 as section B, rows 9-12 as section C, etc.
The numbers that repeated to the next column (column 1 to column 2):
0,4 in section A ; 3 in section B ; no number in section C.
The numbers that repeated to the next four rows (section):
Column 1:
3 from section A to section B.
1 from section B to section C.
Column 2:
5 from section A to section B.
3 from section B to section C.
Now you can try by changing the order of section from A-B-C to A-C-B or B-A-C.

So please help me guys finding its patterns to fill in the columns 1-20 for the rows 351,352,etc.
Thx.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Exotic sudoku All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron