Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Primal-dual analysis for online interval scheduling problems

  • Published:
Journal of Global Optimization Aims and scope Submit manuscript

Abstract

Online interval scheduling problems consider scheduling a sequence of jobs on machines to maximize the total reward. Various approaches and algorithms have been proposed for different problem formulations. This paper provides a primal-dual approach to analyze algorithms for online interval scheduling problems. This primal-dual technique can be used for both stochastic and adversarial job sequences, and hence, is universally and generally applicable. We use strong duality and complementary slackness conditions to derive exact algorithms for scheduling stochastic equal-length job sequences on a single machine. We use weak duality to obtain upper bounds for the optimal reward for scheduling stochastic equal-length job sequences on multiple machines and C-benevolent job sequences on a single machine.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Agrawal, S., Wang, Z., Ye, Y.: A dynamic near-optimal algorithm for online linear programming. Oper. Res. 62(4), 876–890 (2014)

    Article  MathSciNet  Google Scholar 

  2. Avramidis, A.N., Chan, W., Gendreau, M., L’ecuyer, P., Pisacane, O.: Optimizing daily agent scheduling in a multiskill call center. Eur. J. Oper. Res. 200(3), 822–832 (2010)

    Article  Google Scholar 

  3. Bansal, N., Buchbinder, N., Naor, J.S.: A primal-dual randomized algorithm for weighted paging. J. ACM (JACM) 59(4), 19 (2012)

    Article  MathSciNet  Google Scholar 

  4. Baptiste, P.: Scheduling equal-length jobs on identical parallel machines. Discret. Appl. Math. 103(1–3), 21–32 (2000)

    Article  MathSciNet  Google Scholar 

  5. Buchbinder, N., Jain, K., Singh, M.: Secretary problems via linear programming. In: International Conference on Integer Programming and Combinatorial Optimization, pp. 163–176. Springer (2010)

  6. Buchbinder, N., Naor, J.S., et al.: The design of competitive online algorithms via a primal-dual approach. Found. Trends Theor. Comput. Sci. 3(2–3), 93–263 (2009)

    Article  MathSciNet  Google Scholar 

  7. Chen, Y., Wang, M.: Stochastic primal-dual methods and sample complexity of reinforcement learning. arXiv:1612.02516 (2016)

  8. Chrobak, M., Dürr, C., Jawor, W., Kowalik, Ł., Kurowski, M.: A note on scheduling equal-length jobs to maximize throughput. J. Sched. 9(1), 71–73 (2006)

    Article  MathSciNet  Google Scholar 

  9. Deng, D., Shahabi, C., Zhu, L.: Task matching and scheduling for multiple workers in spatial crowdsourcing. In: Proceedings of the 23rd SIGSPATIAL International Conference on Advances in Geographic Information Systems, p. 21. ACM (2015)

  10. Devanur, N.R., Jain, K., Kleinberg, R.D.: Randomized primal-dual analysis of ranking for online bipartite matching. In: Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 101–107. SIAM (2013)

  11. Feldman, J., Mehta, A., Mirrokni, V., Muthukrishnan, S.: Online stochastic matching: beating 1-1/e. In: 50th Annual IEEE Symposium on Foundations of Computer Science, FOCS’09, pp. 117–126. IEEE (2009)

  12. Fung, S.P., Poon, C.K., Zheng, F.: Online interval scheduling: randomized and multiprocessor cases. J. Comb. Optim. 16(3), 248–262 (2008)

    Article  MathSciNet  Google Scholar 

  13. Fung, S.P., Poon, C.K., Zheng, F.: Improved randomized online scheduling of intervals and jobs. Theory Comput. Syst. 55(1), 202–228 (2014)

    Article  MathSciNet  Google Scholar 

  14. Karp, R.M., Vazirani, U.V., Vazirani, V.V.: An optimal algorithm for on-line bipartite matching. In: Proceedings of the Twenty-Second Annual ACM Symposium on Theory of Computing, pp. 352–358. ACM (1990)

  15. Kovalyov, M.Y., Ng, C., Cheng, T.E.: Fixed interval scheduling: models, applications, computational complexity and algorithms. Eur. J. Oper. Res. 178(2), 331–342 (2007)

    Article  MathSciNet  Google Scholar 

  16. Mahdian, M., Yan, Q.: Online bipartite matching with random arrivals: an approach based on strongly factor-revealing LPS. In: Proceedings of the Forty-Third Annual ACM Symposium on Theory of Computing, pp. 597–606. ACM (2011)

  17. Manshadi, V.H., Gharan, S.O., Saberi, A.: Online stochastic matching: online actions based on offline statistics. Math. Oper. Res. 37(4), 559–573 (2012)

    Article  MathSciNet  Google Scholar 

  18. Seiden, S.S.: Randomized online interval scheduling. Oper. Res. Lett. 22(4), 171–177 (1998)

    Article  MathSciNet  Google Scholar 

  19. Spieksma, F.C.: On the approximability of an interval scheduling problem. J. Sched. 2(5), 215–227 (1999)

    Article  MathSciNet  Google Scholar 

  20. Wang, M., Chen, Y.: An online primal-dual method for discounted Markov decision processes. In: IEEE 55th Conference on Decision and Control (CDC), pp. 4516–4521. IEEE (2016)

  21. Woeginger, G.J.: On-line scheduling of jobs with fixed start and end times. Theor. Comput. Sci. 130(1), 5–16 (1994)

    Article  MathSciNet  Google Scholar 

  22. Yu, G., Jacobson, S.H.: Approximation Algorithms for Stochastic Online Matching with Reusable Resources. Technical Report, University of Illinois at Urbana Champaign (2018)

  23. Yu, G., Jacobson, S.H.: Online C-benevolent job scheduling on multiple machines. Optim. Lett. 12(2), 251–263 (2018)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgements

This research has been supported in part by the Air Force Office of Scientific Research under Grant Nos. FA9550-15-1-0100, FA9550-19-1-0106. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the United States Government, or the Air Force Office of Scientific Research.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ge Yu.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Analysis for adversarial online interval scheduling problems

Analysis for adversarial online interval scheduling problems

This section uses the primal-dual technique to analyze approximation algorithms for scheduling adversarial C-benevolent job sequences on a single machine. We consider the following problem, which follows the same definition as in [13, 18, 21].

  • AC: adversarial C-benevolent jobs on a single machine. There is not necessarily one job arriving at the beginning of each time slot. The weight for the single machine is set as \(w_1=1\), and hence, the reward for completing a job is the job value. Job assignments are assumed to be preemptive, and hence, a job assigned to a machine can be terminated before completion in favor of a later arriving job. However, the terminated job cannot be reassigned and its value is lost. We refer to such assignments as temporary assignments and terminated jobs as aborted jobs.

There are differences between the analysis approaches for SE and AC. For AC, since the adversarial job sequence is considered, we use competitive ratios to evaluate the worst-case performance of algorithms, as defined in Definition 1. Let \(R_{{\mathcal {A}}} ({\mathbf {I}})\) and \(OPT({\mathbf {I}})\) denote the reward for algorithm \({\mathcal {A}}\) and the optimal reward for a job instance \({\mathbf {I}}\), respectively.

Definition 1

A deterministic (randomized) algorithm \({\mathcal {A}}\) is said to have a competitive ratio \(\gamma \) if \(R_{{\mathcal {A}}}({\mathbf {I}}) \ge OPT({\mathbf {I}})/ \gamma \) (\(\mathbb {E}[R_{{\mathcal {A}}}({\mathbf {I}})] \ge OPT({\mathbf {I}})/ \gamma \), where the expectation is taken with respect to the random assignments made by \({\mathcal {A}}\)) for any job instance \({\mathbf {I}}\).

Job assignments are preemptive, and hence, a previously assigned job may be terminated before completion in favor of a later arriving job. To prove an algorithm to be \(\gamma \)-competitive, we show the reward of the algorithm is at least \(1/\gamma \) of the optimal reward for all possible job instances. A feasible scheduling algorithm always results in a feasible solution to the primal program, and the corresponding value of the primal program is the same as the reward for the algorithm. We construct a feasible solution to the dual program, with the value of the dual program no greater than \(\gamma \) times the value of the primal program. From weak duality, the optimal reward has an upper bound given by the value of the dual program. Therefore, the algorithm has a competitive ratio of \(\gamma \).

The construction of a feasible solution to the dual program for AC depends on the specific job instance, and hence, there is no general dual solution that is feasible for all possible job instances. We turn to constructing a dual solution that is feasible for the worst-case job instance, which is sufficient for computing the competitive ratio. For randomized algorithms, we follow the same framework described above for deterministic algorithms. The only difference is that: (1) we compare the expected reward of a randomized algorithm to the optimal reward; (2) we construct a solution to the dual program, which is feasible in expectation. The feasibility in expectation expands the initial constraints of the linear program but only increases the upper bound, and hence, will not influence the analysis result. Our techniques for randomized algorithms are motivated by [10].

To simplify notations, we eliminate the subscript i in all our variables and assume \(w_1 =1\). Note that for adversarial job sequences, it is not guaranteed that one job arrives at the beginning of each time slot. We formulate the scheduling problem for C-benevolent jobs on a single machine as a primal program as follows, with the corresponding dual program:

Primal program

figure f

where constraint (44) is a linear relaxation for binary assignment variables \(\{X_j \in \{0,1\}\}\).

Dual program

figure g

where \(\{u_t\}\) and \(\{s_j\}\) correspond to constraints (43) and (44), respectively. The dual variables \(\{u_t\}\) and \(\{s_j\}\) denote the basic cost for each time slot t and the additional cost for the jth arrived job, respectively.

The construction of a feasible solution to the dual program (D3) depends on the specific job instance, and hence, there is no general dual solution that is feasible for all possible job instance. We turn to constructing a dual solution that is feasible for the subset of jobs that are completed by the optimal schedule for a job instance \({\mathbf {I}}\), denoted by \({\mathbf {I}}_{opt} \subset {\mathbf {I}}\), and show that weak duality still holds. Specifically, we consider the following restricted dual program:

Restricted dual program

figure h

Proposition 1 gives a modified weak duality, which reduces the problem of constructing a feasible solution to the dual program (D3) to constructing a feasible solution to the restricted dual program (D4) without modifying the upper bound for the optimal reward.

Proposition 1

$$\begin{aligned} OPT({\mathbf {I}}) \le D4({\mathbf {I}}_{opt}), \end{aligned}$$

for all job instances \({\mathbf {I}}\), where \(OPT({\mathbf {I}})\) denotes the reward for the optimal schedule for job instance \({\mathbf {I}}\) and \(D4({\mathbf {I}}_{opt})\) denotes the optimal value of the restricted dual program (D4) for job instance \({\mathbf {I}}_{opt}\).

Proof

Since \({\mathbf {I}}_{opt}\) denotes the subset of jobs that are assigned by the optimal algorithm, then

$$\begin{aligned} OPT({\mathbf {I}}) = OPT({\mathbf {I}}_{opt}) \le D4({\mathbf {I}}_{opt}), \end{aligned}$$

where \(OPT({\mathbf {I}})\) and \(OPT({\mathbf {I}}_{opt})\) denote the reward for the optimal schedule for jobs in \({\mathbf {I}}\) and \({\mathbf {I}}_{opt}\), respectively, and the inequality follows from weak duality. \(\square \)

Note that \({\mathbf {I}}_{opt}\) depends on the specific job instance \({\mathbf {I}}\). Since the competitive ratio of an algorithm considers the worst-case performance, we characterize the worst-case \({\mathbf {I}}_{opt}\) (which has the largest reward) for a job instance \({\mathbf {I}}\) for each algorithm, and then apply primal-dual technique on this specific instance, which is sufficient for computing the competitive ratio of an algorithm.

1.1 Deterministic algorithm

This section considers a deterministic Greedy-\(\alpha \) algorithm: whenever a new job \(J_{new}\) arrives, if the machine is idle, then assign job \(J_{new}\); otherwise, the machine must be executing some job \(J_{cur}\), in which case terminate \(J_{cur}\) and assign \(J_{new}\) if and only if \(v(J_{new}) > \alpha v(J_{cur})\), where v(J) denotes the value of job J and \(\alpha \ge 1\) is the abortion ratio. We use the primal-dual techniques to compute the competitive ratio of the Greedy-\(\alpha \) algorithm and show that when \(\alpha =2\), the Greedy-\(\alpha \) algorithm has the smallest competitive ratio of 4, which is consistent with [21].

We first clarify some definitions needed for the analysis. Consider a job J completed under the Greedy-\(\alpha \) algorithm on a single machine. Then all jobs that are previously assigned by the Greedy-\(\alpha \) algorithm but later aborted in favor of J are labelled predecessors of J. The job that has the largest completion time among jobs arriving during the execution of J but not assigned by the Greedy-\(\alpha \) algorithm is labelled the successor of J. The subset of jobs consisting of all predecessors of J, job J, and the successor of J is referred to as the segment of J (see Fig. 1). Then, from Observation 3.1 in [21], a job sequence can be divided into non-overlapping segments of all completed jobs under the Greedy-\(\alpha \) algorithm (i.e., no jobs arrive during the gap between subsequent segments, if such a gap exists). We compute the competitive ratio of the Greedy-\(\alpha \) algorithm for any segment, which is the same as the competitive ratio of the Greedy-\(\alpha \) algorithm for the whole job sequence.

Fig. 1
figure 1

An example for a segment of \(J_k\), with \(k=3\). \(\{J_1, J_2\}\) are the predecessors of \(J_3\), and \(J_4\) is the successor of \(J_3\). \(\{a_1, a_2, a_3, f_3-1\}\) are the marked time points of the segment of \(J_3\). \([a_1, f_4)\) is the time span of the segment of \(J_3\). \({\mathbf {I}}_{opt}^3\) is the set of jobs in the optimal schedule covered by the span of the segment of \(J_3\)

Let \(\{J_j\}_{j=1}^{k+1}\) denote the segment of \(J_k\), where \(J_k\) is the job completed by the Greedy-\(\alpha \) algorithm, \(\{J_j\}_{j=1}^{k-1}\) is the set of predecessors of \(J_k\), and \(J_{k+1}\) is the successor of \(J_k\). Then the time interval, which starts from the arrival time of \(J_1\) (closed) and ends at the completion time of \(J_{k+1}\) (open), is referred to as the time span of the segment of \(J_k\). The time points \(a_1< a_2 \cdots<a_k <f_k -1\) are referred to as the marked time points of the segment of \(J_k\), where \(\{a_j\}_{j=1}^k\) denote the arrival times of \(\{J_j\}_{j=1}^k\) and \(f_k\) denote the completion times of \(J_k\).

Let \({\mathbf {I}}_{opt}^k\) denote the set of jobs in the optimal schedule covered by the span of the segment of \(J_k\) (i.e., for any job in \({\mathbf {I}}_{opt}^k\), its interval is within the time span of the segment of \(J_k\), see Fig. 1). Assumption 1 characterizes the worst-case \({\mathbf {I}}_{opt}^k\) for a job instance for the Greedy-\(\alpha \) algorithm.

Assumption 1

  1. (a)

    Any job \({\tilde{J}} \in {\mathbf {I}}_{opt}^k\) contains at least one marked time point (except the first job).

  2. (b)

    The union of job intervals in \({\mathbf {I}}_{opt}^k\) covers the entire time interval of \([a_1+1, f_{k+1})\).

This assumption may only increase the reward for the optimal schedule due to the convexity of C-benevolent value-length function [18, 21]: if there is some job in the optimal schedule (except the first job) that does not contain any marked time point, we can change lengths of some jobs in the optimal schedule such that resulted jobs all contain at least one marked time point and have a larger reward.

From Proposition 1, we construct a feasible solution to the restricted dual program (D4) to obtain an upper bound for the optimal reward. We start by setting all the dual variables to zero. Therefore, \(u_{t}=0\) for all t and \(s_j=0\) for all j. Moreover, we keep \(s_j=0\) for all j unchanged throughout the scheduling of the whole job instance. We increase the value of the corresponding \(u_t\) when a job is assigned by the Greedy-\(\alpha \) algorithm (i.e., when the value of (P3) increases). Note that the assignment of \(J_1\) results in an increase of \(v(J_1)\) for the value of (P3). When \(J_2\) is assigned and \(J_1\) is aborted, the assignment of \(J_2\) results in an increase of \(\varDelta v_2= v(J_2) - v(J_1)\) for the value of (P3). Similarly, every subsequent job \(J_j\) in the segment will result in an increase of \(\varDelta v_j=v(J_j)-v(J_{j-1})\) for the value of (P3), for \(j=2,3,\ldots ,k\). We construct the dual solution as follows:

$$\begin{aligned} u_{a_1+1}&= \alpha ^{-1} v(J_1) \times \gamma , \nonumber \\ u_{a_j}&= \varDelta v_{j-1} \times \gamma ,&\text {for } j=2,3,\ldots ,k, \nonumber \\ u_{f_k-1}&= \varDelta v_k \times \gamma , \end{aligned}$$
(51)

where \(\varDelta v_j = v(J_j) - v(J_{j-1})\) with \(v(J_0) \equiv \alpha ^{-1} v(J_1)\) and \(\gamma >1\) is the competitive ratio of the algorithm to be determined later.

We are left to show that the dual solution given by (51) is feasible for the restricted dual program (D4). Consider any job \({\tilde{J}}_z \in {\mathbf {I}}^k_{opt}\) whose interval satisfies \([a_z,f_z) \subset [a_1+1, f_{k+1})\). We consider two cases: (a) \({\tilde{J}}_z \in \{J_1, J_2,\ldots , J_{k}\}\), and (b) \({\tilde{J}}_z \not \in \{J_1, J_2,\ldots , J_{k}\}\). Consider case (a) first.

For \({\tilde{J}}_z = J_1\),

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t}&= u_{a_1+1} + u_{a_2} \nonumber \\&= \alpha ^{-1} v(J_1) \times \gamma + \varDelta v_{1} \times \gamma \nonumber \\&= v(J_1) \times \gamma . \end{aligned}$$
(52)

For \({\tilde{J}}_z = J_j\), \(j=2,3,\ldots ,k-1\),

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t}&= u_{a_j} + u_{a_{j+1}} \nonumber \\&= (\varDelta v_{j-1} + \varDelta v_j) \times \gamma \nonumber \\&= (v(J_j)-v(J_{j-2})) \times \gamma \nonumber \\&\ge (1-\alpha ^{-2}) v(J_j) \times \gamma . \end{aligned}$$
(53)

For \({\tilde{J}}_z = J_k\),

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t}&= u_{a_k} + u_{f_k-1} \nonumber \\&= (\varDelta v_{k-1} + \varDelta v_k) \times \gamma \nonumber \\&= (v(J_k)-v(J_{k-2})) \times \gamma \nonumber \\&\ge (1-\alpha ^{-2}) v(J_k) \times \gamma , \end{aligned}$$
(54)

where inequalities (53) and (54) follow from the abortion rule of the Greedy-\(\alpha \) algorithm: \(v(J_j) > \alpha v(J_{j-1})\), for \(j=2,3,\dots ,k\). Therefore, for (52)–(54) to satisfy constraint (48) of the restricted dual program requires

$$\begin{aligned} \min \{\gamma , (1- \alpha ^{-2}) \gamma \} \ge 1 \qquad \Leftrightarrow \qquad \gamma \ge \frac{1}{1- \alpha ^{-2}}. \end{aligned}$$
(55)

For case (b), if \({\tilde{J}}_z\) is the first job in \({\mathbf {I}}_{opt}^k\) and does not contain any marked time point, then \(f_z< a_2 <f_1\), and hence, \(v({\tilde{J}}_z) <v(J_1)\). From Assumption 1, since \({\mathbf {I}}_{opt}^k\) covers the entire time interval \([a_1+1, f_{k+1})\), \({\tilde{J}}_z\) must contain \(a_1+1\) (i.e., \(a_1+1 \in [a_z, f_z)\)), then

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t} = u_{a_1+1} = \alpha ^{-1} v(J_1) \times \gamma \ge \alpha ^{-1} v({\tilde{J}}_z) \times \gamma . \end{aligned}$$
(56)

Otherwise, there exists some marked time point contained in \([a_z, f_z)\), the interval of \({\tilde{J}}_z\). Since job \({\tilde{J}}_z\) is not assigned by the Greedy-\(\alpha \) algorithm, then \(v({\tilde{J}}_z) \le \alpha v(J_{k_z})\) for some \(k_z \in \{1,2,\ldots , k\}\), where \(J_{k_z}\) is the job assigned by the Greedy-\(\alpha \) algorithm when job \({\tilde{J}}_z\) arrives.

For \(k_z=1,2,\ldots ,k-1\),

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t}&\ge u_{a_{k_z+1}} \nonumber \\&= \varDelta v_{k_z} \times \gamma \nonumber \\&= (v(J_{k_z})-v(J_{k_z-1})) \times \gamma \nonumber \\&\ge (1-\alpha ^{-1}) v(J_{k_z}) \times \gamma \end{aligned}$$
(57)
$$\begin{aligned}&\ge (1-\alpha ^{-1})\alpha ^{-1} v({\tilde{J}}_z) \times \gamma . \end{aligned}$$
(58)

For \(k_z=k\),

$$\begin{aligned} \sum _{t: t \in [a_z,f_z)} u_{t}&\ge u_{f_k-1} \nonumber \\&= \varDelta v_{k} \times \gamma \nonumber \\&= (v(J_{k})-v(J_{k-1})) \times \gamma \nonumber \\&\ge (1-\alpha ^{-1}) v(J_{k}) \times \gamma \end{aligned}$$
(59)
$$\begin{aligned}&\ge (1-\alpha ^{-1})\alpha ^{-1} v({\tilde{J}}_z) \times \gamma , \end{aligned}$$
(60)

where inequalities (57) and (59) follow from the abortion rule of the Greedy-\(\alpha \) algorithm: \(v(J_j) > \alpha v(J_{j-1})\), for \(j=2,3,\dots ,k\). Therefore, for (56)–(60) to satisfy constraint (48) of the restricted dual program requires

$$\begin{aligned} \min \{\alpha ^{-1} \gamma , (1-\alpha ^{-1}) \alpha ^{-1} \gamma \} \ge 1 \qquad \Leftrightarrow \qquad \gamma \ge \frac{\alpha }{1-\alpha ^{-1}}. \end{aligned}$$
(61)

Since \(\frac{\alpha }{1-\alpha ^{-1}} \ge \frac{1}{1-\alpha ^{-2}}\), then the lower bound for \(\gamma \) given by (61) dominates the lower bound given by (55). Minimizing the lower bound for \(\gamma \) given by (61) over the value of \(\alpha \) gives the optimal value for the abortion ratio as \(\alpha ^*=2\), and the competitive ratio for the Greedy-2 algorithm is \(\gamma ^*=4\).

1.2 Randomized algorithm

