Skip to content

Instantly share code, notes, and snippets.

@kruszczynski
Created August 25, 2026 09:30
Show Gist options
  • Select an option

  • Save kruszczynski/1598f23fd4ffbf83c3eae132531e2638 to your computer and use it in GitHub Desktop.

Select an option

Save kruszczynski/1598f23fd4ffbf83c3eae132531e2638 to your computer and use it in GitHub Desktop.
Tennis tournament exercise, part 08

Stage 8: the rights holders return

Reason about these out loud. No implementation needed.

  1. Three teams. They now want players split across Team A, B and C, same rule: no player faces a teammate. How does your approach change?

  2. Best effort. The fixture list has no valid two-team split, but they refuse to drop matches. Instead they want the assignment that honours as many of the requested matches as possible. What is this problem?

  3. Live. Matches are announced one at a time across the season. After each announcement you must immediately answer either "here is a valid split" or "the list is now unsatisfiable". Re-running your batch solution per announcement is too slow. What would you reach for?

  4. Fairness. They want the two teams to be within one player of the same size. Does that change the difficulty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment