🧩 Constraint Solving POTD:Social Golfer Problem #23350
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #23455. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Category: Classic CSP · Date: 2026-03-28
Problem Statement
The setup: A group of
n = g × pgolfers wants to play golf forwweeks. Each week, allngolfers are divided intoggroups of exactlypplayers. The challenge: arrange the schedule so that no two golfers ever play together in the same group more than once across allwweeks.Formally: Given integers
g(groups per week),p(players per group), andw(weeks), find an assignment of golfers to groups for each week — or prove none exists.A small concrete instance (4-3-3):
g = 4groups,p = 3players each, son = 12golfers (label them 0–11)w = 3weeksEach pair of golfers shares a group in at most one week across all three weeks.
Input/Output specification:
(g, p, w)w-week schedule (a 3D assignmentgroup[week][slot] ∈ {0..n-1}), orUNSATif none existswsubject to the no-repeat-pair constraintWhy It Matters
Sports scheduling & round-robin tournaments. The social golfer pattern underpins any round-robin scheduling where diversity of matchups matters — tennis ladder leagues, bridge tournaments, and sports drafts all benefit from maximizing pairwise encounters without overrepetition.
Frequency assignment & experiment design. In antenna frequency planning, distinct "groups" represent spectrum slots and "golfers" are transmitters; the no-repeat-pair constraint prevents co-channel interference across time slots. In statistics, the problem maps onto balanced incomplete block designs (BIBDs), which ensure each experimental treatment pair appears together exactly once for unbiased comparisons.
Benchmark for CP solvers. The Social Golfer Problem is a standard CSP benchmark — instances like 5-3-7 (15 golfers, 7 weeks) have been used to stress-test propagation engines, symmetry-breaking techniques, and portfolio solvers since the early 2000s.
Modeling Approaches
Approach 1 — Constraint Programming (Set Variables)
Decision variables:
S[w][g]= set ofpgolfers in groupgduring weekw(set variable, cardinalityp)Constraints:
Trade-offs: The MIP formulation is mechanically straightforward but introduces
O(n²gw)auxiliary variables for the pair indicator, making it large even for modest instances. LP relaxations are weak. CP models with global constraints typically dominate on feasibility.Approach 3 — SAT Encoding (Sparse at-most-one)
Encode
x[w][i][j]as Boolean literals. The at-most-one (AMO) "two golfers share group" constraints are encoded using commander variable or product encoding to keep clause count polynomial. A CDCL SAT solver then finds solutions or proves unsatisfiability. This is competitive on provingUNSATfor hard instances near the theoretical upper bound.Example Model — MiniZinc (CP, set-based)
Key Techniques
1. Symmetry Breaking (Critical for Tractability)
The Social Golfer Problem is riddled with symmetry:
wweeks gives an equivalent solutionggroups in a week is equivalentWithout breaking these, the solver wastes enormous effort on equivalent subtrees. Standard breaks:
{1..p}, {p+1..2p}, ...(breaks week symmetry + golfer relabeling)min(S[w][1]) < min(S[w][2]) < ...Symmetry breaking alone can reduce search by factors of
g! · (g!)^(w-1) · n!— often making otherwise intractable instances feasible.2. Global Constraints & Propagation
The
partition_setglobal constraint achieves strong consistency by ensuring the union covers all elements exactly once. The pairwise intersection constraint|S[w1][g1] ∩ S[w2][g2]| ≤ 1benefits from bound consistency on set variable domains — if golferjis forced into groupg1in weekw1, the solver can immediately excludejfrom any group in weekw2that already contains another member ofg1.3. Dual Modeling & Channeling
The problem admits both a group-based model (which group does golfer
jgo to?) and a pair-based model (which week does pair(j1, j2)meet?). Maintaining two models simultaneously with channeling constraints lets the solver exploit propagation in both directions — a technique that has proven highly effective in benchmarks.Challenge Corner
References
Harvey, W. & Winterer, T. (2001). "Solving the Social Golfer Problem via Symmetry Breaking." Proceedings of CP 2001. — The paper that introduced efficient symmetry-breaking for this benchmark.
Rossi, F., van Beek, P., & Walsh, T. (Eds., 2006). Handbook of Constraint Programming. Elsevier. — Chapter 4 covers global constraints (partition, intersection) used in set-based models.
Smith, B. M. (2000). "Modelling for Constraint Programming." CP 2000 Tutorial Slides. — Includes the Social Golfer Problem as a worked dual-modelling example.
Colbourn, C. J. & Dinitz, J. H. (Eds., 2007). Handbook of Combinatorial Designs. — Connects the problem to resolvable designs and Kirkman schoolgirl configurations.
Beta Was this translation helpful? Give feedback.
All reactions