This section considers a randomized Greedy algorithm, BIT, proposed by [18] for scheduling C-benevolent jobs on a single machine. With probability \(0< p <1\), the algorithm assigns every job according to the Greedy-\(\alpha \) algorithm. We divide the whole job sequence into non-overlapping segments of completed jobs by the Greedy-\(\alpha \) algorithm, as described in Sect. 1. Consider the segment of \(J_k\), \(\{J_1,J_2,\ldots ,J_{k+1}\}\), where job \(J_k\) is the only completed job under the Greedy-\(\alpha \) algorithm. With probability \(1-p\), the algorithm assigns every other job in a segment according to the Greedy-\(\alpha \) algorithm. For example, the algorithm assigns jobs with odd arrival orders in the segment of \(J_k\), \(\{J_1, J_3, \ldots , J_{2 \lfloor {(k-1)/2 \rfloor } +1}\}\), with probability \((1-p)/2\) and jobs with even arrival orders in the segment of \(J_k\), \(\{J_2, J_4, \ldots , J_{2 \lfloor {k/2\rfloor }}\}\), with probability \((1-p)/2\). We refer to this algorithm as the p-Greedy-\(\alpha \) algorithm. Seiden [18] proves a competitive ratio of \(2+\sqrt{3}\) when \(\alpha =1+1/\sqrt{3}\) and \(p=1/\sqrt{3}\) using analysis techniques similar to [21]. We provide a matching competitive ratio using the primal-dual technique.

When the p-Greedy-\(\alpha \) algorithm is assigning every job in a segment, we say the algorithm is in normal mode; when the algorithm is assigning every job with odd (even) arrival orders in a segment, we say the algorithm is in random odd (even) mode. For the segment of \(J_k\), \(\{J_1,J_2,\ldots ,J_{k+1}\}\), let \(\{a_1,a_2,\ldots , a_k\}\) denote the arrival times of jobs \(\{J_1,J_2,\ldots , J_k\}\) and \(f_k\) denote the completion time of jobs \(J_k\). Then \(\{a_1,a_2,\ldots , a_k, f_k-1\}\) is the set of the marked times points of the segment of \(J_k\). Note that the p-Greedy-\(\alpha \) algorithm can complete job \(J_k\) with at least probability p.

Since a job sequence can be divided into non-overlapping segments of completed jobs, we compute the competitive ratio of the p-Greedy-\(\alpha \) algorithm for any segment, which is the same as the competitive ratio of the p-Greedy-\(\alpha \) algorithm for the entire job sequence. Note that we only need to consider the worst-case job instance to compute the competitive ratio. The worst-case job instance for the p-Greedy-\(\alpha \) algorithm is given by Lemma 3.5 [18], which is rephrased in Lemma 1.

Lemma 1

When the competitive ratio \(\gamma \) and the parameters of the p-Greedy-\(\alpha \) algorithm satisfy

$$\begin{aligned} \gamma (1-p) \le \alpha , \end{aligned}$$
(62)

the worst-case job instance for the p-Greedy-\(\alpha \) algorithm satisfies \(f_{j-2} \le a_{j}\), for \(j=3,4,\ldots ,k+1\) and \(k \ge 3\), where \(\{a_1,a_2,\ldots ,a_{k+1}\}\) and \(\{f_1,f_2,\ldots ,f_{k+1}\}\) are the arrival and completion times of jobs in a segment, \(\{J_1,J_2,\ldots ,J_{k+1}\}\).

We now consider the segment of \(J_k\) in the worst-case job instance given by Lemma 1 and construct a solution to the restricted dual program (D4). Let \({\mathbf {I}}_{opt}^k\) denote the set of jobs in the optimal schedule covered by the span of the segment of \(J_k\). We make Assumption 1 for \({\mathbf {I}}_{opt}^k\), since this assumption only increases the reward for the optimal schedule due to the convexity of C-benevolent jobs.

We initialize the dual variables as \(u_{t} =0\) for all t and \(s_j=0\) for all j. The values of \(\{s_j\}\) remain zero throughout the scheduling of the entire job sequence. Each time an assignment is made (either some previously assigned job is aborted or not), we increase the value of the corresponding \(u_{t}\). Since the algorithm has three different modes, we describe the rules for increasing the values of \(u_{t}\) separately. In the normal mode, the values of \(u_{t}\) are set in the same way as for the deterministic Greedy-\(\alpha \) algorithm (see 51). In the random odd (even) mode, only jobs with odd (even) arrival orders in a segment can be assigned or aborted. For the worst-case job instance given by Lemma 1, \(f_{j-2} \le a_j\) for \(j=3,4,\ldots ,k+1\), and hence, jobs \(\{J_1, J_3, \ldots , J_{2 \lfloor {(k-1)/2 \rfloor } +1}\}\) (\(\{J_2, J_4, \ldots , J_{2 \lfloor {k/2\rfloor }}\}\)) are completed in the random odd (even) mode. In the random odd mode, for \(1 \le j \le k\) and \(mod(j,2)=1\), set \(u_{t}\) as follows:

$$\begin{aligned} u_{f_j-1} = v(J_j) \times \gamma . \end{aligned}$$
(63)

In the random even mode, for \(1 \le j \le k\) and \(mod(j,2)=0\), set \(u_{t}\) as follows:

$$\begin{aligned} u_{f_j-1} = v(J_j) \times \gamma . \end{aligned}$$
(64)

For the dual solution given by (51), (63) and (64), the increase in the value of the primal program (P3) is no less than \(1/\gamma \) of the increase in the value of the dual program (D4). Therefore, we are left to show that the constructed dual solution is feasible for the restricted dual program (D4) to prove that the competitive ratio of the p-Greedy-\(\alpha \) algorithm is \(\gamma \).

We consider two cases for a job \({\tilde{J}}_z\) in the optimal schedule \({\mathbf {I}}_{opt}^k\): (a) job \({\tilde{J}}_z \in \{J_1, J_2,\ldots , J_k\}\), and hence, is assigned in the normal mode (either later aborted or completed); (b) job \({\tilde{J}}_z \notin \{J_1, J_2,\ldots , J_k\}\), and hence, is not assigned in the normal mode.

