Abstract 1 Introduction 2 Related work 3 Proof of Theorem 1 4 Application for flow-time scheduling 5 Lower bounds 6 Open problems References Appendix A Computer program

Weighted Chairman Assignment and Flow-Time Scheduling

Siyue Liu ORCID Tepper School of Business, Carnegie Mellon University, Pittsburgh, PA, USA Victor Reis ORCID Microsoft Research, Redmond, WA, USA
Abstract

Given positive integers m,n, a fractional assignment x∈[0,1]m×n and weights d∈ℝ>0n, we show that there exists an assignment y∈{0,1}m×n so that for every i∈[m] and t∈[n],

|∑j∈[t]dj⁢(xi⁢j−yi⁢j)|<maxj∈[n]⁡dj.

This generalizes a result of Tijdeman (1973) on the unweighted version, known as the chairman assignment problem. This also confirms a special case of the single-source unsplittable flow conjecture with arc-wise lower and upper bounds due to Morell and Skutella (IPCO 2020). As an application, we consider a scheduling problem where jobs have release times and machines have closing times, and a job can only be scheduled on a machine if it is released before the machine closes. We give a 3-approximation algorithm for maximum flow-time minimization.

Keywords and phrases:
prefix discrepancy, flow-time scheduling, unsplittable flow
Copyright and License:
[Uncaptioned image] © Siyue Liu and Victor Reis; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → Randomness, geometry and discrete structures
Acknowledgements:
We would like to thank R. Ravi for numerous discussions. The work was done during an internship of the first author at Microsoft Research.
Editor:
Shubhangi Saraf

1 Introduction

Let m,n be positive integers. We say that a matrix x∈[0,1]m×n is a fractional assignment if ∑i∈[m]xi⁢j=1 for every column j∈[n], and that y∈{0,1}m×n is an (integral) assignment if ∑i∈[m]yi⁢j=1 for every j∈[n]. Consider the following problem introduced by Niederreiter in 1972 [24, 25]: find the minimum value of Δ⁢(m) such that for every positive integer n and fractional assignment x∈[0,1]m×n, there is an assignment y∈{0,1}m×n so that for every row i∈[m] and column t∈[n],

|∑j∈[t](xi⁢j−yi⁢j)|≤Δ⁢(m).

This is known as the chairman assignment problem due to Tijdeman [27]: suppose m states form a union and each state i receives a value xi⁢j from being a member at year j so that ∑i∈[m]xi⁢j=1. Every year a union chairman has to be selected in such a way that at any year t the accumulated number of chairmen ∑j∈[t]yi⁢j from each state i is proportional to its accumulated value ∑j∈[t]xi⁢j. Niederreiter showed a bound of Δ⁢(m)≤m−1 [24] which was subsequently improved by Meijer and Niederreiter to Δ⁢(m)≤O⁢(log⁡m) [22] and by Tijdeman to Δ⁢(m)≤1 [26], who also showed that, for m>1 and any δ>0, Δ⁢(m)≥1−12⁢m−2−δ via a family of examples with n=Ω⁢(1/δ). The approaches of [22] and [26] are both based on an application of Hall’s theorem to a carefully constructed bipartite graph. Finally, Meijer matched this lower bound by showing Δ⁢(m)≤1−12⁢m−2 [21]. Since then, there have been other proofs of this result through different approaches [27, 3, 16, 8]; see also the survey of Tijdeman [28].

We study the weighted chairman assignment problem where each j∈[n] has an associated weight dj>0 and we want to bound |∑j∈[t]dj⁢(xi⁢j−yi⁢j)| for every i∈[m] and t∈[n]. All of the previous approaches in the unweighted setting rely on the fact that the increments to the integral assignment are integers and do not directly generalize to the weighted setting. Our main theorem generalizes an algorithm of Tijdeman [27] (see also Angel, Holroyd, Martin and Propp [3]) with a new analysis to show the following:

Theorem 1.

Given positive integers m,n with m>1, a fractional assignment x∈[0,1]m×n and weights d∈ℝ>0n, there is a linear-time algorithm that computes an assignment y∈{0,1}m×n so that for every i∈[m] and t∈[n],

|∑j∈[t]dj⁢(xi⁢j−yi⁢j)|≤(1−12⁢m−2)⋅maxj∈[n]⁡dj.

The weighted chairman assignment problem gains renewed interest due to a conjecture by Morell and Skutella [23]: given a flow x from a single source to multiple sinks with varying demands, there is an unsplittable flow y where each sink should be served by a single path, such that the discrepancy between the two flows on each arc is at most the maximum demand. The weighted chairman assignment problem with weights d1,…,dn can be modeled as a single-source unsplittable flow instance with demands d1,…,dn (see Section 2), and therefore Theorem 1 with discrepancy bound maxj∈[n]⁡dj would follow if the conjecture were true. When the demands are uniform, i.e., d1=…=dn=1, the conjecture is true because by adding capacity constraints ⌊x⌋≤y≤⌈x⌉ to the flow polytope we can find an integral flow y which is automatically unsplittable and satisfies |x−y|1≤1. Therefore, the discrepancy bound 1 for the (unweighted) chairman assignment follows as a consequence. The weighted setting corresponds to nonuniform demands, where so far all linear programming techniques fall apart.

As an application, we consider the following scheduling problem. Suppose there are m machines M and n jobs J. Each machine i∈M has a closing time bi≥0. Each job j∈J has a release time rj≥0 and a processing time dj≥0. Job j can be scheduled on machine i if and only if rj≤bi. The flow-time of a job j is defined as the time elapsed from its release to completion. The goal is to schedule jobs to machines to minimize the maximum flow-time of any job. This is a special case of the restricted assignment variant of maximum flow-time minimization, where each job j has a subset of machines Mj⊆M that it can be scheduled on. In the most general form of the problem, each job j has a potentially different processing time di⁢j on machines i∈[m]. Bansal, Rohwedder and Svensson [6] proved that a natural linear programming relaxation has integrality gap O⁢(log⁡n), and conjectured that an O⁢(1)-approximation should be possible. We confirm this conjecture for the setting of machine closing times:

Theorem 2.

There is a (3−1m−1)-approximation algorithm for the maximum flow-time minimization problem in the setting of machine closing times.

Previously, a (3−2m)-approximation was known via a greedy algorithm (first-in-first-out, or FIFO) for the setting of identical machines where bi=∞ for all i∈M [7, 20], and this bound is known to be tight for FIFO [19]. We also show that FIFO has approximation ratio at least Ω⁢(log⁡m) for the setting of closing times.

Furthermore, we give several lower bound constructions. We provide a construction simpler than Tijdeman’s [26] to establish a matching lower bound for the chairman assignment problem:

Proposition 3.

For any positive integer m>1 there exists a fractional assignment x∈[0,1]m×(m−1) so that for any assignment y∈{0,1}m×(m−1), there exists some i∈[m] and t∈[m−1] for which

|∑j∈[t](xi⁢j−yi⁢j)|≥1−12⁢m−2.

The assignment given in [26] that achieves Δ⁢(m)≤1 yields a strict inequality and has the property that yi⁢j=0 whenever xi⁢j=0. We give a construction showing that Tijdeman’s bound is tight under this additional constraint:

Proposition 4.

For any δ>0 there exists a positive integer n and a fractional assignment x∈[0,1]3×n so that for any assignment y∈{0,1}3×n satisfying yi⁢j=0 whenever xi⁢j=0, there exists some i∈[3] and t∈[n] for which

|∑j∈[t](xi⁢j−yi⁢j)|≥1−δ.

Finally, we disprove a conjecture in [3] that one may obtain a bound of 1 for all intervals, not just prefixes:

Proposition 5.

There exist positive integers m,n and a fractional assignment x∈[0,1]m×n, so that for any assignment y∈{0,1}m×n, there exist some i∈[m] and 1≤s≤t≤n for which

|∑j∈[s,t](xi⁢j−yi⁢j)|>1.

In particular, this implies that we cannot hope to directly apply our rounding approach to obtain a 2-approximation for maximum flow-time minimization.

Organization

In Section 2, we discuss related work. In Section 3, we prove our main Theorem 1. In Section 4, we discuss connections to maximum flow-time scheduling and prove Theorem 2. In Section 5, we give lower bound constructions to prove Propositions 3, 4 and 5. In Section 6, we formulate some open questions.

2 Related work

Theorem 1 resolves a special case of a conjecture of Morell and Skutella [23] which can be formally stated as follows. Let D=(V,A) be a directed acyclic graph with source s∈V, sink terminals t1,…,tn∈V and associated demands d∈ℝ>0n. We say a flow x∈ℝ≥0A satisfies the demands if x⁢(δ−⁢(tj))=dj for every j∈[n], and x⁢(δ−⁢(v))=x⁢(δ+⁢(v)) for every v∈V∖{s,t1,…,tn}. We say a flow y∈ℝ≥0A is unsplittable if for each j∈[n] there is a single path Pj from s to tj that carries dj units of flow, so that ya=∑j:a∈Pjdj for every a∈A. Morell and Skutella conjectured the following:

Conjecture 6 ([23]).

For every flow x∈ℝ≥0A satisfying the demands, there is an unsplittable flow y∈ℝ≥0A such that |xa−ya|≤maxj∈[n]⁡dj for all a∈A.

They also showed the one-sided bound xa−ya≤maxj∈[n]⁡dj for all a∈A may be satisfied, thereby complementing the previously known one-sided bound ya−xa≤maxj∈[n]⁡dj for all a∈A of Dinitz, Garg and Goemans [12]. So far, Conjecture 6 has been established when the demands have the property that one divides another, i.e., d1⁢∣d2∣⁢…∣dn [23] and for special digraphs such as acyclic planar digraphs [29]; see also [2] for stronger guarantees for series-parallel digraphs.

Figure 1: Reduction for m=4, n=3. We create n copies i1,…,in of each i∈[m] to capture all prefixes. Terminal tj has demand ∑i∈[m]xi⁢j⁢dj=dj, and is connected to ij for each i∈[m]. The flow value on arc (it+1,it) is ∑j∈[t]xi⁢j⁢dj.

