For a matrix of M
by N
containing just 0 and 1, how to make no identical rows exists. For example, if N = 3
and M = 3
, one solution is:
0 0 0
0 1 0
1 0 0
I know using some exhausive permutation algorithm works, but I am thinking is there any better solution since M < 2^N
is the common case.