Consider case (a). Then \({\tilde{J}}_z = J_j\), for some \(1\le j \le k\). If \(j=1\), then

$$\begin{aligned} \mathbb {E}\left[ \sum _{t:t \in [a_1,f_1)} u_{t} \right] \ge \mathbb {E}[u_{a_1+1}+u_{f_1-1}] = p v(J_1)\gamma +\frac{1-p}{2} v(J_1) \gamma =\frac{1+p}{2} \gamma v(J_1). \end{aligned}$$
(65)

If \(2 \le j \le k\), then

$$\begin{aligned} \mathbb {E}\left[ \sum _{t:t \in [a_j,f_j)} u_{t} \right]&\ge \mathbb {E}[u_{a_j}+u_{a_{j+1}}+u_{f_j-1}]\nonumber \\&\ge p (v(J_j) - v(J_{j-1}) )\gamma + p(v(J_{j-1})-v(J_{j-2}))\gamma +\frac{1-p}{2} (v(J_j)+v(J_{j-1})) \gamma \nonumber \\&\ge \left( p(1-\alpha ^{-2})+ \frac{1-p}{2} (1+\alpha ^{-1}) \right) \gamma v(J_j). \end{aligned}$$
(66)

For (65) and (66) to satisfy constraint (48) of the restricted dual program requires

$$\begin{aligned} \min \left\{ \frac{1+p}{2} , p(1-\alpha ^{-2})+ \frac{1-p}{2} (1+\alpha ^{-1}) \right\} \gamma \ge 1. \end{aligned}$$
(67)

Next we consider case (b). If \({\tilde{J}}_z\) is the first job in \({\mathbf {I}}_{opt}^k\) and does not contain any marked time point, then \(f_z< a_2 <f_1\), and hence, \(v({\tilde{J}}_z) <v(J_1)\). From Assumption 1, since \({\mathbf {I}}_{opt}^k\) covers the entire time interval \([a_1+1, f_{k+1})\), \({\tilde{J}}_z\) must contain \(a_1+1\) (i.e., \(a_1+1 \in [a_z, f_z)\)), then

$$\begin{aligned} {\mathbb {E}}\left[ \sum _{t: t \in [a_z,f_z)} u_{t}\right] \ge \mathbb {E}[u_{a_1+1}] = p \alpha ^{-1} \gamma v(J_1) \ge p \alpha ^{-1} \gamma v({\tilde{J}}_z). \end{aligned}$$
(68)

Otherwise, there exists a marked time point contained in \([a_z, f_z)\), the interval of job \({\tilde{J}}_z\). Therefore, if the marked time point is \(a_{k_z}\) for \(k_z=2,3,\ldots , k\), then

$$\begin{aligned} \mathbb {E}\left[ \sum _{t:t \in [a_z,f_z)} u_{t} \right]&\ge \mathbb {E}[u_{a_{k_z}} + u_{f_{k_z-1}-1}] \nonumber \\&= p (v(J_{k_z-1}) - v(J_{k_z-2}))\gamma + \frac{1-p}{2} v(J_{k_z-1}) \gamma \nonumber \\&\ge \left( p(1-\alpha ^{-1})+\frac{1-p}{2}\right) \gamma v(J_{k_z-1}), \end{aligned}$$
(69)

where \(v({\tilde{J}}_z) \le \alpha v(J_{k_z-1})\). If the marked time point is \(f_k-1\), then

$$\begin{aligned} \mathbb {E}\left[ \sum _{t:t \in [a_z,f_z)} u_{t} \right]&\ge \mathbb {E}[u_{f_k-1} ] \nonumber \\&= p (v(J_{k}) - v(J_{k-1}))\gamma + \frac{1-p}{2} v(J_{k}) \gamma \nonumber \\&\ge \left( p(1-\alpha ^{-1})+\frac{1-p}{2}\right) \gamma v(J_{k}), \end{aligned}$$
(70)

where \(v({\tilde{J}}_z) < \alpha v(J_k)\).

For (68)–(71) to satisfy constraint (48) requires

$$\begin{aligned} \frac{p}{\alpha } \gamma&\ge 1, \nonumber \\ \left( p(1-\alpha ^{-1})+\frac{1-p}{2} \right) \gamma&\ge \alpha . \end{aligned}$$
(71)

Since

$$\begin{aligned} \alpha ^{-1} \left( p(1-\alpha ^{-1})+\frac{1-p}{2} \right) \le p(1-\alpha ^{-2})+ \frac{1-p}{2} (1+\alpha ^{-1}), \end{aligned}$$

and

$$\begin{aligned} \alpha ^{-1} \left( p(1-\alpha ^{-1})+\frac{1-p}{2} \right) = \alpha ^{-1} \left( \frac{1+p}{2} -\frac{p}{\alpha }\right) \le \frac{1+p}{2}, \end{aligned}$$

for \(\alpha \ge 1\), then combining the conditions given by (62), (67) and (71) leads to

$$\begin{aligned} \max \left\{ \frac{\alpha }{p},\left( \frac{1+p}{2}-\frac{p}{\alpha }\right) ^{-1} \alpha \right\} \le \gamma \le \frac{\alpha }{1-p}. \end{aligned}$$
(72)

Substituting the values of parameters p and \(\alpha \) with the values \(\alpha =1+1/\sqrt{3}\) and \(p=1/\sqrt{3}\), the competitive ratio of the p-Greedy-\(\alpha \) algorithm can be computed as \(\gamma =2+\sqrt{3}\) from (72), which matches the competitive ratio given by [18].

1.3 Cooperative greedy algorithm

This section considers a randomized Cooperative Greedy algorithm for scheduling C-benevolent jobs on a single machine. The Cooperative Greedy algorithm was originally proposed by [13] for scheduling C-benevolent jobs on a single machine and [23] for scheduling C-benevolent jobs on two machines.

