Skip to content

Commit c2450ab

Browse files
committed
2 parents 6701faa + b373477 commit c2450ab

48 files changed

Lines changed: 5943 additions & 316 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/paper/examples/maximumindependentset_to_maximumclique.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"source": {
33
"problem": "MaximumIndependentSet",
44
"variant": {
5-
"graph": "SimpleGraph",
6-
"weight": "i32"
5+
"weight": "i32",
6+
"graph": "SimpleGraph"
77
},
88
"instance": {
99
"edges": [
@@ -31,8 +31,8 @@
3131
"target": {
3232
"problem": "MaximumClique",
3333
"variant": {
34-
"graph": "SimpleGraph",
35-
"weight": "i32"
34+
"weight": "i32",
35+
"graph": "SimpleGraph"
3636
},
3737
"instance": {
3838
"edges": [

docs/paper/reductions.typ

Lines changed: 679 additions & 229 deletions
Large diffs are not rendered by default.

docs/paper/references.bib

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,26 @@ @article{evenItaiShamir1976
137137
doi = {10.1137/0205048}
138138
}
139139

140+
@article{evenTarjan1976,
141+
author = {Shimon Even and Robert Endre Tarjan},
142+
title = {A Combinatorial Problem Which Is Complete in Polynomial Space},
143+
journal = {Journal of the ACM},
144+
volume = {23},
145+
number = {4},
146+
pages = {710--719},
147+
year = {1976}
148+
}
149+
150+
@article{brunoWeinberg1970,
151+
author = {John Bruno and Louis Weinberg},
152+
title = {A Constructive Graph-Theoretic Solution of the Shannon Switching Game},
153+
journal = {IEEE Transactions on Circuit Theory},
154+
volume = {17},
155+
number = {1},
156+
pages = {74--81},
157+
year = {1970}
158+
}
159+
140160
@article{glover2019,
141161
author = {Fred Glover and Gary Kochenberger and Yu Du},
142162
title = {Quantum Bridge Analytics {I}: a tutorial on formulating and using {QUBO} models},
@@ -677,6 +697,28 @@ @article{cygan2014
677697
doi = {10.1137/140990255}
678698
}
679699

700+
@article{johnson1983,
701+
author = {David S. Johnson and Kenneth A. Niemi},
702+
title = {On Knapsacks, Partitions, and a New Dynamic Programming Technique for Trees},
703+
journal = {Mathematics of Operations Research},
704+
volume = {8},
705+
number = {1},
706+
pages = {1--14},
707+
year = {1983},
708+
doi = {10.1287/moor.8.1.1}
709+
}
710+
711+
@article{kolliopoulos2007,
712+
author = {Stavros G. Kolliopoulos and George Steiner},
713+
title = {Partially Ordered Knapsack and Applications to Scheduling},
714+
journal = {Discrete Applied Mathematics},
715+
volume = {155},
716+
number = {8},
717+
pages = {889--897},
718+
year = {2007},
719+
doi = {10.1016/j.dam.2006.09.003}
720+
}
721+
680722
@article{raiha1981,
681723
author = {Kari-Jouko R{\"a}ih{\"a} and Esko Ukkonen},
682724
title = {The Shortest Common Supersequence Problem over Binary Alphabet is {NP}-Complete},
@@ -787,6 +829,35 @@ @article{even1976
787829
doi = {10.1137/0205048}
788830
}
789831

832+
@inproceedings{chandra1977,
833+
author = {Ashok K. Chandra and Philip M. Merlin},
834+
title = {Optimal Implementation of Conjunctive Queries in Relational Data Bases},
835+
booktitle = {Proceedings of the 9th Annual ACM Symposium on Theory of Computing (STOC)},
836+
pages = {77--90},
837+
year = {1977},
838+
doi = {10.1145/800105.803397}
839+
}
840+
841+
@article{gottlob2002,
842+
author = {Georg Gottlob and Nicola Leone and Francesco Scarcello},
843+
title = {Hypertree Decompositions and Tractable Queries},
844+
journal = {Journal of Computer and System Sciences},
845+
volume = {64},
846+
number = {3},
847+
pages = {579--627},
848+
year = {2002},
849+
doi = {10.1006/jcss.2001.1809}
850+
}
851+
852+
@inproceedings{kolaitis1998,
853+
author = {Phokion G. Kolaitis and Moshe Y. Vardi},
854+
title = {Conjunctive-Query Containment and Constraint Satisfaction},
855+
booktitle = {Proceedings of the 17th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS)},
856+
pages = {205--213},
857+
year = {1998},
858+
doi = {10.1145/275487.275511}
859+
}
860+
790861
@article{papadimitriou1982,
791862
author = {Christos H. Papadimitriou and Mihalis Yannakakis},
792863
title = {The Complexity of Restricted Spanning Tree Problems},
@@ -798,6 +869,14 @@ @article{papadimitriou1982
798869
doi = {10.1145/322307.322309}
799870
}
800871

872+
@techreport{Heidari2022,
873+
author = {Heidari, Shahrokh and Dinneen, Michael J. and Delmas, Patrice},
874+
title = {An Equivalent {QUBO} Model to the Minimum Multi-Way Cut Problem},
875+
institution = {Centre for Discrete Mathematics and Theoretical Computer Science, University of Auckland},
876+
year = {2022},
877+
number = {CDMTCS-565}
878+
}
879+
801880
@phdthesis{booth1975,
802881
author = {Booth, Kellogg S.},
803882
title = {{PQ}-Tree Algorithms},

docs/src/cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ pred create KColoring --k 3 --graph 0-1,1-2,2-0 -o kcol.json
346346
pred create KthBestSpanningTree --graph 0-1,0-2,1-2 --edge-weights 2,3,1 --k 1 --bound 3 -o kth.json
347347
pred create SpinGlass --graph 0-1,1-2 -o sg.json
348348
pred create MaxCut --graph 0-1,1-2,2-0 -o maxcut.json
349+
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
350+
pred solve rpc.json --solver brute-force
349351
pred create MinimumMultiwayCut --graph 0-1,1-2,2-3,3-0 --terminals 0,2 --edge-weights 3,1,2,4 -o mmc.json
350352
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
351353
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

problemreductions-cli/src/cli.rs

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ Flags by problem type:
225225
MinimumMultiwayCut --graph, --terminals, --edge-weights
226226
PartitionIntoTriangles --graph
227227
GraphPartitioning --graph
228+
GeneralizedHex --graph, --source, --sink
229+
MinimumCutIntoBoundedSets --graph, --edge-weights, --source, --sink, --size-bound, --cut-bound
228230
HamiltonianCircuit, HC --graph
229231
BoundedComponentSpanningForest --graph, --weights, --k, --bound
230232
UndirectedTwoCommodityIntegralFlow --graph, --capacities, --source-1, --sink-1, --source-2, --sink-2, --requirement-1, --requirement-2
@@ -259,14 +261,19 @@ Flags by problem type:
259261
LCS --strings, --bound [--alphabet-size]
260262
FAS --arcs [--weights] [--num-vertices]
261263
FVS --arcs [--weights] [--num-vertices]
264+
PartitionIntoPathsOfLength2 --graph
265+
ResourceConstrainedScheduling --num-processors, --resource-bounds, --resource-requirements, --deadline
266+
PartiallyOrderedKnapsack --sizes, --values, --capacity, --precedences
262267
QAP --matrix (cost), --distance-matrix
263268
StrongConnectivityAugmentation --arcs, --candidate-arcs, --bound [--num-vertices]
264269
FlowShopScheduling --task-lengths, --deadline [--num-processors]
265270
StaffScheduling --schedules, --requirements, --num-workers, --k
266271
MinimumTardinessSequencing --n, --deadlines [--precedence-pairs]
272+
RectilinearPictureCompression --matrix (0/1), --k
267273
SCS --strings, --bound [--alphabet-size]
268274
StringToStringCorrection --source-string, --target-string, --bound [--alphabet-size]
269275
D2CIF --arcs, --capacities, --source-1, --sink-1, --source-2, --sink-2, --requirement-1, --requirement-2
276+
CBQ --domain-size, --relations, --conjuncts-spec
270277
ILP, CircuitSAT (via reduction only)
271278
272279
Geometry graph variants (use slash notation, e.g., MIS/KingsSubgraph):
@@ -283,6 +290,7 @@ Examples:
283290
pred create MIS --graph 0-1,1-2,2-3 --weights 1,1,1
284291
pred create SAT --num-vars 3 --clauses \"1,2;-1,3\"
285292
pred create QUBO --matrix \"1,0.5;0.5,2\"
293+
pred create GeneralizedHex --graph 0-1,0-2,0-3,1-4,2-4,3-4,4-5 --source 0 --sink 5
286294
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
287295
pred create StringToStringCorrection --source-string \"0,1,2,3,1,0\" --target-string \"0,1,3,2,1\" --bound 2 | pred solve - --solver brute-force
288296
pred create MIS/KingsSubgraph --positions \"0,0;1,0;1,1;0,1\"
@@ -321,10 +329,10 @@ pub struct CreateArgs {
321329
/// Edge capacities for multicommodity flow problems (e.g., 1,1,2)
322330
#[arg(long)]
323331
pub capacities: Option<String>,
324-
/// Source vertex for path-based graph problems
332+
/// Source vertex for path-based graph problems and MinimumCutIntoBoundedSets
325333
#[arg(long)]
326334
pub source: Option<usize>,
327-
/// Sink vertex for path-based graph problems
335+
/// Sink vertex for path-based graph problems and MinimumCutIntoBoundedSets
328336
#[arg(long)]
329337
pub sink: Option<usize>,
330338
/// Required number of paths for LengthBoundedDisjointPaths
@@ -342,10 +350,10 @@ pub struct CreateArgs {
342350
/// Number of variables (for SAT/KSAT)
343351
#[arg(long)]
344352
pub num_vars: Option<usize>,
345-
/// Matrix for QUBO (semicolon-separated rows, e.g., "1,0.5;0.5,2")
353+
/// Matrix input (semicolon-separated rows; use `pred create <PROBLEM>` for problem-specific formats)
346354
#[arg(long)]
347355
pub matrix: Option<String>,
348-
/// Number of colors for KColoring
356+
/// Shared integer parameter (use `pred create <PROBLEM>` for the problem-specific meaning)
349357
#[arg(long)]
350358
pub k: Option<usize>,
351359
/// Generate a random instance (graph-based problems only)
@@ -471,6 +479,18 @@ pub struct CreateArgs {
471479
/// Directed arcs for directed graph problems (e.g., 0>1,1>2,2>0)
472480
#[arg(long)]
473481
pub arcs: Option<String>,
482+
/// Size bound for partition sets (for MinimumCutIntoBoundedSets)
483+
#[arg(long)]
484+
pub size_bound: Option<usize>,
485+
/// Cut weight bound (for MinimumCutIntoBoundedSets)
486+
#[arg(long)]
487+
pub cut_bound: Option<i32>,
488+
/// Item values (e.g., 3,4,5,7) for PartiallyOrderedKnapsack
489+
#[arg(long)]
490+
pub values: Option<String>,
491+
/// Precedence pairs (e.g., "0>2,0>3,1>4") for PartiallyOrderedKnapsack
492+
#[arg(long, alias = "item-precedences")]
493+
pub precedences: Option<String>,
474494
/// Distance matrix for QuadraticAssignment (semicolon-separated rows, e.g., "0,1,2;1,0,1;2,1,0")
475495
#[arg(long)]
476496
pub distance_matrix: Option<String>,
@@ -489,13 +509,19 @@ pub struct CreateArgs {
489509
/// Precedence pairs for MinimumTardinessSequencing (e.g., "0>3,1>3,1>4,2>4")
490510
#[arg(long)]
491511
pub precedence_pairs: Option<String>,
512+
/// Resource bounds for ResourceConstrainedScheduling (comma-separated, e.g., "20,15")
513+
#[arg(long)]
514+
pub resource_bounds: Option<String>,
515+
/// Resource requirements for ResourceConstrainedScheduling (semicolon-separated rows, each row comma-separated, e.g., "6,3;7,4;5,2")
516+
#[arg(long)]
517+
pub resource_requirements: Option<String>,
492518
/// Task lengths for FlowShopScheduling (semicolon-separated rows: "3,4,2;2,3,5;4,1,3")
493519
#[arg(long)]
494520
pub task_lengths: Option<String>,
495-
/// Deadline for FlowShopScheduling or MultiprocessorScheduling
521+
/// Deadline for FlowShopScheduling, MultiprocessorScheduling, or ResourceConstrainedScheduling
496522
#[arg(long)]
497523
pub deadline: Option<u64>,
498-
/// Number of processors/machines for FlowShopScheduling or MultiprocessorScheduling
524+
/// Number of processors/machines for FlowShopScheduling, MultiprocessorScheduling, or ResourceConstrainedScheduling
499525
#[arg(long)]
500526
pub num_processors: Option<usize>,
501527
/// Binary schedule patterns for StaffScheduling (semicolon-separated rows, e.g., "1,1,0;0,1,1")
@@ -510,6 +536,15 @@ pub struct CreateArgs {
510536
/// Alphabet size for LCS, SCS, or StringToStringCorrection (optional; inferred from the input strings if omitted)
511537
#[arg(long)]
512538
pub alphabet_size: Option<usize>,
539+
/// Domain size for ConjunctiveBooleanQuery
540+
#[arg(long)]
541+
pub domain_size: Option<usize>,
542+
/// Relations for ConjunctiveBooleanQuery (format: "arity:tuple1|tuple2;arity:tuple1|tuple2")
543+
#[arg(long)]
544+
pub relations: Option<String>,
545+
/// Conjuncts for ConjunctiveBooleanQuery (format: "rel:args;rel:args" where args use v0,v1 for variables, c0,c1 for constants)
546+
#[arg(long)]
547+
pub conjuncts_spec: Option<String>,
513548
/// Functional dependencies (semicolon-separated, each dep is lhs>rhs with comma-separated indices, e.g., "0,1>2,3;2,3>0,1")
514549
#[arg(long)]
515550
pub deps: Option<String>,

0 commit comments

Comments
 (0)