title: Searching an algorithm to make "matchs"
body: <p>For a little cards tournament where we play in teams (2vs2), I need to create a "plan" of who is going to play against whom.</p>
  
  <p>"Rules" are:</p>
  
  <ul>
  <li>We have a number of teams, each consisting of a pair of players.</li>
  <li>We have several "rounds" in the tournament.</li>
  <li>The number of rounds is lower than the number of teams.</li>
  </ul>
  
  <p>The goal is to make a plan in which no team will play twice against another team.</p>
  
  <p>I tried the "heavy" way with backtracking, but as I thought, the complexity is big and we quickly have an huge number of possibilities to calculate, so I am looking for an algorithm which is able to make me a plan quickly.</p>
  
  <p>Here is an example of what I want for the output, it has been generated with my "heavy way":</p>
  
  <pre><code>Tournament with 16 teams and 10 rounds
  
  Round 0
  Team 0 versus Team 1
  Team 2 versus Team 3
  Team 4 versus Team 5
  Team 6 versus Team 7
  Team 8 versus Team 9
  Team 10 versus Team 11
  Team 12 versus Team 13
  Team 14 versus Team 15
  
  Round 1
  Team 0 versus Team 2
  Team 1 versus Team 3
  Team 4 versus Team 6
  Team 5 versus Team 7
  Team 8 versus Team 10
  Team 9 versus Team 11
  Team 12 versus Team 14
  Team 13 versus Team 15
  
  Round 2
  Team 0 versus Team 3
  Team 1 versus Team 2
  Team 4 versus Team 7
  Team 5 versus Team 6
  Team 8 versus Team 11
  Team 9 versus Team 10
  Team 12 versus Team 15
  Team 13 versus Team 14
  
  Round 3
  Team 0 versus Team 4
  Team 1 versus Team 5
  Team 2 versus Team 6
  Team 3 versus Team 7
  Team 8 versus Team 12
  Team 9 versus Team 13
  Team 10 versus Team 14
  Team 11 versus Team 15
  
  Round 4
  Team 0 versus Team 5
  Team 1 versus Team 4
  Team 2 versus Team 7
  Team 3 versus Team 6
  Team 8 versus Team 13
  Team 9 versus Team 12
  Team 10 versus Team 15
  Team 11 versus Team 14
  
  Round 5
  Team 0 versus Team 6
  Team 1 versus Team 7
  Team 2 versus Team 4
  Team 3 versus Team 5
  Team 8 versus Team 14
  Team 9 versus Team 15
  Team 10 versus Team 12
  Team 11 versus Team 13
  
  Round 6
  Team 0 versus Team 7
  Team 1 versus Team 6
  Team 2 versus Team 5
  Team 3 versus Team 4
  Team 8 versus Team 15
  Team 9 versus Team 14
  Team 10 versus Team 13
  Team 11 versus Team 12
  
  Round 7
  Team 0 versus Team 8
  Team 1 versus Team 9
  Team 2 versus Team 10
  Team 3 versus Team 11
  Team 4 versus Team 12
  Team 5 versus Team 13
  Team 6 versus Team 14
  Team 7 versus Team 15
  
  Round 8
  Team 0 versus Team 9
  Team 1 versus Team 8
  Team 2 versus Team 11
  Team 3 versus Team 10
  Team 4 versus Team 13
  Team 5 versus Team 12
  Team 6 versus Team 15
  Team 7 versus Team 14
  
  Round 9
  Team 0 versus Team 10
  Team 1 versus Team 11
  Team 2 versus Team 8
  Team 3 versus Team 9
  Team 4 versus Team 14
  Team 5 versus Team 15
  Team 6 versus Team 12
  Team 7 versus Team 13
  </code></pre>