To see the connection with Theorem 1, note that given positive integers m,n we may construct a directed acyclic graph consisting of m paths of length n starting from s, with edges pointing at n terminals along the way. Then any fractional assignment x∈[0,1]m×n and weights d∈ℝ>0n induce a flow so that each terminal tj has demand dj and each prefix is captured by one of the arcs in a path, as illustrated in Figure 1. An unsplittable flow routes each demand dj to tj through a path i∈[m], which corresponds to assigning j to i. Assuming Conjecture 6, such an assignment y satisfies |∑j∈[t]dj⁢(xi⁢j−yi⁢j)|≤maxj∈[n]⁡dj for all i∈[m],t∈[n].

A variant of the chairman assignment problem is the carpooling problem [14, 1], where j∈[n] can be assigned to i∈[m] if and only if xi⁢j≠0. The weighted carpooling problem, which remains open, can also be viewed as a special case of Conjecture 6 using a similar construction that connects terminal tj to paths i for which xi⁢j≠0:

Conjecture 7.

Let m,n be positive integers and d∈ℝ>0n. For every fractional assignment x∈[0,1]m×n, there is an assignment y∈{0,1}m×n so that yi⁢j=0 whenever xi⁢j=0, and for every i∈[m] and t∈[n],

|∑j∈[t]dj⁢(xi⁢j−yi⁢j)|≤maxj∈[n]⁡dj.

Morell and Skutella [23] outlined the connection to maximum flow-time minimization and noted that Conjecture 7 would imply a 3-approximation for the restricted assignment setting. The best known approximation in polynomial time is O⁢(log⁡n) due to Bansal and Kulkarni via iterated rounding [5]. Bansal, Rohwedder and Svensson [6] prove a bound of O⁢(log⁡n)⋅maxj∈[n]⁡dj for Conjecture 7, leveraging a non-constructive argument from convex geometry by Banaszczyk [4], thereby showing that the natural linear programming relaxation for maximum flow-time minimization has integrality gap O⁢(log⁡n). For identical machines, a simple 3-approximation is known [7, 20]: sort the jobs by release times and assign them one by one to the machine with the least remaining processing time of jobs that have been assigned to it. The special case where release times are all zero corresponds to makespan minimization; the work of Lenstra, Shmoys and Tardos gives a 2-approximation algorithm via rounding [18]. Their approach also solves the Morell-Skutella conjecture for digraphs of diameter 2.

To the best of our knowledge, the weighted chairman assignment problem has not been studied before. The more general weighted carpooling problem fits within the broader framework of prefix discrepancy [6], and it is possible to derive a bound of 2⁢m⋅maxj∈[n]⁡dj for Conjecture 7 via a linear algebraic argument [10, 9]. Together with Banaszczyk’s result [4], the current best bound for Conjecture 7 is min⁡{2⁢m,O⁢(log⁡n)}⋅maxj∈[n]⁡dj. The special case of Conjecture 7 where each column {xi⁢j}i∈[m] has at most two nonzero entries is known as the 2-sparse prefix Beck-Fiala problem and is equivalent to the general case up to a constant [6]. Proposition 4 shows that unlike Theorem 1, we cannot hope for a (1−δ)⋅maxj∈[n]⁡dj bound for Conjecture 7 for any δ>0 even for m=3.

For the online version of the chairman assignment problem, where columns of x arrive one at a time and the assignment must be decided irrevocably, it is known that the best possible bound is ∑j=2m1j=Θ⁢(log⁡m) for adaptive adversaries, attainable with a simple greedy algorithm [11], and the analysis readily generalizes for the weighted setting. On the other hand, the best possible bound independent of n for the online version of the carpooling problem is m−12 [11]. For the online 2-sparse prefix Beck-Fiala problem, there is also an O⁢(log⁡n) bound [17] and a Ω⁢(log⁡n3) lower bound [1] for oblivious adversaries. A recent line of work studies the online carpooling problem with recourse [15, 13], and it remains open to obtain a constant bound for the online chairman assignment problem with polylogarithmic recourse.

3 Proof of Theorem 1

Given m,n∈ℕ with m>1, denote ε:=12⁢m−2. Let x∈[0,1]m×n be a fractional assignment. We normalize d∈ℝ>0n so that maxj∈[n]⁡dj=1, thereby assuming d∈(0,1]n. For j∈[n], denote by sj∈[m] the element to which j will be assigned, so that yi⁢j=1 if sj=i and 0 otherwise. For each i∈[m] and t∈[n], denote

Pt⁢(i):=∑j=1tdj⁢xi⁢j,Nt⁢(i):=∑j=1tdj⁢yi⁢j,Δt⁢(i):=Pt⁢(i)−Nt⁢(i).

At time t, the deadline of i is defined as

Dt⁢(i):=min⁡{T≥t:PT⁢(i)≥Nt−1⁢(i)+1−ε}, (1)

which is set to ∞ (or n+1) if such T does not exist.

The set of candidates at time t is defined as

C⁢(t):={i∈[m]:Pt⁢(i)≥Nt−1⁢(i)+min⁡{dt/m,ε}}. (2)

At time t, the algorithm chooses a candidate with the earliest deadline. The detailed description is in Algorithm 1. We remark that if we only wanted a bound of maxj∈[n]⁡dj in Theorem 1, simpler definitions of deadline and candidates where setting ε=0 in both definitions would have been sufficient.

Algorithm 1 Earliest Deadline Algorithm.

The feasibility of the algorithm follows from the lemma below.

Lemma 8.

For any t∈[n], there always exists a candidate, i.e., C⁢(t)≠∅.

Proof.

Since

∑i=1m(Pt⁢(i)−Nt−1⁢(i))= ∑i=1m(∑j=1tdj⁢xi⁢j−∑j=1t−1dj⁢yi⁢j)
= ∑j=1t−1dj⁢(∑i=1mxi⁢j−∑i=1myi⁢j)+dt⁢∑i=1mxi⁢j
= dt,

it follows that a candidate always exists as

maxi∈[m]⁡{Pt⁢(i)−Nt−1⁢(i)}≥dt/m≥min⁡{dt/m,ε}.

◀

The following lemma justifies the definition of candidates:

Lemma 9.

For any i∈[m] and t∈[n], Δt⁢(i)≥−1+ε.

Proof.

If i has not been selected at any time up to t, then Nt⁢(i)=0 and

Δt⁢(i)=Pt⁢(i)≥0>−1+ε.

Otherwise, let j∈[t] be the latest time such that sj=i. Then

Δt⁢(i) =Pt⁢(i)−Nt⁢(i)
=Pt⁢(i)−Nj−1⁢(i)−dj
≥Pj⁢(i)−Nj−1⁢(i)−dj
≥min⁡{dj/m,ε}−dj
≥min⁡{1/m,ε}−1
=−1+ε,

where the second inequality follows from the fact that i is a candidate at time j. ◀

Picking a candidate with the earliest deadline also ensures the upper bound:

Lemma 10.

For any i∈[m] and t∈[n], Δt⁢(i)≤1−ε.

Proof.

Define I+:={i∈[m]:Δt⁢(i)>1−ε} and assume towards contradiction that I+≠∅. We will need to study a carefully chosen time interval (t′,t] and the set of rows with deadline at most t at time t′ to derive a contradiction. Define

t′:=max⁡{j∈[t]:Pt⁢(sj)<Nj−1⁢(sj)+1−ε},

which by (1) is the first time that we pick some row with deadline later than t.

⊳ Claim 11.

The time t′ is well-defined.

Proof.

Let i0∈arg⁡mini∈[m]⁡Δt⁢(i). Then, since ∑i∈[m]Δt⁢(i)=0 and I+≠∅,

Δt⁢(i0)<−1−ε|[m]∖I+|≤−1−εm−1≤−ε,

where the last inequality holds for m≥2. Obviously i0 has been selected by time t, since otherwise Δt⁢(i0)=Pt⁢(i0)≥0. As such let t0∈[t] be the latest time with st0=i0, and thus

Pt⁢(i0)<Nt⁢(i0)−ε=Nt0⁢(i0)−ε=Nt0−1⁢(i0)+dt0−ε≤Nt0−1⁢(i0)+1−ε.

In particular, t′≥t0 is well-defined. ⊲

Define

I:={i∈[m]:Pt⁢(i)≥Nt′−1⁢(i)+1−ε},

which by (1) are precisely the rows with deadlines at most t at time t′.

⊳ Claim 12.

st′∉I and sj∈I for every j∈(t′,t].

Proof.

It follows from definitions of t′ and I that st′∉I. For an arbitrary j∈(t′,t], it follows from the maximality of t′ that

Pt⁢(sj)≥Nj−1⁢(sj)+1−ε≥Nt′−1⁢(sj)+1−ε.

Therefore, sj∈I. ⊲

⊳ Claim 13.

I+⊆I; in particular I≠∅.

Proof.

For every i∈I+,

Pt⁢(i)>Nt⁢(i)+1−ε≥Nt′−1⁢(i)+1−ε,

which implies i∈I. Thus, I+⊆I. ⊲

⊳ Claim 14.

Pt′⁢(i)<Nt′−1⁢(i)+ε for every i∈I.

Proof.

By the definition of t′ and deadline, Dt′⁢(st′)>t, which means st′∉I. By the choice of st′ in the algorithm, all candidates i∈C⁢(t′) satisfy Dt′⁢(i)>t. In other words, I∩C⁢(t′)=∅. It follows from (2) that for every i∈I,

Pt′⁢(i)<Nt′−1⁢(i)+min⁡{dt′/m,ε}≤Nt′−1⁢(i)+ε.

⊲

⊳ Claim 15.

Pt⁢(i)≥Nt⁢(i)−ε for every i∈I.

Proof.

For an arbitrary i∈I, if there does not exist j∈(t′,t] with sj=i, then

Pt⁢(i)≥Nt′−1⁢(i)+1−ε=Nt⁢(i)+1−ε>Nt⁢(i)−ε,

where we used the fact that st′≠i as st′∉I. Otherwise, let j∈(t′,t] be the latest time with sj=i. Then by the maximality of t′, we have

Pt⁢(i)≥Nj−1⁢(i)+1−ε≥Nj−1⁢(i)+dj−ε=Nj⁢(i)−ε=Nt⁢(i)−ε.

⊲

Finally, |I|≤m−1 since by Claim 13, I⊆[m]∖{st′}. In other words, 0≤1−2⁢ε⁢|I|. Putting everything together,

