Consider a round robin tournament between 8 teams. A win gives 3 points, tie gives 1 point (to both teams) and loss gives 0 points.

If the match between two teams, say A & B, is a tie, then A & B can't end up with the same number points after the tournament.

The task is to find the maximum number of ties in the tournament.

I have no idea other than bashing all the cases. Please help me how to do it?