Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3c851b2
Upgrade LongestCircuit from decision (Or) to optimization (Max<W::Sum>)
isPANN Mar 25, 2026
1dc2e8b
Upgrade OptimalLinearArrangement from decision (Or) to optimization (…
isPANN Mar 25, 2026
47b5d8f
Upgrade RuralPostman from decision (Or) to optimization (Min<W::Sum>)
isPANN Mar 25, 2026
3029569
Upgrade MixedChinesePostman from decision (Or) to optimization (Min<W…
isPANN Mar 25, 2026
675bcf4
Upgrade StackerCrane from decision (Or) to optimization (Min<i32>)
isPANN Mar 25, 2026
8793ce4
Upgrade MinimumCardinalityKey from decision (Or) to optimization (Min…
isPANN Mar 25, 2026
3c3e49e
Upgrade SequencingToMinimizeMaximumCumulativeCost from decision (Or) …
isPANN Mar 25, 2026
2f46676
Upgrade MultipleCopyFileAllocation from decision (Or) to optimization…
isPANN Mar 25, 2026
85d0457
Upgrade ExpectedRetrievalCost from decision (Or) to optimization (Min…
isPANN Mar 25, 2026
f7cd5d4
Upgrade SumOfSquaresPartition from decision (Or) to optimization (Min…
isPANN Mar 25, 2026
d8be6cd
Upgrade LongestCommonSubsequence from decision (Or) to optimization (…
isPANN Mar 25, 2026
6174fd1
Upgrade ShortestCommonSupersequence from decision (Or) to optimizatio…
isPANN Mar 25, 2026
c5efb96
Fix CLI create.rs and example-db after Group A model upgrades
isPANN Mar 25, 2026
47bb986
chore: rustfmt formatting fixes
isPANN Mar 25, 2026
9345d9d
Upgrade MinimumCutIntoBoundedSets from decision (Or) to optimization …
isPANN Mar 25, 2026
52a5585
Upgrade ShortestWeightConstrainedPath from decision (Or) to optimizat…
isPANN Mar 25, 2026
97abfbc
Upgrade CapacityAssignment from decision (Or) to optimization (Min<u1…
isPANN Mar 25, 2026
2d0a7b9
Upgrade MinMaxMulticenter from decision (Or) to optimization (Min<W::…
isPANN Mar 25, 2026
0d0e253
Upgrade LengthBoundedDisjointPaths from decision (Or) to optimization…
isPANN Mar 25, 2026
6013fa0
Merge remote-tracking branch 'origin/main' into upgrade-decision-to-o…
isPANN Mar 25, 2026
cc5521a
Adapt Tier 3 ILP rules + solver for optimization model API after main…
isPANN Mar 25, 2026
b5d7c57
Fix example-db test hang: prefer brute-force over ILP for small insta…
isPANN Mar 25, 2026
18c0fe6
Fix ILP<i32> solver performance: tighten variable bounds for HiGHS
isPANN Mar 25, 2026
62a00c7
Fix CLI test: remove --bound from MinimumCardinalityKey customized so…
isPANN Mar 25, 2026
b70a7fd
Improve test coverage: un-ignore OLA ILP tests, add missing branch co…
isPANN Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 120 additions & 134 deletions docs/paper/reductions.typ

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/src/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Registered problems: 50 types, 59 reductions, 69 variant nodes
KSatisfiability/K2 O(num_clauses + num_variables)
KSatisfiability/K3 O(1.307^num_variables)
Knapsack * 1 O(2^(0.5 * num_items))
LengthBoundedDisjointPaths/SimpleGraph * O(2^(num_paths_required * num_vertices))
LengthBoundedDisjointPaths/SimpleGraph * O(2^(max_paths * num_vertices))
LongestCommonSubsequence * LCS 1 O(2^min_string_length)
MaxCut/SimpleGraph/i32 * 1 O(2^(0.7906666666666666 * num_vertices))
MaximalIS/SimpleGraph/i32 * O(3^(0.3333333333333333 * num_vertices))
Expand Down Expand Up @@ -353,7 +353,7 @@ pred create KColoring --k 3 --graph 0-1,1-2,2-0 -o kcol.json
pred create KthBestSpanningTree --graph 0-1,0-2,1-2 --edge-weights 2,3,1 --k 1 --bound 3 -o kth.json
pred create SpinGlass --graph 0-1,1-2 -o sg.json
pred create MaxCut --graph 0-1,1-2,2-0 -o maxcut.json
pred create MinMaxMulticenter --graph 0-1,1-2,2-3 --weights 1,1,1,1 --edge-weights 1,1,1 --k 2 --bound 1 -o pcenter.json
pred create MinMaxMulticenter --graph 0-1,1-2,2-3 --weights 1,1,1,1 --edge-weights 1,1,1 --k 2 -o pcenter.json
pred create ShortestWeightConstrainedPath --graph 0-1,0-2,1-3,2-3,2-4,3-5,4-5,1-4 --edge-lengths 2,4,3,1,5,4,2,6 --edge-weights 5,1,2,3,2,3,1,1 --source-vertex 0 --target-vertex 5 --length-bound 10 --weight-bound 8 -o swcp.json
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SWCP example still uses --length-bound, but the CLI flags list above (and the model upgrade) removed that parameter. This example should be updated to remove --length-bound (and keep only --weight-bound) so it remains runnable.

Suggested change
pred create ShortestWeightConstrainedPath --graph 0-1,0-2,1-3,2-3,2-4,3-5,4-5,1-4 --edge-lengths 2,4,3,1,5,4,2,6 --edge-weights 5,1,2,3,2,3,1,1 --source-vertex 0 --target-vertex 5 --length-bound 10 --weight-bound 8 -o swcp.json
pred create ShortestWeightConstrainedPath --graph 0-1,0-2,1-3,2-3,2-4,3-5,4-5,1-4 --edge-lengths 2,4,3,1,5,4,2,6 --edge-weights 5,1,2,3,2,3,1,1 --source-vertex 0 --target-vertex 5 --weight-bound 8 -o swcp.json

Copilot uses AI. Check for mistakes.
pred create RectilinearPictureCompression --matrix "1,1,0,0;1,1,0,0;0,0,1,1;0,0,1,1" --k 2 -o rpc.json
pred solve rpc.json --solver brute-force
Expand Down Expand Up @@ -516,7 +516,7 @@ Stdin is supported with `-`:
```bash
pred create MIS --graph 0-1,1-2,2-3 | pred solve -
pred create MIS --graph 0-1,1-2,2-3 | pred solve - --solver brute-force
pred create MinMaxMulticenter --graph 0-1,1-2,2-3 --weights 1,1,1,1 --edge-weights 1,1,1 --k 2 --bound 1 | pred solve - --solver brute-force
pred create MinMaxMulticenter --graph 0-1,1-2,2-3 --weights 1,1,1,1 --edge-weights 1,1,1 --k 2 | pred solve - --solver brute-force
pred create TwoDimensionalConsecutiveSets --alphabet-size 6 --sets "0,1,2;3,4,5;1,3;2,4;0,5" | pred solve - --solver brute-force
```

Expand Down
21 changes: 9 additions & 12 deletions problemreductions-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Flags by problem type:
MIS, MVC, MaxClique, MinDomSet --graph, --weights
MaxCut, MaxMatching, TSP, BottleneckTravelingSalesman --graph, --edge-weights
LongestPath --graph, --edge-lengths, --source-vertex, --target-vertex
ShortestWeightConstrainedPath --graph, --edge-lengths, --edge-weights, --source-vertex, --target-vertex, --length-bound, --weight-bound
ShortestWeightConstrainedPath --graph, --edge-lengths, --edge-weights, --source-vertex, --target-vertex, --weight-bound
MaximalIS --graph, --weights
SAT, NAESAT --num-vars, --clauses
KSAT --num-vars, --clauses [--k]
Expand All @@ -231,7 +231,7 @@ Flags by problem type:
GraphPartitioning --graph
GeneralizedHex --graph, --source, --sink
IntegralFlowWithMultipliers --arcs, --capacities, --source, --sink, --multipliers, --requirement
MinimumCutIntoBoundedSets --graph, --edge-weights, --source, --sink, --size-bound, --cut-bound
MinimumCutIntoBoundedSets --graph, --edge-weights, --source, --sink, --size-bound
HamiltonianCircuit, HC --graph
LongestCircuit --graph, --edge-weights, --bound
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI help still lists LongestCircuit as requiring --bound, but the model (and create implementation) has been upgraded to optimization and no longer has a bound parameter. Update the flags-by-problem-type list accordingly so users aren’t instructed to pass an unused/invalid flag.

Suggested change
LongestCircuit --graph, --edge-weights, --bound
LongestCircuit --graph, --edge-weights

Copilot uses AI. Check for mistakes.
BoundedComponentSpanningForest --graph, --weights, --k, --bound
Expand All @@ -246,10 +246,10 @@ Flags by problem type:
PathConstrainedNetworkFlow --arcs, --capacities, --source, --sink, --paths, --requirement
Factoring --target, --m, --n
BinPacking --sizes, --capacity
CapacityAssignment --capacities, --cost-matrix, --delay-matrix, --cost-budget, --delay-budget
CapacityAssignment --capacities, --cost-matrix, --delay-matrix, --delay-budget
SubsetSum --sizes, --target
SumOfSquaresPartition --sizes, --num-groups, --bound
ExpectedRetrievalCost --probabilities, --num-sectors, --latency-bound
SumOfSquaresPartition --sizes, --num-groups
ExpectedRetrievalCost --probabilities, --num-sectors
PaintShop --sequence
MaximumSetPacking --sets [--weights]
MinimumHittingSet --universe, --sets
Expand Down Expand Up @@ -277,9 +277,9 @@ Flags by problem type:
CVP --basis, --target-vec [--bounds]
MultiprocessorScheduling --lengths, --num-processors, --deadline
SequencingWithinIntervals --release-times, --deadlines, --lengths
OptimalLinearArrangement --graph, --bound
OptimalLinearArrangement --graph
RootedTreeArrangement --graph, --bound
MinMaxMulticenter (pCenter) --graph, --weights, --edge-weights, --k, --bound
MinMaxMulticenter (pCenter) --graph, --weights, --edge-weights, --k
MixedChinesePostman (MCPP) --graph, --arcs, --edge-weights, --arc-costs, --bound [--num-vertices]
RuralPostman (RPP) --graph, --edge-weights, --required-edges, --bound
StackerCrane --arcs, --graph, --arc-costs, --edge-lengths, --bound [--num-vertices]
Expand Down Expand Up @@ -328,7 +328,7 @@ Examples:
pred create MIS --graph 0-1,1-2,2-3 --weights 1,1,1
pred create SAT --num-vars 3 --clauses \"1,2;-1,3\"
pred create QUBO --matrix \"1,0.5;0.5,2\"
pred create CapacityAssignment --capacities 1,2,3 --cost-matrix \"1,3,6;2,4,7;1,2,5\" --delay-matrix \"8,4,1;7,3,1;6,3,1\" --cost-budget 10 --delay-budget 12
pred create CapacityAssignment --capacities 1,2,3 --cost-matrix \"1,3,6;2,4,7;1,2,5\" --delay-matrix \"8,4,1;7,3,1;6,3,1\" --delay-budget 12
pred create GeneralizedHex --graph 0-1,0-2,0-3,1-4,2-4,3-4,4-5 --source 0 --sink 5
pred create IntegralFlowWithMultipliers --arcs \"0>1,0>2,1>3,2>3\" --capacities 1,1,2,2 --source 0 --sink 3 --multipliers 1,2,3,1 --requirement 2
pred create MultipleChoiceBranching/i32 --arcs \"0>1,0>2,1>3,2>3,1>4,3>5,4>5,2>4\" --weights 3,2,4,1,2,3,1,3 --partition \"0,1;2,3;4,7;5,6\" --bound 10
Expand Down Expand Up @@ -553,7 +553,7 @@ pub struct CreateArgs {
/// Required edge indices for RuralPostman (comma-separated, e.g., "0,2,4")
#[arg(long)]
pub required_edges: Option<String>,
/// Bound parameter (lower bound for LongestCircuit; upper or length bound for BoundedComponentSpanningForest, GroupingBySwapping, LengthBoundedDisjointPaths, LongestCommonSubsequence, MultipleCopyFileAllocation, MultipleChoiceBranching, OptimalLinearArrangement, RootedTreeArrangement, RuralPostman, ShortestCommonSupersequence, or StringToStringCorrection)
/// Bound parameter (lower bound for LongestCircuit; upper or length bound for BoundedComponentSpanningForest, GroupingBySwapping, LengthBoundedDisjointPaths, LongestCommonSubsequence, MultipleCopyFileAllocation, MultipleChoiceBranching, RootedTreeArrangement, RuralPostman, or StringToStringCorrection)
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --bound flag docstring still mentions models that no longer take a bound (e.g., LongestCircuit, LongestCommonSubsequence, MultipleCopyFileAllocation). This makes pred create help misleading after the optimization upgrade; please remove those models from this description (and consider deleting the flag entirely if nothing uses it anymore).

Suggested change
/// Bound parameter (lower bound for LongestCircuit; upper or length bound for BoundedComponentSpanningForest, GroupingBySwapping, LengthBoundedDisjointPaths, LongestCommonSubsequence, MultipleCopyFileAllocation, MultipleChoiceBranching, RootedTreeArrangement, RuralPostman, or StringToStringCorrection)
/// Bound parameter (upper or length bound for BoundedComponentSpanningForest, GroupingBySwapping, LengthBoundedDisjointPaths, MultipleChoiceBranching, RootedTreeArrangement, RuralPostman, or StringToStringCorrection)

Copilot uses AI. Check for mistakes.
#[arg(long, allow_hyphen_values = true)]
pub bound: Option<i64>,
/// Upper bound on expected retrieval latency for ExpectedRetrievalCost
Expand All @@ -568,9 +568,6 @@ pub struct CreateArgs {
/// Upper bound on total inter-partition arc cost
#[arg(long)]
pub cost_bound: Option<i32>,
/// Budget on total cost for CapacityAssignment
#[arg(long)]
pub cost_budget: Option<u64>,
/// Budget on total delay penalty for CapacityAssignment
#[arg(long)]
pub delay_budget: Option<u64>,
Expand Down
Loading
Loading