∑j∈(t′,t]dj ≤1−2⁢ε⁢|I|+∑j∈(t′,t]dj
=1−2⁢ε⁢|I|+∑i∈I(Nt⁢(i)−Nt′−1⁢(i)) (Claim 12)
=1+∑i∈I(Nt⁢(i)−ε−Nt′−1⁢(i)−ε)
<∑i∈I(Pt⁢(i)−Nt′−1⁢(i)−ε) (Claim 15+Claim 13)
<∑i∈I(Pt⁢(i)−Pt′⁢(i)) (Claim 14+Claim 13)
≤∑i∈[m](Pt⁢(i)−Pt′⁢(i))
=∑j∈(t′,t]dj,

This is a contradiction, from which we conclude I+=∅. ◀

Proof of Theorem 1.

The bounds follow from Lemmas 9 and 10. It remains to show that the algorithm can be implemented in linear time. We may precompute Pt⁢(i) for all t∈[n],i∈[m] via prefix sum, and we may update Nt⁢(i) for all i∈[m] after the t-th iteration. The deadlines Dt⁢(i) may also be computed in linear amortized time by incrementing them each iteration until PT⁢(i)≥Nt−1⁢(i)+1−ε as T≤n. ◀

4 Application for flow-time scheduling

Let M=[m] be a set of machines, and J=[n] be a set of jobs. Each job j∈J can be scheduled on a subset of machines Mj⊆M. Each job j∈[n] has a processing time dj and release time rj. Let Cj be the completion time of j. Order the jobs by their release times r1≤r2≤⋯≤rn. We want to schedule each job to a machine such that the maximum flow-time maxj∈[n]⁡(Cj−rj) is minimized. Consider the following linear programming relaxation for this problem:

min T (3)
s.t. ∑i=1mxi⁢j=1⁢∀j∈[n]
∑j=stxi⁢j⁢dj≤(rt−rs)+T,∀i∈[m], 1≤s≤t≤n
x≥0
xi⁢j=0,∀i,j:i∉Mj.

Morell and Skutella [23] show that Conjecture 7 would imply the integrality gap of (3) is at most 3. Efficiently computing such an assignment y would lead to a 3-approximation algorithm for maximum flow-time scheduling. It follows readily from their proof that upper-bounding ∑j=stdj⁢(yi⁢j−xi⁢j) for every machine i and interval of jobs defined by 1≤s≤t≤n suffices to prove the desired approximation ratio. We summarize this in the following lemma and give its proof for completeness.

Lemma 16 ([23]).

Let m,n be positive integers and d∈ℝ>0n. If for every fractional assignment x∈[0,1]m×n, there is an assignment y∈{0,1}m×n so that yi⁢j=0 whenever xi⁢j=0 and

∑j=stdj⁢(yi⁢j−xi⁢j)≤α⋅maxj∈[n]⁡dj∀i∈[m],1≤s≤t≤n, (4)

then the integrality gap of the linear programming relaxation (3) is at most (α+1). A polynomial time algorithm to compute such an assignment y would lead to an (α+1)-approximation algorithm for maximum flow-time scheduling.

Proof.

Denote dmax:=maxj∈[n]⁡dj. Let (x,T) be the optimal solution to the linear program (3). Let OPT be the minimum maximum flow-time. Suppose y is the assignment satisfying (4). Let i∈[m] and 1≤s≤t≤n. The total processing time of jobs assigned to machine i and released between rs and rt is

∑j=styi⁢j⁢dj≤ ∑j=stxi⁢j⁢dj+α⋅dmax
≤ (rt−rs)+T+α⋅OPT
≤ (rt−rs)+(1+α)⁢OPT,

where the first inequality follows from (4). The second inequality follows from the fact that the job of size dmax has flow-time at least dmax. The last inequality follows from the fact that T≤OPT. Suppose job t is scheduled on i. Let rs be the latest time before t such that i is idle when some job s scheduled to i is released (which exists because i is idle when the first job scheduled to i is released). Then, the completion time of t is Ct=rs+∑j=styi⁢j⁢dj. The flow-time of t is Ct−rt=rs+∑j=styi⁢j⁢dj−rt≤(1+α)⁢OPT. Therefore, the maximum flow-time is at most (1+α)⁢OPT. ◀

Previously, a (3−2m)-approximation algorithm was known for identical machines [7, 20]. Combining Theorem 1 and Lemma 16, we get a (3−1m−1)-approximation algorithm for this setting, matching the current best approximation ratio asymptotically. Yet, their algorithm (FIFO) follows a much simpler greedy approach, which orders jobs by their release times and assigns them online to the machine with the least remaining processing time of jobs that have been assigned to it.

Figure 2: There are m machines M=[m] with closing times bi=i⋅δ for some δ≪1m. There are m batches of jobs, released at times δ,2⁢δ,…,m⁢δ. The j-th batch has (m−j+1) jobs, each with processing time 1m−j+1. Left: FIFO schedules the j-th batch to machines j,j+1,…,m, one for each, because those are the machines that are not closed yet. The maximum flow-time is (∑j∈[m]1j)−m⁢δ=Ω⁢(log⁡m). Right: OPT schedules the j-th batch to machine j, which is feasible because the j-th batch is released no later than machine j is closed. The maximum flow-time is 1−m⁢δ≤1.

