Repository navigation
🧩 Constraint Solving POTD:Problem of the Day: Golomb Ruler Problem #67178
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 #67405. |
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.
Problem Statement
A Golomb ruler is a set of marks along an imaginary ruler such that no two pairs of marks are the same distance apart. Equivalently, all pairwise distances between marks must be distinct.
Concrete example: For a 4-mark Golomb ruler with marks at positions
{0, 1, 4, 6}:Problem: Find the shortest Golomb ruler with
nmarks, or equivalently, find any valid placement ofnmarks on a ruler of minimal length such that all pairwise distances are unique.Input: Number of marks
nOutput: A sequence of mark positions
[p_1, p_2, ..., p_n]wherep_1 = 0 < p_2 < ... < p_n, minimizingp_n, such that all differencesp_i - p_j(fori ≠ j) are distinct.Why It Matters
Radio Astronomy & Signal Processing: Golomb rulers define optimal antenna arrays in radio telescopes. Each antenna mark corresponds to a receiver, and the distinct inter-antenna distances allow astronomers to reconstruct signals at multiple scales with minimal redundancy. This is critical for synthesizing high-resolution images from sparse data.
Communication Systems: In frequency-hopping spread spectrum and error-correcting codes, Golomb rulers ensure that transmission patterns avoid destructive interference. Applications include military communications, satellite ranging, and sonar systems.
Computer Science & Combinatorics: The Golomb ruler problem is a canonical benchmark in constraint programming and combinatorial optimization. Finding optimal rulers for
n ≤ 28remains computationally challenging, making it an ideal test case for advancing solver technology.Modeling Approaches
Approach 1: Constraint Programming (CP)
Paradigm: Integer programming with global constraints
Decision variables:
pos[i] ∈ {0, 1, ..., MAX_LENGTH}for each marki(its position on the ruler)dist[i,j]for each pair(i, j)withi < jrepresenting the distanceConstraints:
Trade-offs:
AllDifferentglobal constraint enables powerful arc-consistency propagation, dramatically pruning the search space.n(roughlyn ≤ 20), but exponential growth limits larger instances.Approach 2: SAT Encoding
Paradigm: Boolean Satisfiability with redundant position encoding
Decision variables:
at[i, p]for each markiand positionp(markiis at positionp)d[i, j, k]for each pair(i, j)and distancek(distance between marksiandjisk)Constraints (in CNF):
Trade-offs:
Example Model (MiniZinc)
Key Techniques
1. Symmetry Breaking
Golomb rulers have rotational symmetry (any valid ruler is still valid when shifted). Fixing
pos[0] = 0eliminates this; additionally, some solvers exploit automorphism detection to prune symmetric branches early.2. Global Constraints & Propagation
The
AllDifferentconstraint (or its generalization,AllDistinct) is the workhorse. Combined with constraint propagation algorithms like arc consistency (AC-3, AC-2001), it identifies infeasible variable assignments before search begins, pruning the search tree exponentially.3. Variable Ordering Heuristics
Effective search strategies assign marks left-to-right (by position) while ordering mark indices dynamically. Some solvers use impact-based search or weighted degree heuristics to prioritize variables that appear in many constraints.
4. Lower Bounds & Relaxations
The sum of the first
kdistances must be at least1 + 2 + ... + k = k(k+1)/2. Fornmarks, we need at leastn(n-1)/2distinct distances, providing a lower bound on ruler length. Relaxing the all-distinct constraint gives a linear program whose optimum bounds the true optimum.Challenge Corner
Question 1: Can you break Golomb ruler symmetry further? Beyond fixing the first mark, are there other symmetries (e.g., reflection or combinatorial properties of optimal rulers) that you could exploit via additional constraints?
Question 2: The gap between known optimal rulers and upper bounds grows as
nincreases. How would you design a hybrid algorithm combining branch-and-bound (MIP relaxation), constraint propagation, and local search (perturbation) to find better solutions faster?Question 3: Golomb rulers have been extensively studied empirically. If you had a dataset of "nearly-optimal" rulers for various
n, how would you use machine learning to warm-start a constraint solver?References
Sidon, S. (1932). "Über eine Eigenschaft von Reihen, bei welchen die Differenzen folgen-der Glieder verschieden sind." Mathematische Annalen, 111(1), 63–75.
Dollas, A., Rankin, W. T., & McCracken, D. (1998). "A Parallel Search Engine for a Golomb Ruler." IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 6(2), 252–261.
n=28.Rossi, F., van Beek, P., & Walsh, T. (Eds.). (2006). Handbook of Constraint Programming. Elsevier.
OR-Tools Golomb Ruler Example: (developers.google.com/redacted)
All reactions