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
Copy file name to clipboardExpand all lines: .claude/skills/issue-to-pr.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ The plan MUST include an **action pipeline** section with concrete steps based o
100
100
- Present example in tutorial style (see KColoring→QUBO section for reference)
101
101
102
102
5.**Regenerate graph** — `cargo run --example export_graph`
103
+
6.**Push and create PR** — Push the changes and create a pull request with a description of the changes.
103
104
104
105
**Rules for solver implementation:**
105
106
- Make sure at least one solver is provided in the issue template. Check if the solving strategy is valid. If not, reply under issue to ask for clarification.
@@ -132,8 +133,10 @@ The plan MUST include an **action pipeline** section with concrete steps based o
Copy file name to clipboardExpand all lines: Makefile
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -165,9 +165,9 @@ compare: rust-export
165
165
INSTRUCTIONS ?=
166
166
OUTPUT ?= claude-output.log
167
167
AGENT_TYPE ?= claude
168
+
PLAN_FILE ?= $(shell ls -t docs/plans/*.md 2>/dev/null | head -1)
168
169
169
170
run-plan:
170
-
PLAN_FILE ?= $(shell ls -t docs/plans/*.md 2>/dev/null | head -1)
171
171
@NL=$$'\n';\
172
172
BRANCH=$$(git branch --show-current);\
173
173
if [ "$(AGENT_TYPE)"="claude" ];then \
@@ -182,6 +182,7 @@ run-plan:
182
182
PROMPT="$${PROMPT}$${NL}$${NL}## Process$${NL}$${PROCESS}$${NL}$${NL}## Rules$${NL}- Tests should be strong enough to catch regressions.$${NL}- Do not modify tests to make them pass.$${NL}- Test failure must be reported.";\
Copy file name to clipboardExpand all lines: docs/paper/reductions.typ
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -806,6 +806,25 @@ The following reductions to Integer Linear Programming are straightforward formu
806
806
_Construction._ Variables: $x_v in {0, 1}$ for each $v in V$. Constraints: $x_u + x_v <= 1$ for each $(u, v) in.not E$ (non-edges). Objective: maximize $sum_v x_v$. Equivalently, IS on the complement graph. _Solution extraction:_$K = {v : x_v = 1}$.
807
807
]
808
808
809
+
#reduction-rule("TravelingSalesman", "ILP",
810
+
example: true,
811
+
example-caption: [Weighted $K_4$: the optimal tour $0 arrow 1 arrow 3 arrow 2 arrow 0$ with cost 80 is found by position-based ILP.],
812
+
)[
813
+
The traveling salesman problem reduces to binary ILP with $n^2 + 2 m n$ variables via position-based encoding with McCormick linearization.
814
+
][
815
+
_Construction._ For graph $G = (V, E)$ with $n = |V|$ and $m = |E|$:
816
+
817
+
_Variables:_ Binary $x_(v,k)in {0, 1}$ for each vertex $v in V$ and position $k in {0, ..., n-1}$. Interpretation: $x_(v,k) = 1$ iff vertex $v$ is at position $k$ in the tour.
818
+
819
+
_Auxiliary variables:_ For each edge $(u,v) in E$ and position $k$, introduce $y_(u,v,k)$ and $y_(v,u,k)$ to linearize the products $x_(u,k)dot x_(v,(k+1) mod n)$ and $x_(v,k)dot x_(u,(k+1) mod n)$ respectively.
820
+
821
+
_Constraints:_ (1) Each vertex has exactly one position: $sum_(k=0)^(n-1) x_(v,k) = 1$ for all $v in V$. (2) Each position has exactly one vertex: $sum_(v in V) x_(v,k) = 1$ for all $k$. (3) Non-edge consecutive prohibition: if ${v,w} in.not E$, then $x_(v,k) + x_(w,(k+1) mod n) <= 1$ for all $k$. (4) McCormick: $y <= x_(v,k)$, $y <= x_(w,(k+1) mod n)$, $y >= x_(v,k) + x_(w,(k+1) mod n) - 1$.
822
+
823
+
_Objective:_ Minimize $sum_((u,v) in E) w(u,v) dotsum_k (y_(u,v,k) + y_(v,u,k))$.
824
+
825
+
_Solution extraction._ For each position $k$, find vertex $v$ with $x_(v,k) = 1$ to recover the tour permutation; then select edges between consecutive positions.
0 commit comments