Puzzle | Single Elimination Tournament

In a single-elimination tournament, such as the tennis Grand Slam championships – every losing player is immediately eliminated from the subsequent rounds until a single player is determined. If there are N players at the beginning of the tournament, answer the following questions.

  1. What is the total number of matches needed to get a winner?
  2. How many rounds are there in such a tournament?
  3. How many more matches need to be played to determine the second-best player based on the information produced by the tournament?


  1. Since we are eliminating one player in each match, and there is only one winner. Then, in total N-1 players are needed to be eliminated. Hence, N-1 matches are needed to get a winner. Mathematically, if there are N players, then we will have N/2 matches in the first round, N/4 matches in the second round, and so on until we have 1 match in the final round. So, the total number of matches is just the sum of the geometric progression, with terms N/2, N/4 until 1.

    Let there be a total number of N players, Then the total number of matches to obtain a winner:

    => N/2 + N/4 + N/8 + …. + 2 + 1

    This is a geometric progression with
    a = N/2, r = 1/2
    The number of terms in the progression will be log_{2}N

    => N/2(1 – (1/2)^{log_2N}) / 1 – 1/2)
    => N(1 – 1/2^{log_2N})
    => N(1 – 1/N)
    => (N – 1)

  2. The total number of rounds in the tournament are log2N if N is a power of 2, as in each round half of the players gets eliminated, until only one player is left. If N is not a power of 2, then number of rounds are the smallest power of 2, that is greater than or equal to N, which is equal to ceil(log2N).
  3. The second best player can be any player who lost to the winner and nobody else. These players can be made to play their own single elimination tournament. Since, the winner will be present in all the rounds of the tournament, so in total their will be ceil(log2N) players contending for the second best player. Since, for an N players tournament, N-1 matches are played to find out the winner, hence, ceil(log2N) – 1 matches are required to determine the winner among the contenders, which will be our second best player.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.