10 Replies Latest reply: Aug 9, 2007 5:52 PM by 807605 RSS

    help with algorithm about distrbuting numbers in a matrix

    807605
      Hi,

      I have to do the following:

      I need to distribute N numbers in a (Y,N) matrix. The only problem is that each number should be unique on its row and its column (sth like sudoku). Number N is always the same as the columns.

      For example in a simple situation where there are 3 rows and 3 columns I should distribute 1, 2 and 3 like this (in rows): 1,2,3 - 2,3,1 - 3,1,2

      Rows should always be less than or equal number of columns.

      Any help would be appreciated.