You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add plan for #500: [Model] SequencingToMinimizeMaximumCumulativeCost
* Implement #500: [Model] SequencingToMinimizeMaximumCumulativeCost
* chore: remove plan file after implementation
* fix: dedupe merged model fixtures
* fix: harden sequencing model validation
* fix: update paper Typst to use new example-db format after merge with main
The paper's SequencingToMinimizeMaximumCumulativeCost section used the old
x.samples / x.optimal format. Updated to x.optimal_config / x.optimal_value
to match the current example-db JSON schema.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* revert: remove unrelated SequencingWithinIntervals changes from this PR
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Xiwei Pan <xiwei.pan@connect.hkust-gz.edu.cn>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Given a set $T$ of $n$ tasks, a precedence relation $prec.eq$ on $T$, an integer cost function $c: T -> ZZ$ (negative values represent profits), and a bound $K inZZ$, determine whether there exists a one-machine schedule $sigma: T -> {1, 2, dots, n}$ that respects the precedence constraints and satisfies
3530
+
$sum_(sigma(t') lt.eqsigma(t)) c(t') lt.eq K$
3531
+
for every task $t in T$.
3532
+
][
3533
+
Sequencing to Minimize Maximum Cumulative Cost is the scheduling problem SS7 in Garey & Johnson @garey1979. It is NP-complete by transformation from Register Sufficiency, even when every task cost is in ${-1, 0, 1}$@garey1979. The problem models precedence-constrained task systems with resource consumption and release, where a negative cost corresponds to a profit or resource refund accumulated as the schedule proceeds.
3534
+
3535
+
When the precedence constraints form a series-parallel digraph, #cite(<abdelWahabKameda1978>, form: "prose") gave a polynomial-time algorithm running in $O(n^2)$ time. #cite(<monmaSidney1979>, form: "prose") placed the problem in a broader family of sequencing objectives solvable efficiently on series-parallel precedence structures. The implementation here uses Lehmer-code enumeration of task orders, so the direct exact search induced by the model runs in $O(n!)$ time.
3536
+
3537
+
*Example.* Consider $n = #ntasks$ tasks with costs $(#costs.map(c=>str(c)).join(", "))$, precedence constraints #{precs.map(p=> [$t_#(p.at(0) +1) prec.eq t_#(p.at(1) +1)$]).join(", ")}, and bound $K = #bound$. The sample schedule $(#schedule.map(t=>$t_#(t+1)$).join(", "))$ has cumulative sums $(#prefix-sums.map(v=>str(v)).join(", "))$, so every prefix stays at or below $K = #bound$.
text(7pt, [prefix sums after each scheduled task]),
3568
+
))
3569
+
},
3570
+
caption: [A satisfying schedule for Sequencing to Minimize Maximum Cumulative Cost. Orange boxes add cost, teal boxes release cost, and the displayed prefix sums $(#prefix-sums.map(v=>str(v)).join(", "))$ never exceed $K = #bound$.],
3571
+
) <fig:seq-max-cumulative>
3572
+
]
3573
+
]
3574
+
}
3575
+
3501
3576
#problem-def("DirectedTwoCommodityIntegralFlow")[
3502
3577
Given a directed graph $G = (V, A)$ with arc capacities $c: A -> ZZ^+$, two source-sink pairs $(s_1, t_1)$ and $(s_2, t_2)$, and requirements $R_1, R_2 inZZ^+$, determine whether there exist two integral flow functions $f_1, f_2: A -> ZZ_(>= 0)$ such that (1) $f_1(a) + f_2(a) <= c(a)$ for all $a in A$, (2) flow $f_i$ is conserved at every vertex except $s_1, s_2, t_1, t_2$, and (3) the net flow into $t_i$ under $f_i$ is at least $R_i$ for $i in {1, 2}$.
0 commit comments