You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#330: Add MinMaxMulticenter (p-Center) model (#630)
* Add plan for #330: MinMaxMulticenter model
* Add MinMaxMulticenter (vertex p-center) satisfaction problem model
Implements the vertex-restricted p-center problem as a satisfaction problem:
given a graph with vertex weights, edge lengths, K centers, and distance
bound B, determine if K vertices can be chosen such that max{w(v)*d(v)} <= B.
Includes model, unit tests (15 tests), CLI creation support, canonical
example, and regenerated fixtures/schemas.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add MinMaxMulticenter problem-def to paper
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Review fixes: add trait_consistency entry and non-unit edge length test
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove plan file after implementation
* fix: address PR #630 review findings
* fix: tighten PR #630 MinMaxMulticenter CLI review follow-ups
* Fix stale API usage after merging main
- Update canonical_model_example_specs to use new ModelExampleSpec
struct fields (instance, optimal_config, optimal_value) instead of
the old callback-based API
- Fix paper graph access: graph.edges instead of graph.inner.edges
- Fix paper optimal access: use optimal_config/optimal_value instead
of old optimal array API
- Remove count of satisfying solutions (not available in new export)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add MinMaxMulticenter to brute-force-only hint in solve help
MinMaxMulticenter has no ILP reduction path, so it needs --solver
brute-force. Add it to the solve help text alongside
LengthBoundedDisjointPaths and StringToStringCorrection.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: GiggleLiu <cacate0129@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Given a graph $G = (V, E)$ with vertex weights $w: V -> ZZ_(>= 0)$, edge lengths $l: E -> ZZ_(>= 0)$, a positive integer $K <= |V|$, and a rational bound $B > 0$, does there exist $S subset.eq V$ with $|S| = K$ such that $max_(v in V) w(v) dot d(v, S) <= B$, where $d(v, S) = min_(s in S) d(v, s)$ is the shortest weighted-path distance from $v$ to the nearest vertex in $S$?
1631
+
][
1632
+
Also known as the _vertex p-center problem_ (Garey & Johnson A2 ND50). The goal is to place $K$ facilities so that the worst-case weighted distance from any demand point to its nearest facility is at most $B$. NP-complete even with unit weights and unit edge lengths (Kariv and Hakimi, 1979).
1633
+
1634
+
Closely related to Dominating Set: on unweighted unit-length graphs, a $K$-center with radius $B = 1$ is exactly a dominating set of size $K$. The best known exact algorithm runs in $O^*(1.4969^n)$ via binary search over distance thresholds combined with dominating set computation @vanrooij2011. An optimal 2-approximation exists (Hochbaum and Shmoys, 1985); no $(2 - epsilon)$-approximation is possible unless $P = "NP"$ (Hsu and Nemhauser, 1979).
1635
+
1636
+
Variables: $n = |V|$ binary variables, one per vertex. $x_v = 1$ if vertex $v$ is selected as a center. A configuration is satisfying when exactly $K$ centers are selected and $max_(v in V) w(v) dot d(v, S) <= B$.
1637
+
1638
+
*Example.* Consider the graph $G$ on #nv vertices with unit weights $w(v) = 1$, unit edge lengths, edges ${#edges.map(((u, v)) =>$(#u, #v)$).join(", ")}$, $K = #K$, and $B = #B$. Placing centers at $S = {#centers.map(i=>$v_#i$).join(", ")}$ gives maximum distance $max_v d(v, S) = 1 <= B$, so this is a feasible solution.
caption: [Min-Max Multicenter with $K = #K$, $B = #B$ on a #{nv}-vertex graph. Centers #centers.map(i=>$v_#i$).join(" and ") (blue) ensure every vertex is within distance $B$ of some center.],
0 commit comments