The answer is
For any number
n it will be
Since this is a knockout round.At the end of each round, half players are getting eliminated.
N = 2^k where N is the total number of Players.
In First Round, We will have
N/2 matches, in second round
N/4 matches. So, at the end of last round we will have
Total number of matches =
N/2 + N/4 + N/8 + ....2 + 1 which is a standard Geometric Progression Problem.
The Sum will be
1*(2^k - 1)/(2-1) = 2^k - 1 = N-1
Similarly, You can generalize this to any 'N'.
For Generalizing it for any
N, Remember that we can break any
N in powers of
Ex- I can write
1000 = 512 + 256 + 128 + 64 + 32 + 8.
Now, Doing as above, We will have
511+ 255 + 127 + 63 + 31 + 7 = 994 matches. We will be left with 6 people.
6 = 2 + 2 + 2 , Then we will have 3 more matches i.e 997 and left with 3 people.
3 people, split as
1 which will take 2 matches.
The total number of matches will be
994 + 3 + 2 = 999.
Now, You can generalize it.
Hope that helps. :)