We study a variation where each machine i has a closing time bi, and a job can be scheduled on machine i only if rj≤bi. We begin by observing that FIFO has a lower bound Ω⁢(log⁡m) for the setting of closing times (see Figure 2). We give a (3−1m−1)-approximation algorithm for the setting of closing times. We start by observing that Algorithm 1 has the following property.

Proposition 17.

Given d∈ℝ>0n, a∈[n]m and a fractional assignment x∈[0,1]m×n so that xi⁢j=0⁢∀i,j:j<ai, there is a linear-time algorithm that computes an assignment y∈{0,1}m×n so that yi⁢j=0⁢∀i,j:j<ai and

|∑j=1tdj⁢(xi⁢j−yi⁢j)|≤(1−12⁢m−2)⋅maxj∈[n]⁡dj∀i∈[m],t∈[n].

Proof.

Note that for every t<ai, Pt⁢(i)=∑j=1tdj⁢xi⁢j=0, since xi⁢j=0⁢∀j<ai. Therefore, for every t<ai, Pt⁢(i)=0<Nt−1⁢(i)+min⁡{dt/m,ε}, which means i is not a candidate at time t. Thus, the assignment y returned by Algorithm 1 satisfies yi⁢j=0⁢∀j<ai. ◀

Lemma 18.

Given release times r∈ℝ≥0n of jobs, closing times b∈ℝ≥0m of machines, d∈ℝ>0n and a fractional assignment x∈[0,1]m×n so that xi⁢j=0⁢∀i,j:rj>bi, there is a linear-time algorithm that computes an assignment y∈{0,1}m×n so that yi⁢j=0⁢∀i,j:rj>bi and

∑j=stdj⁢(yi⁢j−xi⁢j)≤(2−1m−1)⋅maxj∈[n]⁡dj∀i∈[m],1≤s≤t≤n.

Proof.

For every i∈[m], define ai:=max⁡{j:rj≤bi}. Then, assignment x satisfies xi⁢j=0⁢∀j>ai. Applying Proposition 17 with xi⁢j′:=xi,n−j+1 and ai′:=n−ai+1, we conclude that there exists an assignment y′ satisfying yi⁢j′=0⁢∀j<ai′, and thus yi⁢j:=yi,n−j+1′ satisfies yi⁢j=0⁢∀j>ai. Moreover, for every i∈[m] and 1≤s≤t≤n,

∑j=stdj⁢(yi⁢j−xi⁢j)= ∑j=n−t+1n−s+1dj⁢(yi⁢j′−xi⁢j′)
= ∑j=1n−s+1dj⁢(yi⁢j′−xi⁢j′)−∑j=1n−tdj⁢(yi⁢j′−xi⁢j′)
≤ 2⁢(1−12⁢m−2)⋅maxj∈[n]⁡dj
= (2−1m−1)⋅maxj∈[n]⁡dj.

◀

Proof of Theorem 2.

For every j∈J, let Mj={i∈[m]:rj≤bi}. It follows from Lemmas 18 and 16 that there is a (3−1m−1)-approximation algorithm for maximum flow-time scheduling with closing times. ◀

5 Lower bounds

Proof of Proposition 3.

If m=2 we can simply take x1,1=x2,1=12. Otherwise, let x∈ℝm×(m−1) be defined as xi,1=12⁢m−2 for i<m and xm,1=12, xm,j=0 for j>1 and xi,j=1m−1 otherwise (see below). Assume towards contradiction that there exists some assignment y∈{0,1}m×(m−1) so that |∑j∈[t](xi⁢j−yi⁢j)|<1−12⁢m−2⁢∀i∈[m],t∈[m−1]. If yi,1=1 for some i≠m then already |xi,1−yi,1|=1−12⁢m−2. Otherwise, ym,1=1 and yet each i∈[m−1] must be assigned at least once, since ∑j∈[m−1]xi⁢j=1−12⁢m−2. But there are only m−2 columns left, so one of i∈[m−1] must never be assigned, which is a contradiction.

◀

Proof of Proposition 4.

Consider the fractional assignment x∈[0,1]3×n below where there are n=1+2⋅p columns, with p:=⌈1−δ2⁢δ⌉ repeating pairs of columns after the first. Assume towards contradiction that there exists some assignment y∈{0,1}3×n so that |∑j∈[t](xi⁢j−yi⁢j)|<1−δ for all t∈[n]. We have to assign y3,1=1, for otherwise already |x3,1−y3,1|=1−δ. Since ∑j∈[2⁢s]x1,j=s−δ, to keep the discrepancy of the first row bounded, we must assign y1,2⁢s=1 and y1,2⁢s+1=0 for s∈[p]. Then we are forced to assign y3,2⁢s+1=1 for every s∈[p] because x2,2⁢s+1=0 implies y2,2⁢s+1=0. Yet the second row sums to 2⁢δ⋅p≥1−δ without ever being assigned, a contradiction.

◀

Proof of Proposition 5.

A construction is given by xi,j=vi for all i∈[3],j∈[100] where v=(0.01,0.48,0.51), which can be computationally verified to achieve interval discrepancy equal to 1.32. See Appendix A. ◀

6 Open problems

We ask for a version with non-uniform weights which may shed light on the unrelated machines scheduling, where job j has processing time di⁢j on machine i:

