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
chore: simplify issue template and add size inference to add-model skill
Remove "Problem Size", "Decision complexity", and "Best known approximation"
fields from the problem issue template. Keep only "Best known exact algorithm"
and add "Extra Remark" section. Add Step 1.5 to add-model skill for inferring
problem size getters from the complexity expression.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/add-model/SKILL.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Before any implementation, collect all required information. If called from `iss
23
23
| 6 |**Configuration space**| What `dims()` returns |`vec![2; num_vertices]` for binary vertex selection |
24
24
| 7 |**Feasibility check**| How to validate a configuration | "All selected vertices must be pairwise adjacent" |
25
25
| 8 |**Objective function**| How to compute the metric | "Sum of weights of selected vertices" |
26
-
| 9 |**Complexity class**|NP-hard, NP-complete, etc. | NP-hard|
26
+
| 9 |**Best known exact algorithm**|Complexity with variable definitions | "O(1.1996^n) by Xiao & Nagamochi (2017), where n = \|V\|"|
27
27
| 10 |**Solving strategy**| How it can be solved | "BruteForce works; ILP reduction available" |
28
28
| 11 |**Category**| Which sub-module under `src/models/`|`graph`, `optimization`, `satisfiability`, `set`, `specialized`|
29
29
@@ -48,6 +48,22 @@ Choose the appropriate sub-module under `src/models/`:
48
48
-`set/` -- set-based problems (set packing, set cover)
49
49
-`specialized/` -- problems that don't fit other categories (factoring, circuit, paintshop)
50
50
51
+
## Step 1.5: Infer problem size getters
52
+
53
+
From the **best known exact algorithm** complexity (item 9), infer what problem size getter methods the struct should expose. The variables used in the complexity expression define the natural size metrics.
54
+
55
+
**How to infer:**
56
+
- Parse the complexity expression for variable names (e.g., `O(1.1996^n)` where `n = |V|` → `num_vertices`)
57
+
- Each variable that measures a distinct dimension of the input becomes a getter method
58
+
- Common mappings:
59
+
-`n = |V|` → `num_vertices()`
60
+
-`m = |E|` → `num_edges()`
61
+
-`n` (number of variables) → `num_vars()`
62
+
-`m` (number of clauses) → `num_clauses()`
63
+
-`k` (number of sets) → `num_sets()`
64
+
65
+
These getters are used by the overhead system for reduction overhead expressions. Implement them as inherent methods on the struct.
0 commit comments