Hello everybody! I'm in a deep need. I would like to create an array(31,5) that would contain all possible combinations of five numbers (1, 2, 3, 4, 5) in its rows. The number of such combinations is N = 2^5 - 1 = 31. A couple of first combinations looks as follws:
1, , , ,
2, , , ,
3, , , ,
4, , , ,
5, , , ,
1,2, , ,
1,3, , ,
.....
2,3,5, ,
2,4,5, ,
.....
1,2,3,4,5
If a combinations consist of for example one number then in the rest of filds in a corresponding row of a matrix may be empty or zero.
Please help me! This is for sure simple but not for me today...
1, , , ,
2, , , ,
3, , , ,
4, , , ,
5, , , ,
1,2, , ,
1,3, , ,
.....
2,3,5, ,
2,4,5, ,
.....
1,2,3,4,5
If a combinations consist of for example one number then in the rest of filds in a corresponding row of a matrix may be empty or zero.
Please help me! This is for sure simple but not for me today...