Conjecture 19.

Let m,n be positive integers and d∈ℝ>0m×n. For every fractional assignment x∈[0,1]m×n, there is an assignment y∈{0,1}m×n so that for every i∈[m] and t∈[n],

|∑j∈[t]di⁢j⁢(xi⁢j−yi⁢j)|≤maxi∈[m],j∈[n]⁡di⁢j.

The construction in Proposition 4 applied to di⁢j∈{0,dj} also shows a lower bound of (1−δ)⋅maxi∈[m],j∈[n]⁡di⁢j for all δ>0 for this setting. The argument in [18] shows that the bound holds for the non-prefix version, i.e. t=n.

We also formulate a weighted committee assignment problem:

Conjecture 20.

Let m,n be positive integers and d∈ℝ>0n. For every x∈[0,1]m×n so that nj:=∑i∈[m]xi⁢j∈ℕ for all j∈[n], there is y∈{0,1}m×n so that ∑i∈[m]yi⁢j=nj for all j∈[n] and

|∑j∈[t]dj⁢(xi⁢j−yi⁢j)|≤maxj∈[n]⁡dj∀i∈[m],t∈[n].

It is plausible that Conjectures 7, 19 and 20 may all be combined:

Conjecture 21.

Let m,n be positive integers and d∈ℝ>0m×n. For every x∈[0,1]m×n so that nj:=∑i∈[m]xi⁢j∈ℕ for all j∈[n], there is y∈{0,1}m×n so that ∑i∈[m]yi⁢j=nj for all j∈[n], yi⁢j=0 whenever xi⁢j=0, and

|∑j∈[t]di⁢j⁢(xi⁢j−yi⁢j)|≤maxi∈[m],j∈[n]⁡di⁢j∀i∈[m],t∈[n].

