English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

A knockout tournament is a series of games. Two players compete in each game; the loser is knocked out (i.e. does not play anymore), the winner carries on. The winner of the tournament is the player - Computer Science

Advertisements
Advertisements

Question

A knockout tournament is a series of games. Two players compete in each game; the loser is knocked out (i.e. does not play anymore), the winner carries on. The winner of the tournament is the player that is left after all other players have been knocked out. Suppose there are 1234 players in a tournament. How many games are played before the tournament winner is decided?

Sum

Solution

No. of players 2 3 4 5 n 1234
No. of games 1 2 3 4 n - 1 1234 - 1 = 1233

On the other hand, let n be the number of games, played and r be the number of players remaining in the tournament.
After every game, r will be reduced by 1.
r → no. of players remaining
n → no. of games played
If r = 2 then n = 1
As n increases, r decreases
n, r : = n + 1, r – 1
n + r = (n + 1) + (r – 1)
= n + 1 + r – 1
= n + r
Therefore n + r is invariant. n + r = 1234 (No. of players initially)
The winner of the tournament is the player that is left after all other players have been knocked out.
After all the games, only one player (winner) is left out.
i. e. n = 1
Put n = 1 in (1)
n + r = 1234 …. (1)
1 + r = 1234
r = 1234 – 1 = 1233
No. of games played = 1233

shaalaa.com
Invariants
  Is there an error in this question or solution?
Chapter 8: Iteration and recursion - Evaluation - Section - C [Page 114]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 8 Iteration and recursion
Evaluation - Section - C | Q 2. | Page 114
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×