Question: how to generate all possible ladder matrices

first case is the symmetric or nonsymmetric ladder matrix which fill full upper right and lower left corner

{0,1,1,1,1}
{1,0,1,1,1}
{1,0,0,0,1}
{1,1,1,0,0}
{1,1,1,1,0}

second case is overlap two different first case , one is 1 and another is 0 which is for display partial fill the upper right corner and lower right corner

{0,1,0,0,0}
{1,0,1,1,0}
{1,0,0,0,1}
{0,1,1,0,0}
{0,0,0,1,0}

Please Wait...