From: Kristof Bastiaensen Date: 2006-08-04T09:15:11+09:00 Subject: Re: For performance, fix the Java program On Fri, 04 Aug 2006 01:53:41 +0900, Peter Hickman wrote: >> 2) If this is an application, and it has to produce output, and it has >> to produce output for something larger than 6x6, then I think you need >> a better algorithm. >> >> You've mentioned the 5x5 C program took 2.473s, and the 6x6 took 9900s >> - at that rate might we expect 7x7 in 15 months? >> > Actually the real problem is the amount of disk space I need to store > the output. 6 x 6 resulted in 32Gb of output. The 7 x 7 will probably > eat my hard disk well before it completes. I'm not sure that the 1Tb I > have will be enough so I am looking at removing the rotational and > mirrored versions of the grids from the output. Why would you want to store all this data? If you want to store the 7x7 version, you will need 3187.2 TB to store all the squares. To store only the reduced squares you still need 920 MB. To store the reduced squares for 8x8 you will need 35.6TB. (I used the wikipedia article on http://en.wikipedia.org/wiki/Latin_square to compute these numbers). My program can easily show only the reduced squares by removing the permutations from the solutions method, and it will be a lot faster too. If you want to do this for large squares it would be better to rewrite my algorithm in C. But I am interested how this data could ever be useful. Regards, Kristof