Adobe Interview Puzzle IPL Solution - 27 May

The IPL (Indian Premier League) is about to start. A total of nine teams are participating in the league. As per the game play, each team will have to play two matches with every other team and then the top four teams are to be qualified for the playoffs.

Can you identify the minimum wins required for any team to ensure a place in the playoffs?

Solution
Total number of matches that are to be played are:
9C2 * 2
= 9! / (2!7!) * 2
= 8 * 9
= 72
And thus each team will play 16 matches.

Now let us examine the possible cases.

Case 1:
If suppose, Team A, Team B and Team C wins 14 matches each i.e. they lose 1 match each from the other two teams, then the Team D can win only 16 - 3 * 2 = 10 matches.

Case 2:
Now let us suppose if the top four teams win 13 matches each.
Team A: 13 wins and 3 loses from Team B, Team C and Team D.
Team B: 13 wins and 3 loses from Team A, Team C and Team D.
Team C: 13 wins and 3 loses from Team A, Team B and Team D.
Team D: 13 wins and 3 loses from Team A, Team B and Team C.

In this case, the Team E can only win a maximum of 8 matches as Team A, Team B, Team C and Team D will win all the matches played by E.

Case 3:
If suppose the top five team wins 12 matches each.
Team A: 12 wins and 3 loses from Team B, Team C, Team D and Team E.
Team B: 12 wins and 3 loses from Team A, Team C, Team D and Team E.
Team C: 12 wins and 3 loses from Team A, Team B, Team D and Team E.
Team D: 12 wins and 3 loses from Team A, Team B, Team C and Team E.
Team E: 12 wins and 3 loses from Team A, Team B, Team C and Team D.

Now Team E wins 12 matches but it still won't be able to qualify for the playoffs (assuming that it has the lowest run rate).

Therefore from case 2, it can be said that a team must win at least 13 matches to be sure to play in the playoffs.