creating html table based on an algorithm suggestion
<p>I'm trying to create an algorithm and want to get your suggestions about that.</p>

<p>There are 4 numbers from 1 to 4 (The sum of this number can vary e.q: 10 or 20).
According to the above total number a html table will occur automatically as below.</p>

<p><img src="http://i.stack.imgur.com/pyiNr.jpg" alt="enter image description here"></p>

<p>After the formation of the table; </p>

<ol>
<li>Every number will put into the table randomly from <strong>R1</strong> to <strong>R3</strong> just once. </li>
<li>Every number necessarily  must be in every rows.</li>
<li>If current number was in B side (of colums), next time (i mean, in next row) must be in A side or just the opposite. </li>
<li>Every numbers necessarily must match just once in whole table.</li>
</ol>

<p>Thank you very much for your advice, help and suggust already now.</p>
