
View previous topic :: View next topic 
Author 
Message 
 wustvn
 Joined: 29 Aug 2008  Posts: 12  :  Location: Bali  Indonesia  Items 

Posted: Sun Aug 31, 2008 12:33 pm Post subject: This Is An Infinite Sudoku(?) 


Hi to all of you guys, I’m new here…
Basically, I just wonder how to make an algorithm to scramble numbers 09 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 


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

Posted: Mon Sep 01, 2008 12:43 pm Post subject: Re: This Is An Infinite Sudoku(?) 


wustvn wrote:  Hi to all of you guys, I’m new here…
Basically, I just wonder how to make an algorithm to scramble numbers 09 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 (or maybe you meant indefinite rather than infinite).
Regards,
Mike Metcalf 

Back to top 


 wustvn
 Joined: 29 Aug 2008  Posts: 12  :  Location: Bali  Indonesia  Items 

Posted: Mon Sep 01, 2008 1:34 pm Post subject: 


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 


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

Posted: Mon Sep 01, 2008 2:15 pm Post subject: 


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 


 wustvn
 Joined: 29 Aug 2008  Posts: 12  :  Location: Bali  Indonesia  Items 

Posted: Tue Sep 02, 2008 12:42 pm Post subject: 


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?
Thx for your attention. 

Back to top 


 wustvn
 Joined: 29 Aug 2008  Posts: 12  :  Location: Bali  Indonesia  Items 

Posted: Wed Sep 10, 2008 1:00 pm Post subject: 


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 09. Then by finding its patterns, he asked me to fill in the columns 120 for the rows 351,352,etc (meanwhile, ignore the columns 21284 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 [(x4,y) to (x+4,y)], but also to the next row [(x,y1) to (x,y+1)]. Sometimes this may not happen indeed.
Take rows 12 as example. Let’s say columns 14 as section A, columns 58 as section B, columns 912 as section C, columns 1316 as section D, columns 1720 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 ABCDE to ACEBD or ADBEC or AEDCB or BCDEA.
Lately, I also found that this occurs on the opposite way too, if it is seen by every four rows.
Take columns 12 as example. Let’s say rows 14 as section A, rows 58 as section B, rows 912 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 ABC to ACB or BAC.
So please help me guys finding its patterns to fill in the columns 120 for the rows 351,352,etc.
Thx. 

Back to top 




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

Powered by phpBB © 2001, 2005 phpBB Group
Igloo Theme Version 1.0 :: Created By: Andrew Charron
