The Scientific World Journal

Volume 2014, Article ID 576234, 6 pages

http://dx.doi.org/10.1155/2014/576234

## Semi-Online Scheduling on Two Machines with *GoS* Levels and Partial Information of Processing Time

^{1}Business School, Sichuan University, Chengdu 610065, China^{2}State Key Lab for Manufacturing Systems Engineering, Xi’an 710049, China

Received 15 November 2013; Accepted 19 December 2013; Published 11 February 2014

Academic Editors: J. G. Barbosa and D. Oron

Copyright © 2014 Taibo Luo and Yinfeng Xu. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper investigates semi-online scheduling problems on two parallel machines under a grade of service (*GoS*) provision subject to minimize the makespan. We consider three different semi-online versions with knowing the total processing time of the jobs with higher *GoS* level, knowing the total processing time of the jobs with lower *GoS* level, or knowing both in advance. Respectively, for the three semi-online versions, we develop algorithms with competitive ratios of , , and which are shown to be optimal.

#### 1. Introduction

Scheduling problem under a grade of service provision was first proposed by Hwang et al. [1]. The jobs should be assigned irrevocably to machines as soon as they arrive. Each job and machine are labeled with the *GoS* levels. A job can be processed by a particular machine if and only if the *GoS* level of the job is not less than that of the machine. In practice, the scheduling with *GoS* eligibility constraints is widely used. For more details, please refer to [1–3].

For the offline scheduling on machines under a grade of service provision, Hwang et al. [1] presented an LG-LPT algorithm which has a tight bound of for two machines and for () machines. Ji and Cheng [4] gave an FPTAS for this problem. However, Woeginger [5] gave two simpler FPTASs for the same problem. For the online version, Jiang [6] proved a lower bound of 2 for the case with two levels of *GoS* and presented an online algorithm with a competitive ratio of 2.52. Zhang et al. [7] improved the result and showed an algorithm with a competitive ratio of .

For , Park et al. [8] presented an optimal algorithm with a competitive ratio of . However, there are many papers focusing on the semi-online scheduling on two machines under *GoS* [8–13]. As the total processing time of all jobs is known, Park et al. [8] gave an optimal algorithm with a competitive ratio of . When the largest processing time of all jobs is known, Wu et al. [12] presented an optimal algorithm with a competitive ratio of . In the same paper, Wu et al. [12] gave an optimal algorithm with a competitive ratio of when the optimal value of the instance is known. For the processing times bounded in an interval, Liu et al. [9] gave a competitive algorithm under some conditions and Zhang et al. [13] improved the result and gave an optimal algorithm for different intervals. In this paper, we focus on the semi-online scheduling problem where only partial information of the total processing time is known. The semi-online versions concerned in our paper are listed as follows. *sum* · *higher*: the total processing time of all jobs with higher *GoS* level is known in advance. *sum* · *lower*: the total processing time of all jobs with lower *GoS* level is known in advance.

We use to denote the semi-online problem with information , where . Moreover, we use to denote the semi-online problem where both information and information are available in advance.

Our results indicate that competitive ratios of three algorithms are better than of the online version [8]. When knowing *sum* · *higher* in advance, the competitive ratio is the same as the optimal algorithm [8] presented for the semi-online problem where the total processing time of all jobs is known. For designing algorithm, the results indicate that knowing *sum* · *higher**sum* · *lower* is more useful than *sum* · *higher* or *sum* · *lower*. Moreover, knowing *sum* · *higher* is more useful than *sum* · *lower*. However, knowing *sum* · *lower* is better than knowing the largest processing time of all jobs [12].

The rest of this paper is organized as follows: in Section 2, we give some basic definitions. In Sections 3–5, we prove lower bounds and present algorithms for the three semi-online problems, respectively.

#### 2. Basic Definitions

