@@ -13,7 +13,8 @@ Typical workflow:
1313 pred evaluate problem.json --config 1,0,1,0
1414
1515Piping (use - to read from stdin):
16- pred create MIS --graph 0-1,1-2 | pred solve -
16+ pred create MIS --graph 0-1,1-2 | pred solve - # when an ILP reduction path exists
17+ 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
1718 pred create MIS --graph 0-1,1-2 | pred evaluate - --config 1,0,1
1819 pred create MIS --graph 0-1,1-2 | pred reduce - --to QUBO
1920
@@ -237,6 +238,7 @@ Flags by problem type:
237238 ComparativeContainment --universe, --r-sets, --s-sets [--r-weights] [--s-weights]
238239 X3C (ExactCoverBy3Sets) --universe, --sets (3 elements each)
239240 SetBasis --universe, --sets, --k
241+ MinimumCardinalityKey --num-attributes, --dependencies, --k
240242 BicliqueCover --left, --right, --biedges, --k
241243 BalancedCompleteBipartiteSubgraph --left, --right, --biedges, --k
242244 BiconnectivityAugmentation --graph, --potential-edges, --budget [--num-vertices]
@@ -249,14 +251,15 @@ Flags by problem type:
249251 RuralPostman (RPP) --graph, --edge-weights, --required-edges, --bound
250252 MultipleChoiceBranching --arcs [--weights] --partition --bound [--num-vertices]
251253 SubgraphIsomorphism --graph (host), --pattern (pattern)
252- LCS --strings
254+ LCS --strings, --bound [--alphabet-size]
253255 FAS --arcs [--weights] [--num-vertices]
254256 FVS --arcs [--weights] [--num-vertices]
255257 StrongConnectivityAugmentation --arcs, --candidate-arcs, --bound [--num-vertices]
256258 FlowShopScheduling --task-lengths, --deadline [--num-processors]
257259 StaffScheduling --schedules, --requirements, --num-workers, --k
258260 MinimumTardinessSequencing --n, --deadlines [--precedence-pairs]
259261 SCS --strings, --bound [--alphabet-size]
262+ StringToStringCorrection --source-string, --target-string, --bound [--alphabet-size]
260263 D2CIF --arcs, --capacities, --source-1, --sink-1, --source-2, --sink-2, --requirement-1, --requirement-2
261264 ILP, CircuitSAT (via reduction only)
262265
@@ -275,6 +278,7 @@ Examples:
275278 pred create SAT --num-vars 3 --clauses \" 1,2;-1,3\"
276279 pred create QUBO --matrix \" 1,0.5;0.5,2\"
277280 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
281+ 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
278282 pred create MIS/KingsSubgraph --positions \" 0,0;1,0;1,1;0,1\"
279283 pred create MIS/UnitDiskGraph --positions \" 0,0;1,0;0.5,0.8\" --radius 1.5
280284 pred create MIS --random --num-vertices 10 --edge-prob 0.3
@@ -283,7 +287,8 @@ Examples:
283287 pred create FVS --arcs \" 0>1,1>2,2>0\" --weights 1,1,1
284288 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
285289 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\"
286- pred create SetBasis --universe 4 --sets \" 0,1;1,2;0,2;0,1,2\" --k 3" ) ]
290+ pred create SetBasis --universe 4 --sets \" 0,1;1,2;0,2;0,1,2\" --k 3
291+ pred create MinimumCardinalityKey --num-attributes 6 --dependencies \" 0,1>2;0,2>3;1,3>4;2,4>5\" --k 2" ) ]
287292pub struct CreateArgs {
288293 /// Problem type (e.g., MIS, QUBO, SAT). Omit when using --example.
289294 #[ arg( value_parser = crate :: problem_name:: ProblemNameParser ) ]
@@ -447,13 +452,13 @@ pub struct CreateArgs {
447452 /// Required edge indices for RuralPostman (comma-separated, e.g., "0,2,4")
448453 #[ arg( long) ]
449454 pub required_edges : Option < String > ,
450- /// Upper bound or length bound (for BoundedComponentSpanningForest, LengthBoundedDisjointPaths, MultipleChoiceBranching, OptimalLinearArrangement, RuralPostman, or SCS )
455+ /// Upper bound or length bound (for BoundedComponentSpanningForest, LengthBoundedDisjointPaths, LongestCommonSubsequence, MultipleChoiceBranching, OptimalLinearArrangement, RuralPostman, ShortestCommonSupersequence, or StringToStringCorrection )
451456 #[ arg( long, allow_hyphen_values = true ) ]
452457 pub bound : Option < i64 > ,
453458 /// Pattern graph edge list for SubgraphIsomorphism (e.g., 0-1,1-2,2-0)
454459 #[ arg( long) ]
455460 pub pattern : Option < String > ,
456- /// Input strings for LCS (e.g., "ABAC;BACA") or SCS (e.g., "0,1,2;1,2,0")
461+ /// Input strings for LCS (e.g., "ABAC;BACA" or "0,1,0;1,0,1" ) or SCS (e.g., "0,1,2;1,2,0")
457462 #[ arg( long) ]
458463 pub strings : Option < String > ,
459464 /// Directed arcs for directed graph problems (e.g., 0>1,1>2,2>0)
@@ -468,7 +473,7 @@ pub struct CreateArgs {
468473 /// Candidate weighted arcs for StrongConnectivityAugmentation (e.g., 2>0:1,2>1:3)
469474 #[ arg( long) ]
470475 pub candidate_arcs : Option < String > ,
471- /// Deadlines for MinimumTardinessSequencing (comma-separated, e.g., "5,5,5,3,3")
476+ /// Deadlines for scheduling problems (comma-separated, e.g., "5,5,5,3,3")
472477 #[ arg( long) ]
473478 pub deadlines : Option < String > ,
474479 /// Precedence pairs for MinimumTardinessSequencing (e.g., "0>3,1>3,1>4,2>4")
@@ -492,9 +497,21 @@ pub struct CreateArgs {
492497 /// Number of available workers for StaffScheduling
493498 #[ arg( long) ]
494499 pub num_workers : Option < u64 > ,
495- /// Alphabet size for SCS (optional; inferred from max symbol + 1 if omitted)
500+ /// Alphabet size for LCS, SCS, or StringToStringCorrection (optional; inferred from the input strings if omitted)
496501 #[ arg( long) ]
497502 pub alphabet_size : Option < usize > ,
503+ /// Functional dependencies for MinimumCardinalityKey (semicolon-separated "lhs>rhs" pairs, e.g., "0,1>2;0,2>3")
504+ #[ arg( long) ]
505+ pub dependencies : Option < String > ,
506+ /// Number of attributes for MinimumCardinalityKey
507+ #[ arg( long) ]
508+ pub num_attributes : Option < usize > ,
509+ /// Source string for StringToStringCorrection (comma-separated symbol indices, e.g., "0,1,2,3")
510+ #[ arg( long) ]
511+ pub source_string : Option < String > ,
512+ /// Target string for StringToStringCorrection (comma-separated symbol indices, e.g., "0,1,3,2")
513+ #[ arg( long) ]
514+ pub target_string : Option < String > ,
498515}
499516
500517#[ derive( clap:: Args ) ]
@@ -504,7 +521,8 @@ Examples:
504521 pred solve problem.json --solver brute-force # brute-force (exhaustive search)
505522 pred solve reduced.json # solve a reduction bundle
506523 pred solve reduced.json -o solution.json # save result to file
507- pred create MIS --graph 0-1,1-2 | pred solve - # read from stdin
524+ pred create MIS --graph 0-1,1-2 | pred solve - # read from stdin when an ILP path exists
525+ 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
508526 pred solve problem.json --timeout 10 # abort after 10 seconds
509527
510528Typical workflow:
@@ -518,6 +536,8 @@ Solve via explicit reduction:
518536Input: a problem JSON from `pred create`, or a reduction bundle from `pred reduce`.
519537When given a bundle, the target is solved and the solution is mapped back to the source.
520538The ILP solver auto-reduces non-ILP problems before solving.
539+ Problems without an ILP reduction path, such as `LengthBoundedDisjointPaths` and
540+ `StringToStringCorrection`, currently need `--solver brute-force`.
521541
522542ILP backend (default: HiGHS). To use a different backend:
523543 cargo install problemreductions-cli --features coin-cbc
0 commit comments