I encountered this problem today, haven't come up with the optimal solution yet :(
So the problem is given you N teams (N is even), find a way to arrange the matches so that the differences between the number of home matches and away matches of each team is at most 1.
Is it possible to find such an arrangement? Please help :( Thank you very much!
UPD: Each team shouldn't play more than 2 Home matches or 2 Away matches in a row. Can this problem be possible to solve with this constraint as well?







