How to get all possible combination of 2xn matrix : <p>I was unable to solve this problem, tried much but logic not working.
Problem is, 
I have to calculate all possible combinations of 2 x N matrix.
conditions:</p>

<ul>
<li>sum of all elements must be N.</li>
<li>elements in a row or a column must be in non increasing way.</li>
<li>all elements must be positive and real numbers.
print all possible combinations.
let for 6, it is 29
thanks.</li>
</ul>
