I have a specific number of teams. I want every team to play exactly 4 matches with 4 different opponents at 4 specified times.
The complication arises from that no team can play 2 different matches at the same time.
For example if team 1 is playing like this
team1 vs team2, team1 vs team3, team1 vs team4, team1 vs team5
then team2 already has the first time slot occupied so team2 can play like this
(team2 vs team1), team2 vs team3, team2 vs team4, team2 vs team5
But here the problem arises, team3 will play in the second time slot with team1 and team2 and this can not be done.
I do not know what this algorithm can be called, but I am searching for algorithm to implement this.
I made a search to find round-robin and other tournament like matching algorithm and also the marriage problem, but I think my problem is different. Please correct me if I am wrong.
Any help is greatly appreciated.