References

  • [1] Miklós Ajtai, James Aspnes, Moni Naor, Yuval Rabani, Leonard J. Schulman, and Orli Waarts. Fairness in scheduling. In Proceedings of the Sixth Annual ACM–SIAM Symposium on Discrete Algorithms (SODA), pages 477–485. SIAM, 1995. URL: http://dl.acm.org/citation.cfm?id=313651.313796.
  • [2] Mohammed Majthoub Almoghrabi, Martin Skutella, and Philipp Warode. Integer and unsplittable multiflows in series-parallel digraphs. In Proceedings of the 26th International Conference on Integer Programming and Combinatorial Optimization (IPCO 2025), volume 15620 of Lecture Notes in Computer Science, Baltimore, MD, USA, 2025. Springer. Also appears as arXiv preprint arXiv:2412.05182v2, July 22, 2025. doi:10.48550/arXiv.2412.05182.
  • [3] Omer Angel, Alexander E. Holroyd, James B. Martin, and James Propp. Discrete low-discrepancy sequences, 2009. arXiv:0910.1077.
  • [4] Wojciech Banaszczyk. On series of signed vectors and their rearrangements. Random Structures & Algorithms, 40(3):301–316, 2012. doi:10.1002/rsa.20373.
  • [5] Nikhil Bansal and Janardhan Kulkarni. Minimizing flow-time on unrelated machines. In Proceedings of the Forty-Seventh Annual ACM Symposium on Theory of Computing, STOC ’15, pages 851–860, New York, NY, USA, 2015. Association for Computing Machinery. doi:10.1145/2746539.2746601.
  • [6] Nikhil Bansal, Lars Rohwedder, and Ola Svensson. Flow time scheduling and prefix Beck–Fiala. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 331–342. ACM, 2022. doi:10.1145/3519935.3520077.
  • [7] Michael A. Bender, Soumen Chakrabarti, and S. Muthukrishnan. Flow and stretch metrics for scheduling continuous job streams. In Proceedings of the 9th Annual ACM–SIAM Symposium on Discrete Algorithms (SODA), pages 270–279, San Francisco, CA, 1998. SIAM. URL: https://dl.acm.org/doi/10.5555/314613.314715.
  • [8] Valérie Berthé, Olivier Carton, Nicolas Chevallier, Wolfgang Steiner, and Reem Yassawi. A dynamical view of Tijdeman’s solution of the chairman assignment problem. Combinatorics and Number Theory, 13(4):377–412, 2024. doi:10.2140/cnt.2024.13.377.
  • [9] Imre Bárány. On the power of linear dependencies. In Building Bridges: Between Mathematics and Computer Science, volume 19 of Bolyai Society Mathematical Studies, pages 31–45. Springer, 2010.
  • [10] Imre Bárány and V. S. Grinberg. On some combinatorial questions in finite-dimensional spaces. Linear Algebra and its Applications, 41:1–9, 1981.
  • [11] Don Coppersmith, Tomasz J. Nowicki, Giuseppe A. Paleologo, Charles Philippe Tresser, and Chai Wah Wu. The optimality of the online greedy algorithm in carpool and chairman assignment problems. ACM Transactions on Algorithms, 7(3):37:1–37:22, 2011. doi:10.1145/1978782.1978792.
  • [12] Yefim Dinitz, Naveen Garg, and Michel X. Goemans. On the single-source unsplittable flow problem. Combinatorica, 19(1):17–41, 1999. doi:10.1007/s004930050043.
  • [13] Yuval Efron, Shyamal Patel, and Cliff Stein. A simple algorithm for dynamic carpooling with recourse. In Proceedings of the 2025 Symposium on Simplicity in Algorithms (SOSA), pages 196–201, 2025. arXiv preprint arXiv:2411.07553.
  • [14] Ronald Fagin and John H. Williams. A fair carpool scheduling algorithm. IBM Journal of Research and Development, 27(2):133–139, March 1983. doi:10.1147/rd.272.0133.
  • [15] Anupam Gupta, Vijaykrishna Gurunathan, Ravishankar Krishnaswamy, Amit Kumar, and Sahil Singla. Online discrepancy with recourse for vectors and graphs. In Proceedings of the 2022 ACM–SIAM Symposium on Discrete Algorithms (SODA), 2022. arXiv preprint arXiv:2111.06308. arXiv:2111.06308.
  • [16] Alexander E. Holroyd and James Propp. Rotor walks and Markov chains. In Manuel E. Lladser, Robert S. Maier, Marni Mishna, and Andrew Rechnitzer, editors, Algorithmic Probability and Combinatorics, volume 520 of Contemporary Mathematics, pages 105–126. American Mathematical Society, Providence, RI, 2010. arXiv:0904.4507.
  • [17] Janardhan Kulkarni, Victor Reis, and Thomas Rothvoss. Optimal online discrepancy minimization. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 1832–1840, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3618260.3649720.
  • [18] Jan Karel Lenstra, David B Shmoys, and Éva Tardos. Approximation algorithms for scheduling unrelated parallel machines. Mathematical programming, 46(1):259–271, 1990. doi:10.1007/BF01585745.
  • [19] Monaldo Mastrolilli. Notes on max flow time minimization with controllable processing times. Computing, 71(4):375–386, 2003. doi:10.1007/s00607-003-0029-z.
  • [20] Monaldo Mastrolilli. Scheduling to minimize max flow time: Off-line and on-line algorithms. International Journal of Foundations of Computer Science, 15(2):385–401, 2004. doi:10.1142/S0129054104002480.
  • [21] H. G. Meijer. On a distribution problem in finite sets. Indagationes Mathematicae, 35:9–17, 1973. doi:10.1016/1385-7258(73)90015-2.
  • [22] H. G. Meijer and H. Niederreiter. On a distribution problem in finite sets. Compositio Mathematica, 25(2):153–160, 1972. URL: https://www.numdam.org/item/CM_1972__25_2_153_0/.
  • [23] Sarah Morell and Martin Skutella. Single source unsplittable flows with arc-wise lower and upper bounds. In Proceedings of IPCO 2020, volume 12125 of Lecture Notes in Computer Science, pages 294–306. Springer, 2020. doi:10.1007/978-3-030-45771-6_23.
  • [24] H. Niederreiter. On the existence of uniformly distributed sequences in compact spaces. Compositio Mathematica, 25(1):93–99, 1972. URL: https://www.numdam.org/item/CM_1972__25_1_93_0/.
  • [25] Harald Niederreiter. A distribution problem in finite sets. In S. K. Zaremba, editor, Applications of Number Theory to Numerical Analysis, pages 237–248. Academic Press, New York, 1972. Proc. Symposium, Université de Montréal, 1971.
  • [26] R. Tijdeman. On a distribution problem in finite and countable sets. Journal of Combinatorial Theory, Series A, 15:129–137, 1973. doi:10.1016/S0097-3165(73)80002-0.
  • [27] Robert Tijdeman. The chairman assignment problem. Discrete Mathematics, 32(3):323–330, 1980. doi:10.1016/0012-365X(80)90269-1.
  • [28] Robert Tijdeman. A progress report on discrepancy. Astérisque, pages 175–185, 1982.
  • [29] Vera Traub, Laura Vargas Koch, and Rico Zenklusen. Single-source unsplittable flows in planar graphs. In Proceedings of the 2024 Annual ACM–SIAM Symposium on Discrete Algorithms (SODA), pages 639–668. SIAM, 2024. doi:10.1137/1.9781611977912.24.

Appendix A Computer program

We use the following Julia function to verify Proposition 5:

Listing 1: Input: m,n∈ℕ and a fractional assignment x∈[0,1]m×n. Output: the smallest Δ for which there exists an assignment y∈{0,1}m×n so that |∑j∈[s,t](xi⁢j−yi⁢j)|≤Δ for all i∈[m] and 1≤s≤t≤n.
1using JuMP, Gurobi
2
3function interval_disc(m,n,x)
4 opt = Model(Gurobi.Optimizer)
5 @variable(opt, Delta >= 0) # interval discrepancy
6 @variable(opt, y[1:m,1:n], Bin) # assignment
7
8 for j in 1:n
9 @constraint(opt, sum(y[:,j]) == 1)
10 end
11 for i in 1:m
12 for s in 1:n
13 for t in s:n
14 @constraint(opt, sum(y[i,s:t]) - sum(x[i,s:t]) <= Delta)
15 @constraint(opt, sum(y[i,s:t]) - sum(x[i,s:t]) >= -Delta)
16 end
17 end
18 end
19
20 @objective(opt, Min, Delta)
21 optimize!(opt)
22 return value(Delta)
23end