The Cooperative Greedy algorithm initially chooses one of two modes, A and B, with equal probability and sticks to that mode thereafter. Let \(J_1\) denote the first arriving job when the machine is available. Mode A assigns and completes job \(J_1\); mode B does not assign job \(J_1\) and uses the Greedy-1 algorithm for jobs arriving during \([a_1+1, f_1)\). At time \(f_1\), if mode B schedules no job on the machine, we say a segment (i.e., \(\{J_1\}\)) ends. Otherwise, let \(J_2\) denote the job scheduled on the machine by mode B at time \(f_1\). Then during \([f_1,f_2)\), mode A uses the Greedy-1 algorithm to schedule jobs; mode B completes job \(J_2\). At time \(f_2\), if mode A schedules no job on the machine, we say a segment (i.e.,\(\{J_1, J_2\}\)) ends. Otherwise, let \(J_3\) denotes the job scheduled on the machine by mode A at time \(f_2\). Then during \([f_2, f_3)\), mode A completes job \(J_3\); mode B uses the Greedy-1 algorithm to schedule jobs. This process continues until no job is scheduled on the machine in either mode A or B, and we say a segment ends (see Fig. 2). When the next job arrives, a new segment starts and the algorithm continues this process until the end of a job instance.

Fig. 2
figure 2

An example for a segment \(\{J_1, J_2, J_3, J_4, J_5, J_6\}\) for the Cooperative Greedy algorithm. \(\{f_1-1, f_2-1, f_3-1, f_4-1, f_5 -1\}\) are the marked time points of the segment. \({\mathbf {I}}_{opt}^6\) is the set of jobs in the optimal schedule covered by the span of the segment, \([a_1, f_6)\)

Let \(\{J_1, J_2,\ldots ,J_k\}\) denote a segment with k completed jobs in either mode under the Cooperative Greedy algorithm. Then each job \(J_j\) is completed with probability 1/2, for \(j=1,2,\ldots ,k\). Time points \(\{f_1-1, f_2-1,\ldots , f_{k-1}-1\}\) are defined as the marked time points for the the segment, where \(\{f_1, f_2,\ldots , f_{k-1}\}\) denote the completion times of jobs \(\{J_1, J_2,\ldots ,J_{k-1}\}\). Since a job sequence can be divided into non-overlapping segments, we compute the competitive ratio of the Cooperative Greedy algorithm for any segment, which is the same as the competitive ratio of the Cooperative Greedy algorithm for the entire job sequence.

We first characterize the worst-case job instance for the Cooperative Greedy algorithm, which is sufficient to consider for computing the competitive ratio. Lemma 2 gives a criterion to simplify jobs in the optimal schedule without reducing the total reward.

Lemma 2

For any segment \(\{J_1, J_2,\ldots ,J_k\}\) (\(k \ge 2\)) in a job instance \({\mathbf {I}}\), the reward of any feasible schedule covered by the time interval \([a_1, f_k)\), can be increased by reallocating job lengths if there is some job (except the first job) in the schedule that does not contain any marked time point, where \(a_1\) is the arrival time of \(J_1\) and \(f_k\) is the completion time of \(J_k\).

Proof

The proof is by induction on k.

Consider the base case of \(k=2\). Let \(\{{\tilde{J}}_j\}_{j=1}^h\) denote a feasible schedule covered by the time span \([a_1, f_2)\) of segment \(\{J_1,J_2\}\), where \({\tilde{J}}_j\) is reordered increasingly with respect to their lengths (i.e., \(a({\tilde{J}}_j) < a({\tilde{J}}_{j+1})\) and \(l({\tilde{J}}_j) < l({\tilde{J}}_{j+1})\), for \(j=1,2,,\ldots , h-1\)). Then,

$$\begin{aligned} \sum _{j=1}^h l({\tilde{J}}_j) \le f({\tilde{J}}_h) - a({\tilde{J}}_1) \le f_2 -a_1, \end{aligned}$$
(73)

where a(J) and f(J) denote the arrival and completion times of job J. If \({\tilde{J}}_h\) does not contain the marked time point \(f_1-1\), then we construct two new jobs \({\bar{J}}_1\) and \({\bar{J}}_2\), with \(a({\bar{J}}_1) = a({\tilde{J}}_1)\), \(l({\bar{J}}_1) = a_2 -a({\tilde{J}}_1)\) and \(a({\bar{J}}_2) = a_2\), \(l({\bar{J}}_2) = f({\tilde{J}}_h) - a_2\), where \(a_2\) is the arrival time of job \(J_2\) and l(J) denotes the length of job J. Then \(\{{\bar{J}}_1, {\bar{J}}_2\}\) is a new feasible schedule covered by \([a_1, f_2)\). Moreover, \(l({\bar{J}}_1) +l({\bar{J}}_2) = f({\tilde{J}}_h) - a({\tilde{J}}_1) \ge \sum _{j=1}^h l({\tilde{J}}_j) \) and \(l({\bar{J}}_2) > l({\tilde{J}}_h)\). Therefore, from the property of C-benevolent jobs,

$$\begin{aligned} v({\bar{J}}_1) + v({\bar{J}}_2) \ge \sum _{j=1}^h v({\tilde{J}}_j). \end{aligned}$$

