Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 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
cd58bdf
fix: address PR #771 review comments
zazabap 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.

16 changes: 8 additions & 8 deletions docs/src/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pred create MIS --graph 0-1,1-2,2-3 --weights 3,1,2,1 -o weighted.json
pred create SteinerTree --graph 0-1,0-3,1-2,1-3,2-3,2-4,3-4 --edge-weights 2,5,2,1,5,6,1 --terminals 0,2,4 -o steiner.json

# Create a Length-Bounded Disjoint Paths instance
pred create LengthBoundedDisjointPaths --graph 0-1,1-6,0-2,2-3,3-6,0-4,4-5,5-6 --source 0 --sink 6 --num-paths-required 2 --bound 3 -o lbdp.json
pred create LengthBoundedDisjointPaths --graph 0-1,1-6,0-2,2-3,3-6,0-4,4-5,5-6 --source 0 --sink 6 --bound 4 -o lbdp.json

# Create a Consecutive Block Minimization instance (alias: CBM)
pred create CBM --matrix '[[true,false,true],[false,true,true]]' --bound 2 -o cbm.json
Expand Down 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,18 +353,18 @@ 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 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 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 --weight-bound 8 -o swcp.json
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
pred create MinimumMultiwayCut --graph 0-1,1-2,2-3,3-0 --terminals 0,2 --edge-weights 3,1,2,4 -o mmc.json
pred create SteinerTree --graph 0-1,0-3,1-2,1-3,2-3,2-4,3-4 --edge-weights 2,5,2,1,5,6,1 --terminals 0,2,4 -o steiner.json
pred create UndirectedTwoCommodityIntegralFlow --graph 0-2,1-2,2-3 --capacities 1,1,2 --source-1 0 --sink-1 3 --source-2 1 --sink-2 3 --requirement-1 1 --requirement-2 1 -o utcif.json
pred create LengthBoundedDisjointPaths --graph 0-1,1-6,0-2,2-3,3-6,0-4,4-5,5-6 --source 0 --sink 6 --num-paths-required 2 --bound 3 -o lbdp.json
pred create LengthBoundedDisjointPaths --graph 0-1,1-6,0-2,2-3,3-6,0-4,4-5,5-6 --source 0 --sink 6 --bound 4 -o lbdp.json
pred create Factoring --target 15 --bits-m 4 --bits-n 4 -o factoring.json
pred create Factoring --target 21 --bits-m 3 --bits-n 3 -o factoring2.json
pred create X3C --universe 9 --sets "0,1,2;0,2,4;3,4,5;3,5,7;6,7,8;1,4,6;2,5,8" -o x3c.json
pred create MinimumCardinalityKey --num-attributes 6 --dependencies "0,1>2;0,2>3;1,3>4;2,4>5" --k 2 -o mck.json
pred create MinimumCardinalityKey --num-attributes 6 --dependencies "0,1>2;0,2>3;1,3>4;2,4>5" -o mck.json
pred create MinimumTardinessSequencing --n 5 --deadlines 5,5,5,3,3 --precedence-pairs "0>3,1>3,1>4,2>4" -o mts.json
pred create SchedulingWithIndividualDeadlines --n 7 --deadlines 2,1,2,2,3,3,2 --num-processors 3 --precedence-pairs "0>3,1>3,1>4,2>4,2>5" -o swid.json
pred solve swid.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 Expand Up @@ -551,7 +551,7 @@ Source evaluation: Max(2)
For example, the canonical Minimum Cardinality Key instance can be created and solved with:

```bash
pred create MinimumCardinalityKey --num-attributes 6 --dependencies "0,1>2;0,2>3;1,3>4;2,4>5" --k 2 -o mck.json
pred create MinimumCardinalityKey --num-attributes 6 --dependencies "0,1>2;0,2>3;1,3>4;2,4>5" -o mck.json
pred solve mck.json --solver brute-force
```

