Java - multirow array
<p>Here is my situation: a company has x number of employees and x number of machines. 
When someone is sick, the program have to give the best possible solution of people on the machines. But the employees can't work on every machine. I need a code for making little groups of possible solutions. </p>

<p>this is a static example
private int[][] arrayCompetenties={{0,0,1,0,1},{1,0,1,0,1},{1,1,0,0,1},{1,1,1,1,1},{0,0,0,0,1}};
=> row is for the people and columns are for machines </p>

<pre><code>    m1  m2  m3  m4  m5  m6  m7
p1  1               1       
p2      1   1   1   1       
p3          1       1       1
p4      1       1       1   
p5  1       1       1       1
p6              1   1   1   1
p7  1       1   1   1   1   1
</code></pre>

<p>my question => with what code do i connect all the people to machine in groups (all the posibilities)</p>

<p>like: </p>

<p>p1 -> m1 , p2->m2 , p3 -> m3 , p4->m4 , p5 -> m5 , p6->m6 </p>

<p>p1 -> m1 , p2->m3 , p3 -> m3 , p4->m4 , p5 -> m5 , p6->m6 </p>

<p>p1 -> m1 , p2->m4 , p3 -> m5 , p4->m4 , p5 -> m5 , p6->m6 </p>

<p>p1 -> m1 , p2->m5 , p3 -> m3 , p4->m4 , p5 -> m5 , p6->m6 </p>

<p>p1 -> m1 , p2->m2 , p3 -> m3 , p4->m4 , p5 -> m5 , p6->m6 </p>

<p>....</p>

<p>i need a loop buth how? =D</p>

<p>thanks!</p>
