Best time to fill a nxn matrix whose sum of each row and column is given.

Revision en1, by aviral0807, 2020-05-17 02:08:43

I was looking for a solution to the problem to fill an nxn matrix with positive integers. Given positive integers r1, r2, ..., rn, c1, c2, ..., cn.

Where ri is the sum of the ith row and cj is the sum of the jth column.

My thoughts suggest it is somewhat similar to the sudoku problem. Still not sure as the constraints are different.

Can anyone suggest an optimal way to do so? Any heuristic algorithm to solve it is also welcomed.

Thanks.

Tags #matrix, #asking

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English aviral0807 2020-05-17 02:08:43 527 Initial revision (published)