hello, im doing a project and this part is rly important to me.i'll try to be as clear as possible.
suppose we have an mxn matrix with all 0s, i need to generate all possible combinations of the array in which only one element in a row is initialised to 1 and all the other elements in that row are 0s. similarly, in all the rows, exactly one element should be 1. ex: take a 3x2 matrix, the following should be the output:
[1 0,1 0,1 0], [1 0, 1 0,0 1], [1 0,0 1,1 0], [1 0, 0 1, 0 1], [0 1, 1 0,1 0], [0 1, 1 0, 0 1], [0 1, 0 1, 1 0], [0 1, 0 1, 0 1]
the values within the square brackets is a 3x2 matrix,each row separated by a comma. so basically, an mxn matrix will have n power m number of combinations. anyone who can think of any possible way of solving this pls post it, its really important. thanks in advance