We have a list of random binary numbers, say, A=[1,1,0,0,1,0]. Based upon A we want to write a matrix M=[a(i,j)] of order 5x5, where each a(i,j) is a list of length(A), comprising real numbers in closed interval [0,1]. All these reals in a(i,j) are less or equal to the corresponding entry in A.
 
Furthermore, the matrix rows and columns have to satisfy following conditions:

1. min(a(i,r),a(i,s))=[0,0,0,0,0,0] for every i,r,s such taht r<>s.
   min(a(r,j),a(s,j))=[0,0,0,0,0,0] for every i,r,s such taht r<>s.

2. max(a(i,r))=A , r=1..n, for every i.
   max(a(s,j))=A , s=1..n, for every j.


Please Wait...