We are given two machines and a series of jobs arriving online which are to be scheduled irrevocably at the time of their arrivals. The arrival of a new job occurs only after the current job is scheduled. We denote by the set the set of all job indices arranged in the order of arrival. The th arriving job is referred to as job . We denote each job by . The *GoS* assigned to job is denoted by , which is 1 if the job must be processed only by the first machine and 2 if it may be processed by either of the two; is the processing time of job ; and are not known until the arrival of job . Let and .

The scheduled can be seen as the partition of into two subsets, denoted by , where and contain job indices assigned to the first and second machine, respectively. Let for an arbitrary subset of . Then the maximum of and , denoted by , is the makespan of the scheduled . The problem is to minimize .

The minimum makespan obtained by an optimal offline algorithm is denoted by . The makespan generated by algorithm is denoted by . The competitive ratio of is defined to be the maximum .

#### 3. Optimal Algorithm for

In this section, we prove a lower bound of competitive ratio and present an optimal algorithm for the semi-online version as is known in advance.

##### 3.1. Lower Bound of Competitive Ratio

Theorem 1. *Any semi-online algorithm for has a competitive ratio of at least .*

*Proof. *The theorem will be proved by adversary method. Let be known in advance. The first job is . must be scheduled on the first machine. Then, we generate job . If job is scheduled on the first machine, and there is no job arriving after, we have . Otherwise, job is scheduled on the second machine, and we generate job . No matter which machine that job is scheduled on, we have . Since the optimal algorithm will scheduled job and job on the first machine and scheduled job on the second machine. Hence, . The proof is completed.

##### 3.2. Optimal Semi-Online Algorithm *GoS-TH*

Since we know in advance and all the jobs with must be scheduled on the first machine, we can regard them as one job; that is, . We scheduled job on the first machine at first and do not need to care about the job with later.

At the arrival of each job, is updated to become a half of the total processing time of the jobs which include the jobs with and job ; is updated to become the maximum processing time. We define , , , and to be , , , and after we scheduled job . Then, clearly the optimum makespan . Combined with the online algorithm presented by Park et al. [8], we propose Algorithm .

*Algorithm GoS-TH*(1)Scheduled to the first machine and .(2)Let for all the jobs with .(3)Suppose that the incoming job is and ; assign job to the first machine.(4)Suppose the incoming job is and . , , and .(4.1)If , scheduled it to the second machine.(4.2)If , scheduled it to the first machine.

Theorem 2. *The competitive ratio of Algorithm GoS-TH is for .*

*Proof. *Suppose that Theorem 2 is false. There must exist an instance with the least number of jobs to make . The makespan is not determined until the arrival of job . Therefore,

If , based on Algorithm , we have and . Due to the fact that , we just need to prove Theorem 2 is true when .

If , when it is scheduled on the second machine, we have . This is contradicting with inequality (1). Otherwise, job is scheduled on the first machine, which leads to ; combined with , we get that . Since , we have , which also contradicted with inequality (1). The proof is completed.

#### 4. Optimal Algorithm for

In this section, we prove a lower bound of competitive ratio and present an optimal algorithm for the semi-online version as is known in advance.

##### 4.1. Lower Bound of Competitive Ratio

Theorem 3. *Any semi-online algorithm for has a competitive ratio of at least .*

*Proof. *We will construct a job sequence with to make an arbitrary algorithm behave poorly. We begin with jobs and . We discuss the following three cases.*Case* *1* ( and are scheduled on the first machine). We continue to generate jobs and . If job and job are scheduled on the second machine, we have ; thus, . Otherwise, if job or job is scheduled on the first machine or both of them are scheduled on the first machine, we further generate job . We will have . Since optimal algorithm will scheduled jobs , , , and on the second machine and scheduled job on the first machine, we have . *Case **2* ( or is scheduled on the first machine). We continue to generate job . Then we discuss the following two subcases.*Subcase* *2.1* (job is scheduled on the first machine). We continue to generate jobs and . If job and job are scheduled on the second machine, we have and , which lead to . Otherwise, if job or job is scheduled on the first machine or both of them are scheduled on the first machine, we further generate job which leads to .*Subcase* *2.2* ( is scheduled on the second machine). We generate job . If job is scheduled on the second machine, we generate job . If job is scheduled on the second machine, we have . Since the optimal algorithm will scheduled jobs , , , and on the first machine and scheduled job on the second machine, we have . If job is scheduled on the first machine, we generate job which leads to .

Otherwise, if job is scheduled on the first machine, we generate job . If job is scheduled on the first machine, we generate job which leads to . If job is scheduled on the second machine, we generate job . If job is scheduled on the second machine, we have and ; thus, . If is scheduled on the first machine, we generate job and have and , which also lead to . *Case* *3* ( and are scheduled on the second machine). We continue to generate job . Then we discuss the following two subcases. *Subcase* *3.1* (job is scheduled on the second machine). We generate jobs and . If job or job is scheduled on the second machine or both of them are scheduled on the second machine, we further generate job . If job is scheduled on the second machine, we generate job . If job is scheduled on the second machine, we have . Since the optimal algorithm will scheduled jobs , , , , , and on the first machine and scheduled job on the second machine, we have . Otherwise, job is scheduled on the first machine, and then we generate job and have and ; hence, . If job is scheduled on the first machine, we generate job . If job is scheduled on the second machine, we have and , hence, we also have . Otherwise, job is scheduled on the first machine, and then we generate job . We have .

If job and job are scheduled on the first machine, we generate jobs and . If job or job is scheduled on the first machine or both of them are scheduled on the first machine, we further generate job . We have . Otherwise, if job and job are scheduled on the second machine, we have and , which lead to .*Subcase* *3.2* (job is scheduled on the first machine). We generate job . If job is scheduled on the first machine, we generate jobs and . If job and job are scheduled on the second machine, we have and ; thus, . Otherwise, if job or job is scheduled on the first machine or both of them are scheduled on the first machine, we further generate job and have ; thus, .

Otherwise, if job is scheduled on the second machine, we generate job . If job is scheduled on the second machine, we generate job . If job is scheduled on the second machine, we have and ; hence, . If job is scheduled on the first machine, we generate job and have ; thus, .

Therefore, job is scheduled on the first machine. Then we generate jobs and . If job or job is scheduled on the first machine or both of them are scheduled on the first machine, we further generate job . We will have and ; hence, . Otherwise, if job and job are scheduled on the second machine, we have and ; also, we have . The proof is completed.

##### 4.2. Optimal Semi-Online Algorithm *GoS-TL*

In this subsection, we design an optimal algorithm with a competitive ratio of . Let and be the jobs with assigned to the first and second machine, respectively, where . We define and to be and after we scheduled job . Then, we propose Algorithm .

*Algorithm GoS-TL*(1)Suppose that the incoming job is and ; assign job to the first machine.(2)Suppose that the incoming job is and .(2.1)(*Stopping criterion 1*). If , scheduled job and all the remaining jobs with to the first machine, and then scheduled all the remaining jobs with to the second machine. Stop.(2.2)(*Stopping criterion 2*). If , scheduled job to the second machine and scheduled all the remaining jobs to the first machine. Stop.(2.3)(*Stopping criterion 3*). If , scheduled job and the remaining jobs to the first machine. Stop.(2.4)If and , scheduled job to the first machine. Continue.(2.5)Otherwise, scheduled job to the second machine. Continue.

Lemma 4. *If , then .*

*Proof. *Since , we have . Then, we only need to prove that . We discuss it by the following two cases. *Case* *1* (). In this case, we have and . Since , we have . Combined with , we have
*Case* *2* (). In this case, we have , which leads to . Then, we have
Since is increasing function of the variation of , thus, we have

The proof is completed.

Based on Lemma 4, we straightforwardly have Corollary 5.

Corollary 5. *
(1) If , then ; (2) if , then .*

