मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

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

प्रश्न

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?

बेरीज

उत्तर

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
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 8: Iteration and recursion - Evaluation - Section - C [पृष्ठ ११४]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 8 Iteration and recursion
Evaluation - Section - C | Q 2. | पृष्ठ ११४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×