Skip to content

Commit 8c1bbdb

Browse files
GiggleLiuclaude
andcommitted
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>
1 parent a7b271a commit 8c1bbdb

2 files changed

Lines changed: 25 additions & 21 deletions

File tree

.claude/skills/add-model/SKILL.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Before any implementation, collect all required information. If called from `iss
2323
| 6 | **Configuration space** | What `dims()` returns | `vec![2; num_vertices]` for binary vertex selection |
2424
| 7 | **Feasibility check** | How to validate a configuration | "All selected vertices must be pairwise adjacent" |
2525
| 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\|" |
2727
| 10 | **Solving strategy** | How it can be solved | "BruteForce works; ILP reduction available" |
2828
| 11 | **Category** | Which sub-module under `src/models/` | `graph`, `optimization`, `satisfiability`, `set`, `specialized` |
2929

@@ -48,6 +48,22 @@ Choose the appropriate sub-module under `src/models/`:
4848
- `set/` -- set-based problems (set packing, set cover)
4949
- `specialized/` -- problems that don't fit other categories (factoring, circuit, paintshop)
5050

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.
66+
5167
## Step 2: Implement the model
5268

5369
Create `src/models/<category>/<name>.rs`:

.github/ISSUE_TEMPLATE/problem.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,17 @@ Connect fields to the symbols defined above.
5050
| <!-- e.g. graph --> | <!-- e.g. SimpleGraph --> | <!-- e.g. the graph G=(V,E) --> |
5151
| <!-- e.g. weights --> | <!-- e.g. Vec<W> --> | <!-- e.g. vertex weights w_i for each i ∈ V (weighted variant only) --> |
5252

53-
## Problem Size
54-
55-
<!--
56-
Size metrics characterize instance complexity and are used for reduction overhead analysis.
57-
List the named getter methods (e.g., num_vertices(), num_edges()) that the problem type provides.
58-
Use symbols defined above.
59-
60-
Examples:
61-
- Graph problems: num_vertices = |V|, num_edges = |E|
62-
- SAT problems: num_vars, num_clauses, num_literals
63-
- Set problems: num_sets, universe_size
64-
-->
65-
66-
| Metric | Expression | Description |
67-
|--------|------------|-------------|
68-
| <!-- e.g. num_vertices --> | <!-- e.g. \|V\| --> | <!-- e.g. number of vertices in the graph --> |
69-
| <!-- e.g. num_edges --> | <!-- e.g. \|E\| --> | <!-- e.g. number of edges in the graph --> |
70-
7153
## Complexity
7254

73-
- **Decision complexity:** <!-- e.g. NP-complete, NP-hard, P, etc. -->
7455
- **Best known exact algorithm:** <!-- e.g. O(1.1996^n) by Xiao & Nagamochi (2017), where n = |V| -->
75-
- **Best known approximation:** <!-- e.g. no PTAS unless P=NP; or 2-approximation via greedy -->
56+
- **References:** <!-- URL or citation for complexity results -->
57+
58+
## Extra Remark
59+
60+
<!--
61+
Optional notes about the problem that are worth mentioning in the paper or rustdoc.
62+
E.g. historical context, notable applications, relationship to other problems, or special properties.
63+
-->
7664

7765
## How to solve
7866
<!--

0 commit comments

Comments
 (0)