Lemma 6. *.*

*Proof. *Since Algorithm will only scheduled a job with to the first machine only when , the lemma can directly be got from the Algorithm . The proof is completed.

By using Corollary 5 and Lemma 6, we can obtain the following corollary.

Corollary 7. *If , then .*

Based on Lemma 6 and Corollary 7, if we prove will hold when , then we can prove that Algorithm is -competitive.

Lemma 8. *If job is scheduled on the second machine by Algorithm where and , then .*

*Proof. *If and , we have . Then we have . If job is scheduled on the second machine, Algorithm will scheduled the remaining jobs on the first machine. Thus,
Since is decreasing function of the variation of and increasing function of variation of , we have

The proof is completed.

Lemma 9. *If , then will never happen.*

*Proof. *If , Algorithm will scheduled the remaining jobs on the first machine, so . The proof is completed.

Lemma 10. *If job is scheduled on the second machine by Algorithm where and , then .*

*Proof. *Let be the job that is scheduled on the second machine by Algorithm which satisfies and . Since is scheduled on the second machine by Algorithm and , we have ; otherwise, Algorithm will scheduled job on the first machine. Moreover, must hold which leads to . This further implies that since .

If , then which leads to ; this is contradicting with the definition of job . Therefore, we have . Based on step (2.4) of Algorithm , the processing time of the job that is assigned to is larger than since . Combined with , we know there is only one job in , call it job . Since job , job , and need to satisfy
we can get , which implies that .

Since there is no job with that will scheduled on the first machine between job and by Algorithm , combined with job being scheduled on the second machine, we have . Since , , , and must satisfy
which implies that , hence,

The proof is completed.

Based on Lemma 4 to Lemma 10 and Corollary 5 to Corollary 7, we have the following theorem naturally.

Theorem 11. *The competitive ratio of Algorithm GoS-TL is for .*

#### 5. Optimal Algorithm for

In this section, we show a lower bound of competitive ratio and present an optimal algorithm for the semi-online version as and are known in advance.

##### 5.1. Lower Bound of Competitive Ratio

Theorem 12. *Any semi-online algorithm for has a competitive ratio of at least .*

*Proof. *The theorem will be proved by adversary method. Let and be known in advance. The first job is . Job must be scheduled on the first machine. Then job arrives. If job is scheduled on the second machine, we further generate jobs and . In this situation, we have and since the optimal algorithm will scheduled jobs , , and on the first machine and scheduled job on the second machine. Thus, we have . Otherwise, if job is scheduled on the first machine, then we further generate jobs and . In this situation, we also have and since the optimal algorithm will scheduled jobs and on the first machine and scheduled jobs and on the second machine. The proof is completed.

##### 5.2. Optimal Semi-Online Algorithm *GoS-TB*

In this subsection, we design an optimal algorithm with a competitive ratio of . Since we know in advance and all the jobs with must be scheduled on the first machine, therefore, we can regard them as one job, that is, . We scheduled job on the first machine at first and do not need to care about the job with later. We present Algorithm as follows.

*Algorithm GoS-TB*(1)Scheduled to the first machine and .(2)Let for all the jobs with .(3)Suppose that the incoming job is and ; assign job to the first machine.(4)Suppose that the incoming job is and .(4.1)If , scheduled it to the first machine.(4.2)(*Stopping criterion*). Suppose .(4.2.1)If , scheduled job and the remaining jobs with on the second machine and scheduled the remaining jobs with to the first machine. Stop.(4.2.2)If , scheduled job to the second machine, and scheduled the remaining jobs to the first machine. Stop.

Theorem 13. *The competitive ratio of Algorithm is for .*

*Proof. *Since the job with is scheduled at first and we do not need to care about them after that. We focus on the jobs with .