Expand Down
43 changes: 20 additions & 23 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,9 +231,9 @@ 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
LongestCircuit --graph, --edge-weights
BoundedComponentSpanningForest --graph, --weights, --k, --bound
UndirectedFlowLowerBounds --graph, --capacities, --lower-bounds, --source, --sink, --requirement
IntegralFlowBundles --arcs, --bundles, --bundle-capacities, --source, --sink, --requirement [--num-vertices]
Expand All @@ -242,14 +242,14 @@ Flags by problem type:
IntegralFlowHomologousArcs --arcs, --capacities, --source, --sink, --requirement, --homologous-pairs
IsomorphicSpanningTree --graph, --tree
KthBestSpanningTree --graph, --edge-weights, --k, --bound
LengthBoundedDisjointPaths --graph, --source, --sink, --num-paths-required, --bound
LengthBoundedDisjointPaths --graph, --source, --sink, --bound
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 All @@ -258,7 +258,7 @@ Flags by problem type:
ComparativeContainment --universe, --r-sets, --s-sets [--r-weights] [--s-weights]
X3C (ExactCoverBy3Sets) --universe, --sets (3 elements each)
SetBasis --universe, --sets, --k
MinimumCardinalityKey --num-attributes, --dependencies, --k
MinimumCardinalityKey --num-attributes, --dependencies
PrimeAttributeName --universe, --deps, --query
RootedTreeStorageAssignment --universe, --sets, --bound
TwoDimensionalConsecutiveSets --alphabet-size, --sets
Expand All @@ -272,23 +272,23 @@ Flags by problem type:
ConsecutiveOnesSubmatrix --matrix (0/1), --k
SparseMatrixCompression --matrix (0/1), --bound
SteinerTree --graph, --edge-weights, --terminals
MultipleCopyFileAllocation --graph, --usage, --storage, --bound
MultipleCopyFileAllocation --graph, --usage, --storage
AcyclicPartition --arcs [--weights] [--arc-costs] --weight-bound --cost-bound [--num-vertices]
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
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]
MinMaxMulticenter (pCenter) --graph, --weights, --edge-weights, --k
MixedChinesePostman (MCPP) --graph, --arcs, --edge-weights, --arc-costs [--num-vertices]
RuralPostman (RPP) --graph, --edge-weights, --required-edges
StackerCrane --arcs, --graph, --arc-costs, --edge-lengths [--num-vertices]
MultipleChoiceBranching --arcs [--weights] --partition --bound [--num-vertices]
AdditionalKey --num-attributes, --dependencies, --relation-attrs [--known-keys]
ConsistencyOfDatabaseFrequencyTables --num-objects, --attribute-domains, --frequency-tables [--known-values]
SubgraphIsomorphism --graph (host), --pattern (pattern)
GroupingBySwapping --string, --bound [--alphabet-size]
LCS --strings, --bound [--alphabet-size]
LCS --strings [--alphabet-size]
FAS --arcs [--weights] [--num-vertices]
FVS --arcs [--weights] [--num-vertices]
QBF --num-vars, --clauses, --quantifiers
Expand All @@ -304,10 +304,10 @@ Flags by problem type:
MinimumTardinessSequencing --n, --deadlines [--precedence-pairs]
RectilinearPictureCompression --matrix (0/1), --k
SchedulingWithIndividualDeadlines --n, --num-processors/--m, --deadlines [--precedence-pairs]
SequencingToMinimizeMaximumCumulativeCost --costs, --bound [--precedence-pairs]
SequencingToMinimizeMaximumCumulativeCost --costs [--precedence-pairs]
SequencingToMinimizeWeightedCompletionTime --lengths, --weights [--precedence-pairs]
SequencingToMinimizeWeightedTardiness --sizes, --weights, --deadlines, --bound
SCS --strings, --bound [--alphabet-size]
SCS --strings [--alphabet-size]
StringToStringCorrection --source-string, --target-string, --bound [--alphabet-size]
D2CIF --arcs, --capacities, --source-1, --sink-1, --source-2, --sink-2, --requirement-1, --requirement-2
MinimumDummyActivitiesPert --arcs [--num-vertices]
Expand All @@ -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 All @@ -347,7 +347,7 @@ Examples:
pred create IntegralFlowHomologousArcs --arcs \"0>1,0>2,1>3,2>3,1>4,2>4,3>5,4>5\" --capacities 1,1,1,1,1,1,1,1 --source 0 --sink 5 --requirement 2 --homologous-pairs \"2=5;4=3\"
pred create X3C --universe 9 --sets \"0,1,2;0,2,4;3,4,5;3,5,7;6,7,8;1,4,6;2,5,8\"
pred create SetBasis --universe 4 --sets \"0,1;1,2;0,2;0,1,2\" --k 3
pred create MinimumCardinalityKey --num-attributes 6 --dependencies \"0,1>2;0,2>3;1,3>4;2,4>5\" --k 2
pred create MinimumCardinalityKey --num-attributes 6 --dependencies \"0,1>2;0,2>3;1,3>4;2,4>5\"
pred create PrimeAttributeName --universe 6 --deps \"0,1>2,3,4,5;2,3>0,1,4,5\" --query 3
pred create TwoDimensionalConsecutiveSets --alphabet-size 6 --sets \"0,1,2;3,4,5;1,3;2,4;0,5\"")]
pub struct CreateArgs {
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 (upper or length bound for BoundedComponentSpanningForest, GroupingBySwapping, LengthBoundedDisjointPaths, MultipleChoiceBranching, RootedTreeArrangement, or StringToStringCorrection)
#[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