You description is not very clear.
What do you mean be ‘row’? How many numbers in a row? How many rows?
Can you give an example?
Hello,
I was wondering if anyone knows how to generate 256 different sequences from 256 numbers [0:255], where no number is repeated within the same row of numbers, at the same time no two consecutive numbers exist more than once in the different 256 sequences.
Can anyone help me with this please ?
Dina
Sorry for not being clear, here is what I meant by a simple example of fewer numbers.
if n = 4, then we have a matrix of 4 by 4
1 2 3 4
2 4 1 3
3 1 4 2
4 3 2 1
where numbers from 1 to 4 are represented in 4 different sequences where no two consecutive numbers exist more than once in the different sequences.
So I needed to do the same thing with n=256 i.e a matrix of 256 by 256.
Thank you very much in advance.
Dina
These are known as Latin Squares.
One such square can be obtained as follows:
Write the first row 1,2,3, .. , 256
The second row 2,3,4, .. , 256,1
Third row 3,4, .. , 256,1,2
and so on.
It is "where no two consecutive numbers exist more than once in the different sequences" that I do not understand the meaning of, But would this be satisfied by interchanging columns 2 and 3, 4 and 5, ... 254 and 255, so now no row contains any consecutive numbers pairs?
RonL