Assume job is the first job with to make . We prove it by the following two cases. *Case* *1* (). In this case, Algorithm schedules job and the remaining jobs with on the second machine. Therefore, and . Since , we have . *Case* *2* (). In this case, we have . Algorithm will only scheduled job on the second machine and scheduled the remaining jobs on the first machine. If , we have and . Therefore, . Otherwise, , which leads to . Hence, we have . The proof is completed.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This work is supported by National Natural Science Foundation of China under Grants 71071123, 60921003, and 71371129 and Program for Changjiang Scholars and Innovative Research Team in University under Grant IRT1173.

#### References

- H.-C. Hwang, S. Y. Chang, and K. Lee, “Parallel machine scheduling under a grade of service provision,”
*Computers and Operations Research*, vol. 31, no. 12, pp. 2055–2061, 2004. View at Publisher · View at Google Scholar · View at Scopus - A. Bar-Noy, A. Freund, and J. Naor, “On-line load balancing in a hierarchical server topology,”
*SIAM Journal on Computing*, vol. 31, no. 2, pp. 527–549, 2001. View at Google Scholar · View at Scopus - J. Ou, J. Y.-T. Leung, and C.-L. Li, “Scheduling parallel machines with inclusive processing set restrictions,”
*Naval Research Logistics*, vol. 55, no. 4, pp. 328–338, 2008. View at Publisher · View at Google Scholar · View at Scopus - M. Ji and T. C. E. Cheng, “An FPTAS for parallel-machine scheduling under a grade of service provision to minimize makespan,”
*Information Processing Letters*, vol. 108, no. 4, pp. 171–174, 2008. View at Publisher · View at Google Scholar · View at Scopus - G. J. Woeginger, “A comment on parallel-machine scheduling under a grade of service provision to minimize makespan,”
*Information Processing Letters*, vol. 109, no. 7, pp. 341–342, 2009. View at Publisher · View at Google Scholar · View at Scopus - Y. Jiang, “Online scheduling on parallel machines with two GoS levels,”
*Journal of Combinatorial Optimization*, vol. 16, no. 1, pp. 28–38, 2008. View at Publisher · View at Google Scholar · View at Scopus - A. Zhang, Y. Jiang, and Z. Tan, “Online parallel machines scheduling with two hierarchies,”
*Theoretical Computer Science*, vol. 410, no. 38–40, pp. 3597–3605, 2009. View at Publisher · View at Google Scholar · View at Scopus - J. Park, S. Y. Chang, and K. Lee, “Online and semi-online scheduling of two machines under a grade of service provision,”
*Operations Research Letters*, vol. 34, no. 6, pp. 692–696, 2006. View at Publisher · View at Google Scholar · View at Scopus - M. Liu, C. Chu, Y. Xu, and F. Zheng, “Semi-online scheduling on 2 machines under a grade of service provision with bounded processing times,”
*Journal of Combinatorial Optimization*, vol. 21, no. 1, pp. 138–149, 2011. View at Publisher · View at Google Scholar · View at Scopus - M. Liu, Y. Xu, C. Chu, and F. Zheng, “Online scheduling on two uniform machines to minimize the makespan,”
*Theoretical Computer Science*, vol. 410, no. 21-23, pp. 2099–2109, 2009. View at Publisher · View at Google Scholar · View at Scopus - X. Lu and Z. Liu, “Semi-online scheduling problems on two uniform machines under a grade of service provision,”
*Theoretical Computer Science*, vol. 489-490, pp. 58–66, 2013. View at Publisher · View at Google Scholar - Y. Wu, M. Ji, and Q. Yang, “Optimal semi-online scheduling algorithms on two parallel identical machines under a grade of service provision,”
*International Journal of Production Economics*, vol. 135, no. 1, pp. 367–371, 2012. View at Publisher · View at Google Scholar · View at Scopus - A. Zhang, Y. Jiang, L. Fan, and J. Hu, “Optimal online algorithms on two hierarchical machines with tighly-grouped processing times,”
*Journal of Combinatorial Optimization*, 2013. View at Publisher · View at Google Scholar