Staredit Network

Staredit Network -> Computers and Technical -> Very Difficult Problem
Report, edit, etc...Posted by Slyence on 2006-04-21 at 20:27:09
Let us say that there is a table of bits, that is (2^x - 1)^2 bits in size. It is a a square table and the bits a counted and talled for each row and column. Then, for each diagonal, the bits are counted so we would get a table that looks like:
CODE
    5  1  3  3  6  3  2
  _____________________
4  | 1  0  0  0  1  1  1
4  | 1  0  1  1  1  0  0
3  | 1  0  0  0  1  1  0
3  | 0  1  1  0  1  0  0
3  | 1  0  0  0  0  1  1
3  | 0  0  0  1  1  1  0
4  | 1  0  1  1  1  0  0


With a diagonal count sloping from bottom left to top right :

1,0,2,1,4,3,2,3,3,2,1,1,1


And a diagonal count sloping from top left to bottom right :

1,1,1,1,4,3,3,2,2,3,3,0,0


Knowing all that data, what is the fastest way to generate that table?

My personal way right now (which needs improvement) is to generate tables that follow the x and y axes and then continually randomizing them until the data matches with the diagonals.
Report, edit, etc...Posted by BeeR_KeG on 2006-04-21 at 20:31:21
First things first, what programming language are you intending to use?
Report, edit, etc...Posted by Slyence on 2006-04-21 at 20:36:20
QUOTE(BeeR_KeG @ Apr 21 2006, 07:30 PM)
First things first, what programming language are you intending to use?
[right][snapback]470060[/snapback][/right]

I'm programming in C++.
Report, edit, etc...Posted by Gradius on 2006-04-21 at 22:33:00
Wait. Im confused. If you know the data then just print it out. Or do you only know the base 10 digits?
QUOTE
My personal way right now (which needs improvement) is to generate tables that follow the x and y axes and then continually randomizing them until the data matches with the diagonals.

Why are you doing this again. eek.gif Why cant you have some for loops to count up the bits.
Report, edit, etc...Posted by Slyence on 2006-04-22 at 10:31:25
I figured it out, thanks anyway.
Next Page (1)