Assume that Lemma 2 holds for \(k=k_0-1\). To prove that it holds for \(k=k_0\), let \(\{{\tilde{J}}_j\}_{j=1}^{h'}\) denote a feasible schedule for the time span \([a_1, f_{k_0})\) of segment \(\{J_1,J_2,\ldots , J_{k_0}\}\), where \({\tilde{J}}_j\) is reordered increasingly with respect to their lengths. If \({\tilde{J}}_{h'}\) contains the marked time point \(f_{k_0-1}-1\), \(f({\tilde{J}}_{h'-1}) \le a({\tilde{J}}_{h'}) < f_{k_0-1}\), and hence, \(\{{\tilde{J}}_j\}_{j=1}^{h'-1}\) is a feasible schedule covered by interval \([a_1, f_{k_0-1})\). Then the case \(k=k_0\) follows from induction assumption for case \(k=k_0-1\). Otherwise, if \({\tilde{J}}_{h'}\) does not contain the marked time point \(f_{k_0-1}-1\), let \({\tilde{J}}_{h_0}\) denote the last job in the feasible schedule whose arrival time is before the arrival time of \(J_{k_0}\) in the segment. We then construct two new jobs, \({\bar{J}}_1\) and \({\bar{J}}_2\), with \(a({\bar{J}}_1) = a({\tilde{J}}_{h_0})\), \(l({\bar{J}}_1) = a_{k_0} - a({\tilde{J}}_{h_0})\) and \(a({\bar{J}}_2) = a_{k_0}\), \(l({\bar{J}}_2) = f({\tilde{J}}_{h'}) - a_{k_0}\), where \(a_{k_0}\) is the arrival time of job \(J_{k_0}\). Then \(\{{\tilde{J}}_1, {\tilde{J}}_2, \ldots , {\tilde{J}}_{h_0-1}, {\bar{J}}_1, {\bar{J}}_2\}\) is a new feasible schedule covered by \([a_1, f_{k_0})\). Moreover, since \(l({\bar{J}}_1) + l({\bar{J}}_2) = f({\tilde{J}}_{h'}) - a({\tilde{J}}_{h_0}) \ge \sum _{j=h_0}^{h'} l({\tilde{J}}_j)\) and \(l({\bar{J}}_2) \ge \max _{h_0+1 \le j \le h'} l({\tilde{J}}_j)\),

$$\begin{aligned} v({\bar{J}}_1) + v({\bar{J}}_2) \ge \sum _{j=h_0}^{h'} v({\tilde{J}}_j), \end{aligned}$$

which follows from the convexity of C-benevolent jobs. Note that \(f({\bar{J}}_1) = a({\bar{J}}_1) + l(\bar{J_1}) = a_{k_0} \le f_{k_0-1}\). Therefore, \(\{{\tilde{J}}_1, {\tilde{J}}_2, \ldots , {\tilde{J}}_{h_0-1}, {\bar{J}}_1\}\) is a feasible schedule for the time span \([a_1, f_{k_0-1})\), and hence, the case \(k=k_0\) follows from the induction assumption for case \(k=k_0\), which completes the proof. \(\square \)

Let \({\mathbf {I}}_{opt}^k\) denote the set of jobs in the optimal schedule covered by the time span of segment \([a_1, f_k)\). From Lemma 2, we make Assumption 1 for \({\mathbf {I}}_{opt}^k\), which only increases the reward for the optimal schedule.

We construct a feasible solution to the restricted dual program (D4) by initializing \(u_t =0\) and \(s_j=0\) for all t and all j. As the Cooperative Greedy algorithm schedules jobs, we increase the values of the corresponding \(u_t\) and leave the values of \(\{s_j\}\) unchanged. More specifically,

$$\begin{aligned} u_{a_1+1}&= v(J_1) \times \gamma , \nonumber \\ u_{f_j-1}&= v(J_{j+1}) \times \gamma , \text { for } j=1,2,\ldots ,k. \end{aligned}$$
(74)

We will now show that the dual solution given by (74) is feasible for the restricted dual program for the worst-case job instance satisfying Assumption 1. We consider two cases for job \({\tilde{J}}_z \in {\mathbf {I}}_{opt}\): (a) job \({\tilde{J}}_z \in {\mathbf {I}}_{opt}^k\) is the first job in \({\mathbf {I}}_{opt}^k\); (b) job \({\tilde{J}}_z \in {\mathbf {I}}_{opt}\) is not the first job in \({\mathbf {I}}_{opt}^k\). For case (a), by Assumption 1, \(a_1+1 \in [a_z, f_z)\). If the marked time point \(f_1-1\) is not contained in \([a_z, f_z)\), then

$$\begin{aligned} {\mathbb {E}}\left[ \sum _{t:t \in [a_z, f_z)} u_t\right] \ge \frac{1}{2} u_{a_1+1} \ge \frac{1}{2} v(J_1) \times \gamma , \end{aligned}$$
(75)

where \(v(J_1) \ge v(\tilde{J_z})\) since \(l(J_1) \ge l(\tilde{J_z})\).

If the marked time point \(f_1 -1 \in [a_z, f_z)\), then

$$\begin{aligned} {\mathbb {E}}\left[ \sum _{t: t \in [a_z, f_z)} u_t\right] \ge \frac{1}{2} u_{a_1+1} + \frac{1}{2} u_{f_1 -1} \ge \frac{1}{2} (v(J_1) + v(J_2)) \times \gamma , \end{aligned}$$
(76)

where \(v({\tilde{J}}_z) \le v(J_2)\).

For case (b), let \(f_{k_z}-1\) denote the marked time point contained in job \({\tilde{J}}_z \in {\mathbf {I}}_{opt}\), for \(k_z =1,2,\ldots ,k-1\), then

$$\begin{aligned} {\mathbb {E}}\left[ \sum _{t:t \in [a_z, f_z)} u_t\right] \ge \frac{1}{2} u_{f_{k_z}-1} \ge \frac{1}{2} v(J_{z+1}) \times \gamma , \end{aligned}$$
(77)

where \(v(J_{k_z+1}) \ge v({\tilde{J}}_z)\). For (75), (76) and (77) to satisfy constraint (48) requires

$$\begin{aligned} \frac{1}{2} \gamma \ge 1 \qquad \Leftrightarrow \qquad \gamma \ge 2. \end{aligned}$$

Therefore, the competitive ratio for the Cooperative Greedy algorithm is 2.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Yu, G., Jacobson, S.H. Primal-dual analysis for online interval scheduling problems. J Glob Optim 77, 575–602 (2020). https://doi.org/10.1007/s10898-020-00880-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10898-020-00880-5

Keywords