JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.1 (1-15)
Theoretical Computer Science ••• (••••) •••–•••
Contents lists available at ScienceDirect
Theoretical Computer Science www.elsevier.com/locate/tcs
Two-machine open shop problem with agreement graph Nour El Houda Tellache a,b , Mourad Boudhar b,∗ , Farouk Yalaoui c a b c
Central Directorate Research and Development, Sonatrach, Avenue 1st November, 35000, Boumerdes, Algeria RECITS Laboratory, Faculty of Mathematics, USTHB University, BP 32 El-Alia, Bab-Ezzouar, Algiers, Algeria Industrial Systems Optimization Laboratory, University of Technology of Troyes, 12 rue Marie Curie BP 2060, 10010, Troyes Cedex, France
a r t i c l e
i n f o
Article history: Received 9 May 2019 Received in revised form 29 July 2019 Accepted 3 September 2019 Available online xxxx Communicated by D.-Z. Du Keywords: Scheduling Open shop Agreement graphs Complexity Makespan
a b s t r a c t This paper addresses the problem of scheduling jobs on a two-machine open shop subject to constraints given by an agreement graph G, such that jobs can be processed simultaneously on different machines if and only if they are represented by adjacent vertices in G. The problem of minimizing the maximum completion time (makespan) is strongly NP-hard for three distinct values of processing times and for G being a bipartite graph. We extend the study presented in [3] and [4] to the proportionate open shop system. We first prove the NP-hardness of the case of two values of processing times and more general agreement graphs which closes definitely the complexity status of the problem. Then, we present some restricted cases that can be solved in polynomial time. We also derive new complexity results of the open shop under resource constraints and of the partition into triangles problem. © 2019 Elsevier B.V. All rights reserved.
1. Introduction The two-machine Open Shop problem with Agreement graph (OSA) which is discussed in this paper can be described as follows. The inputs consist of a finite set { J j , j = 1, . . . , n} of n jobs that has to be processed on two machines M 1 and M 2 and a simple graph G = ( V , E ) over the jobs, called the agreement graph. Each job J j consists of two operations J 1 j and J 2 j , where J i j has to be processed on machine M i for p i j ≥ 0 time units without preemption. The order in which the jobs are processed on the machines is not fixed. On the other hand, each vertex in G represents a job and two jobs can be processed at the same time on different machines (are not in conflict) if and only if they are adjacent in G. The objective is to find a schedule that minimizes the maximum completion time (makespan) given the additional constraints that (a) operations which belong to the same job and (b) operations which use the same machine cannot be processed simultaneously. in conflict and an opTwo trivial polynomial cases can be observed (a) G is an independent set, i.e. all the jobs are 2 n timal schedule is obtained by processing all the operations in disjoint time intervals, so C max = i =1 p j =1 i j (b) G is a clique, in this case the problem is reduced to the basic two-machine open shop which is solvable in polynomial time [14,11]. According to the three field classification α /β/γ of Graham et al. [12], we denote our scheduling problem by O 2| AgreeG = ( V , E )|C max , where AgreeG = ( V , E ) indicates the presence of an agreement graph G = ( V , E ) over the jobs. The proportionate processing times assumption implies that each job J j has the same processing requirement p j on each machine (p i j = p j for all jobs J j and all machines M i ); in that case, the resulting problem is called the proportionate two-machine OSA problem and it is denoted O 2| AgreeG = ( V , E ), prpt |C max .
*
Corresponding author. E-mail addresses:
[email protected] (N.E.H. Tellache),
[email protected] (M. Boudhar),
[email protected] (F. Yalaoui).
https://doi.org/10.1016/j.tcs.2019.09.005 0304-3975/© 2019 Elsevier B.V. All rights reserved.
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
2
[m3G; v1.261; Prn:12/09/2019; 11:34] P.2 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
In some practical applications, the jobs may require, besides the machines M 1 and M 2 , some additional non-sharable resources with limited capacities for their processing [5]. In this case, two jobs can be processed simultaneously on different machines if the total requirement of at least one resource does not exceed its capacity. Therefore, this problem can be modeled as a two-machine OSA problem. For more details about the correspondence between the OSA problem and the open shop under resource constraints, the interested reader is referred to [17]. To deal with additional resources, we follow the extension of Blazewicz et al. [6], of the three field notation α /β/γ , which is specified by resλσ δ , where λ, σ , δ describe respectively the number of resource types, resource availabilities and resource demands. When the operations of each job require the same amount of each resource, the setting is denoted by rest λσ δ . The rest of the paper is organized as follows. Section 2 reviews the related literature. In Section 3, we extend the study carried out on identical machines in [3] and [4] to the case of an open shop system, in which we present NP-hardness results for more general agreement graphs and at most two distinct values of processing times. Then, we discuss the relation between the proportionate OSA problem with p j = 1 and some graph problems, from which we derive the complexity of the Partition Into Triangles (PIT) on a particular 3-partite graph, where the set of edges can be partitioned into special cycles of length 6. In Section 4, we discuss some well solvable cases. New complexity results of the open shop under resource constraints will be deduced in Sections 3 and 4. Finally, Section 5 draws the main conclusions and perspectives. 2. Related literature Scheduling with agreement graph G = ( V , E ) is equivalent to scheduling with conflict graph G = ( V , E ) (complement of the agreement graph). This later has been studied first on identical machines and initially introduced by Baker and Coffman [1] in 1996. The authors considered the case of unit-time jobs (called Mutual Exclusion Scheduling) which is equivalent to finding a partition of the conflict graph into a minimum number of independent sets, each of size at most m, where m is the number of machines (see e.g. [9,2] for more results). For arbitrary processing times, the problem is NP-hard even for two machines and a complete agreement graph [10]. Thereafter, many results have been presented in the literature for particular agreement graphs and restricted processing times. For instance, Bendraouche and Boudhar extended in [3] the NP-hardness result presented in [2], for two machines and job sizes in {1, 2, 3}, to more general agreement graphs. They thoroughly closed in [4] the complexity status of the problem of scheduling with agreement graph on two identical machines with two fixed processing times. Recently, Mohabeddine and Boudhar [13] presented new complexity results in which they proved that for two machines the problem is NP-hard even if the agreement graph is a tree. They also proposed polynomial time algorithms for the cases of caterpillars and cycles agreement graphs. For more results about this problem, a detailed review can be found in [15]. For the case of dedicated machines, Tellache and Boudhar [17] studied the Open Shop problem with Conflict graph (OSC). They showed that the two-machine OSC problem with p i j ∈ {1, 2, 3} is NP-hard in the strong sense even when restricted to complements of bipartite graphs. The same result holds for the three-machine OSC problem with p i j = 1 and an arbitrary conflict graph. After that, efficient algorithms were proposed for the two-machine OSC problem with p i j ∈ {0, 1, 2}, and for the three-machine OSC problem with p i j = 1 and G being a complement of triangle-free graph. They also proved that by allowing preemption, the two-machine OSC problem becomes easy to solve for arbitrary conflict graphs. On the other hand, they found that the OSC problem is polynomially equivalent to O |rest .11|C max , from which new complexity results of the latter problem were established. They also presented a two-phase heuristic approach and lower bounds for the general m-machine OSC problem. The same authors addressed in [19] the Flow Shop problem with Conflict graph (FSC). They found that the two-machine FSC problem is NP-hard in the strong sense even when restricted to a complement of a complete split graph. They also showed that, for complements of complete bipartite graphs, the problem remains NP-hard. This later result holds even if the preemption is allowed. Then, they considered the case of unit-time operations and they showed that it is NP-hard in the strong sense. On the other hand, an O (n2.5 ) algorithm for the problem F 2|Conf G = ( V , E ), p j = 1|C max was given and graph classes on which the problem F 2|Conf G = ( V , E ), p i j = 1|C max is solvable in polynomial time were presented (where Conf G = ( V , E ) indicates the presence of a conflict graph G over the jobs). After that, they proved that the FSC problem is polynomially equivalent to F |rest .11|C max , from which new complexity results of the latter problem were established. Furthermore, heuristic approaches and lower bounds were proposed. In [18], the authors studied the FSC problem on two machines with unit-time operations. They developed a mathematical model and a branch and bound algorithm. For the same problem, Cai Y. et al. [7] presented a 4/3-approximation algorithm for an arbitrary conflict graph. For arbitrary processing times and complements of complete bipartite graphs, they established a simple 3/2-approximation algorithm. The two-machine FSC problem has been also addressed in [16], the authors proved that the permutation schedules are not dominant even for two machines and they presented a special case for which an optimal schedule can be found by a permutation schedule. Then, four Mixed Integer Linear Programming (MILP) models have been presented alongside with an experimental study. 3. NP-hardness results In this Section, we study the complexity of the problem O 2| AgreeG = ( V , E ), prpt , p j ∈ {a, 2a + b}|C max , where a ≥ 1 and 2a + b > a (i.e. b > −a) and we will consider all the cases: b = 0, b ≥ 1 and −a < b < 0. This study is an extension of the work presented in [3] and [4] to the OSA problem. For b = 0 (resp. a = 0), this corresponds to p j ∈ {a, 2a} (resp. p j ∈ {0, b})
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.3 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
3
Fig. 1. Graph G = ( V ; E ) (case: b ≥ 1, b < a).
and the problem can be solved in polynomial time as shown in [17]. Therefore, we will focus, in what follows, on the other two cases: b ≥ 1 and −a < b < 0. Let G = ( A ∪ B , E ) be an agreement graph, where the subgraph G [ A ] induced by A is an empty (edgeless) graph and the subgraph G [ B ] induced by B has a specific form, e.g. an empty, a complete or a bipartite graph, etc. Depending on the structure of G [ B ], we obtain different types of agreement graphs. For instance, if G [ B ] is an empty (resp. bipartite) graph, then G is a bipartite (resp. 3-partite) graph and when G [ B ] is a complete graph, we obtain a split agreement graph G. Theorem 1. The problem O 2| AgreeG = ( V , E ), prpt , p j ∈ {a, 2a + b}|C max is NP-hard in the strong sense for G being a graph of the form G = ( A ∪ B , E ) (defined above) and for any two distinct values a and 2a + b with b 1. Proof. The candidate used in the reduction process is the 3-dimensional matching problem (3-DM) [10]. The input consists of a set M ⊆ X × Y × Z of triples, where X , Y and Z are mutually disjoint sets having the same cardinality q. The question is: does M contain a subset M ⊆ M of q triples such that no two elements of M agree in any coordinate? The proof will be divided into three parts depending on the values of b: b < a, b > a and a = b. Case 1: b < a. Given an arbitrary instance of 3-DM, we build an instance I of our scheduling problem as follows. Let q X = {x1 , x2 , . . . , xq }, for each i ∈ {1, 2, . . . , n} let M i = {(x, y , z) ∈ M : x = xi } so that M = ∪i =1 M i . To each xi (i = 1, . . . , n) corresponds a subgraph G i = ( V i , E i ) of the agreement graph G defined as follows. Let V i = V M i ∪ V M i ∪ V M i ∪ V D i ∪ V Q i ∪ V R i be the jobs set such that | V M i | = | V M i | = | V M i | = | M i |, whereas | V D i | = | V Q i | = | V R i | = | M i | − 1. The set V M i is in correspondence with the set M i so that each element (xi , y , z) of M i is associated with a unique job J (xi , y , z) of V M i . The adjacency in G i is such that each job R ik of V Ri is adjacent to its unique corresponding job Q ik of V Q i , this latter job, in its turn, is also adjacent to its unique corresponding job D ik of V D i , k = 1, . . . , (| M i | − 1), see Fig. 1. Similarly, each job J i of V M i is adjacent to its corresponding job J i of V M J i of V M i , this latter, in its turn, is adjacent to its corresponding job i . Moreover, all the jobs of V D i are adjacent to all of the jobs of V M i . The sets V R i , V D i and V M i form each an independent set, whereas the adjacency among the vertices of B 1i = V M i ∪ V M i ∪ V Q i is such that the subgraph G i [ B 1i ] induced by B 1i q
q
has the fixed structure mentioned in the beginning of this Section. Let B 1 = ∪i =1 B 1i , V M = ∪i =1 V M i . The sets V M , VM , V R , V Q and V D are defined analogously. The rest of G is as follows. Each element y of Y (resp. z of Z ) corresponds to a unique job J y of V Y (resp. J z of V Z ). The job J y is adjacent to its unique corresponding pair of jobs { J y , J y } of V Y and V Y respectively, whereas the job J z is adjacent to a unique job J z of V Z . The latter corresponds and is adjacent to a unique pair of jobs { J z , J z } of V Z and V Z respectively (see Fig. 1). Obviously, all the previously cited seven sets have the same cardinality q. The sets V Y , V Z , V Z and V Z are independent sets, whereas the adjacency among the vertices of B 2 = V Y ∪ V Y ∪ V Z is such that the subgraph G i [ B 2 ] induced by B 2 has the fixed structure mentioned in the beginning of this Section. The last type of adjacency corresponding to xi is such that each job J (xi , y , z) (already denoted J i ) of V M i is adjacent to the job J y of V Y corresponding to the element y. Also the unique corresponding job J i of J i is adjacent to the job J z of V Z associated with the element z, see Fig. 1. The processing times of the jobs are indicated in Fig. 1, and this completes the construction of the agreement graph G. Note that the graph G satisfy the form given in the beginning of the proof since it can be written as G = ( A ∪ B , E ) where A = V R ∪ V D ∪ V M ∪ V Y ∪ V Z ∪ V Z ∪ V Z is an independent set the
JID:TCS AID:12159 /FLA
4
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.4 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
Fig. 2. Schedule of the jobs of V M and their corresponding jobs (case: b ≥ 1, b < a).
Fig. 3. Schedule of the jobs of V i − { J i , J i , J i } (case: b ≥ 1).
Fig. 4. Schedule of the Cases 1.1 and 1.2 of Lemma 2.
subgraph G [ B ] induced by B = B 1 ∪ B 2 has the fixed structure defined in the beginning of this Section. Moreover, one can verify that | A | = | B |. We show that there exists a feasible schedule σ for I with C max (σ ) ≤ (2(5a + 2b)| M | + 4aq) if and only if 3-DM has a solution. Suppose that 3-DM has a solution and let M be the required subset of M. We construct a feasible schedule σ for I as follows. Let V M = { J 1 , J 2 , ..., J q } be the subset of V M corresponding to M such that J i ∈ V M i (i = 1, . . . , q). We schedule these jobs along with their corresponding jobs of the sets V Y , V M , VM and V Z , as well as the jobs of the sets V Y , V Y , V Z , V Z and V Z into q time intervals of length 2(7a + 2b) as indicated in Fig. 2. Then, for each i (i = 1, . . . , q), we schedule the jobs of V i − { J i , J i , J i } in a time interval of length 2(5a + 2b) as shown in Fig. 3. By scheduling the jobs of all sets
V i − { J i , J i , J i } successively without idle times, followed by the jobs of V M with their corresponding jobs, we obtain a
feasible schedule
σ for I with C max (σ ) =
q
i =1
2(| Mi | − 1)(5a + 2b) + 2q(7a + 2b) = 2(5a + 2b)| M | + 4qa.
Conversely, assume that there exists a feasible schedule σ for I with C max (σ ) ≤ (2(5a + 2b)| M | + 4qa). Since the processing times of all the jobs sum up to 2(5a + 2b)| M | + 4qa on both machines, then there is no idle time on M 1 and M 2 whatsoever. We claim that for every i (i = 1, . . . , q), there are (| M i | − 1) 6-tuples of the form {R ik , Q ik , D ik , an operation of a job J i of the set V M i , Ji, J i } which must be scheduled in a time interval of length 5a + 2b as shown in Fig. 3.(a). To prove this claim, we shall need the following Lemma. Lemma 2. If there exists a feasible schedule σ for I with C max (σ ) ≤ (2(5a + 2b)| M | + 4qa), then the operation Q ik is processed in parallel only with its corresponding operations R ik and D ik . Proof. Since there is no idle time on both machines, the operation of R ik on M 1 has to be processed simultaneously with the operation of its corresponding job Q ik on M 2 . The latter operation can be processed in parallel with its corresponding operation D ik and with some operations from B. Three cases may occur: Case 1.1: Schedule Q ik with R ik and with some operations of B as shown in Fig. 4.(a). The remaining time is at most 2(5a + 2b)| M | + 4aq − (2a + b) = 10a| M | + 4b| M | + 4aq − 2a − b time units. We have at least the following conflicting operations left: 2(| M | − q) − 1 of V R , 2(| M | − q) of V D , 2| M | of V M and 2q operations of each of the sets V Y , V Z , V Z and V Z . These
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.5 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
5
operations require (2(| M | − q) − 1)a + (2(| M | − q))(2a + b) + 2| M |(2a + b) + 2q(2a + b) + 6aq = 10a| M | + 4b| M | + 4aq − a time units. Since 10a| M | + 4b| M | + 4aq − a > 10a| M | + 4b| M | + 4aq − 2a − b, then the remaining conflicting operations cannot be fitted in the time left and this case cannot occur. Case 1.2: Schedule Q ik with its corresponding operations R ik and D ik and with some operations of B as depicted in Fig. 4.(b). Since there is no idle time on both machines, D ik has to be processed with the operation of a job J i of V M i on M 2 . Let t > 0 be the amount of time in which Q ik is processed simultaneously with the operation of B. We have at most 10a| M | + 4b| M | + 4aq − 3a − b − t time units left, whereas the time required by the remaining conflicting operations equals at least 10a| M | + 4b| M | + 4aq − 3a − b time units. Therefore, this case cannot occur since t > 0. Case 1.3: Schedule Q ik with only its corresponding operations D ik and R ik as shown in Fig. 3.(a), which is the only possible case and the Lemma follows. 2 Now, to avoid idle times, the operation of D ik on M 1 has to be processed with the operation of a job J i of V M i on M 2 . This latter can be scheduled in parallel with its corresponding operations J y and J i or with an operation of B. Recall that J i is adjacent in G to exactly two jobs; J i and J i of V M i and V M J i on M 1 is (2a + b), i respectively. The processing time of
the time left of J i on M 2 is (a + b) and the processing time of J i on M 2 is a. Therefore, the only possible configuration, to avoid idle times, is to schedule J i in parallel with J i and with the remaining part of J i , as depicted in Fig. 3.(a) and this completes the proof of the claim. Following the same process, we schedule the remaining operations of Q ik , R ik , D ik , an operation of one job J i∗ of the set V M i (not necessarily the same as J i ), J i∗ and J i∗ as depicted in Fig. 3.(b) by replacing in this figure J i , J i and J i with J i∗ , J i∗ and J i∗ respectively. We are left with one operation on each machine of each of the sets V M i , V M i and V M i and with q jobs of each of the sets V Y , V Y , V Y , V Z , V Z , V Z and V Z . Let J z , J z , J z and J z be the jobs of V Z , V Z , V Z and V Z respectively associated with the element z of Z and let J y , J y and J y be the jobs of V Y , V Y and V Y respectively associated with the element y of Y . Since there is no idle time on both machines, the operation of J z (resp. J y ) on M 1 is adjacent to exactly one of the remaining operations of V M (resp. V M ) on M 2 . Otherwise, there exists another operation of V Z (resp. V Y ) to be processed on M 1 that has not a corresponding operation in V M (resp. V M ) on M 2 and this will induce an idle time opposite to the former operation. We have:
1. The operations of J z and J z on M 1 have to be processed simultaneously with the operation of J z on M 2 . On the other hand, J z can be processed in parallel with J z and with its corresponding operation J i of V M . If we schedule the operation of J z on M 1 in parallel with J z , we are left with at least (a − b) time units of J z on M 1 that should be processed simultaneously with J i . Therefore, we have at most b time units remaining on Ji. 2. The operation J y to be processed on M 1 can be scheduled with its corresponding operations J y and J y and with its corresponding operation J i of V M i . If we process the operation of J y on M 1 in parallel with J y and J y , we are left with at least b time units of J y on M 1 that has to be scheduled in parallel with J i . Hence, we are left with at most 2a time units on J i . 3. The operation J i of V M i to be processed on M 1 can be processed in parallel with its corresponding operations J i and
J i of V M i and V M i respectively. The sum of the processing time left on the latter two operations equals at most 2a + b time units.
From 1, 2 and 3, it follows that the only possible configuration is the one depicted in Fig. 2.(a). We can observe that the operations of J 1 , . . . , J q on M 2 correspond to a subset M ⊆ M with q elements that represents a solution of 3-DM. The remaining operations are scheduled similarly by reversing the roles of the two machines as shown in Fig. 2.(b) by replacing J i , J i and J i with J i , J i and J i respectively. If the sets { J i , i = 1, . . . , q} and { J i , i = 1, . . . , q} are different, we obtain another solution of 3-DM from the second set. The reduction used is polynomial, which completes the proof of the first case. Case 2: b > a. Given an arbitrary instance of 3-DM, we build an instance I of our scheduling problem similar to that of Case 1 with the following changes. The sets of jobs corresponding to Z are still V Z , V Z , V Z and V Z but here, each element z of Z corresponds to a unique job J z of V Z , which itself corresponds and is adjacent to the unique triplet of jobs { J z , J z , J z } of V Z , V Z and V Z respectively. The processing time of the operations of V Z is 2a + b, whereas the processing time of the operations of V Z , V Z et V Z is a. Furthermore, V Z is a subset of B rather than V Z (where B 2 = B 21 ∪ B 22 ) and it is the job J i which is adjacent to the corresponding job J z of V Z and not the job J i as in the previous case, see Fig. 5. We have also | A | = | B |. Next, we prove that 3-DM has a solution if and only if there exists a feasible schedule σ for I with makespan C max (σ ) ≤ (2(5a + 2b)| M | + 4aq). By the same argument as in Case 1, one can show that if 3-DM has a solution, then there exists a feasible schedule σ for I with makespan C max (σ ) ≤ (2(5a + 2b)| M | + 4aq). Note that the analogous figure of Fig. 2 is Fig. 6. Fig. 3 is valid for the two Cases 1 and 2.
JID:TCS AID:12159 /FLA
6
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.6 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
Fig. 5. Graph G = ( V ; E ) (case: b ≥ 1, b > a).
Fig. 6. Schedule of the jobs of V M and their corresponding jobs (case: b ≥ 1, b > a).
Conversely, suppose that there exists a feasible schedule σ for I with C max (σ ) ≤ (2(5a + 2b)| M | + 4aq). Since the total processing time of jobs on each machine is 2(5a + 2b)| M | + 4aq, then there is no idle time on both machines and C max (σ ) = (2(5a + 2b)| M | + 4aq). We claim that for every i (i = 1, . . . , q), there are (| M i | − 1) 6-tuples of the form {R ik , Q ik , D ik , an operation of a job J i of the set V M i , Ji, J i } which must be scheduled in a time interval of length 5a + 2b as shown in Fig. 3.(a). Following the same arguments of the proof of Lemma 2, we can show that, to avoid idle times, the operation of Q ik on M 2 should be processed in parallel only with R ik and D ik . The next Lemma establishes the second part of the claim. Lemma 3. Let J i be the job that is processed in parallel with D ik . If there exists a feasible schedule σ for I with C max (σ ) ≤ (2(5a + 2b)| M | + 4qa), then the operation J i should be scheduled simultaneously only with its corresponding operations J i and Ji. Proof. We proceed by contradiction. Suppose that the operation of J i on M 2 is not processed in parallel with the operation of J i on M 1 , then this latter should be scheduled in parallel only with its corresponding operations of J i and J z . Since there is no idle time on both machines, the operations of J z , J z and J z should be processed in parallel with their corresponding operation of J z . We are left with b − a time units on this latter operation. If we schedule this part and the operation of Ji in parallel with J i , then an idle time of at least 2a time units occurs opposite to J i , which is a contradiction. J i , J i can be scheduled simultaneously with its corresponding operation J y and with some jobs of B. Now, besides Since the processing time of J y is 2a + b, we cannot process this operation in parallel with J i , otherwise J i cannot be scheduled in parallel with J i . Another case that may occur is the one depicted in Fig. 7. In this case, we have at most 10a| M | + 4b| M | + 4aq − 6a − 2b time units left. We have at least the following conflicting operations left: 2(| M | − q) − 1 of V R , 2(| M | − q) − 1 of V D , 2| M | − 1 of V M and 2q operations of each of the sets V Y , V Z , V Z and V Z . These operations require (2(| M | − q) − 1)a + (2(| M | − q) − 1)(2a + b) + (2| M | − 1)(2a + b) + 2q(2a + b) + 6aq = 10a| M | + 4b| M | + 4aq − 5a − 2b time units. This case cannot occur since the time left is less than the time required by the conflicting operations. J i . The time left on the latter Hence, the only possible case is to process the remaining part of J i simultaneously with operation is a units, this operation can be processed either with J i or J z . Suppose that we schedule the operation of J i on M 1 in parallel with the operation of J z on M 2 , this latter operation should be processed in parallel with its corresponding operations of J z , J z and J z on M 1 to avoid idle times. Depending on the values of a and b, three cases may occur:
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.7 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
7
Fig. 7. Schedule of J i in parallel with some operation of B (case: b ≥ 1, b > a).
Fig. 8. Schedule of J i in parallel with J z (case: b ≥ 1, b > a).
Case 2.1: b < 2a. This case is not possible since we have an idle time opposite to one of the operations J z , J z and J z as shown in Fig. 8.(a). Case 2.2: b > 2a. This case is depicted in Fig. 8.(b). The time required by the remaining conflicting operations equals at least 10a| M | + 4b| M | + 4aq − 8a − 2b time units, whereas the processing time of the operations that may fit in the idle times generated by the conflicting operations is at most 10a| M | + 4b| M | + 4aq − 6a − 3b units (remaining operations of B). Since 10a| M | + 4b| M | + 4aq − 6a − 3b < 10a| M | + 4b| M | + 4aq − 8a − 2b for b > 2a, then this case cannot occur. Case 2.3: b = 2a. This case is given in Fig. 8.(c). Suppose that we have scheduled all the jobs of V R , we are left on each machine with q operations of each of the sets V M and V M and at most q − 1 operations of each of the sets V Z , V Z , V Z and V Z . Thus, there exists at least one operation of V M in which the corresponding operation in V Z has been already processed or there exist at least two operations of V M that are associated with the same element of Z . We denote in this paragraph, without loose of generality, one of these operations by J i and let J y be its corresponding operation of V y . If we process J y and J y in parallel with J y , we have at least b time units left on J y that has to be processed in parallel with its corresponding operation J i of V M . The remaining time on the latter operation equals at most 2a units. By scheduling this part and the corresponding operation J i of V M in parallel with J i , we are left with at least a time units on J i that has to be processed simultaneously with the remaining part of its corresponding operation of V Z . Therefore, an idle time will occur opposite to J i , if its corresponding operation in V Z has been already processed. If J i and another operation of V M are associated with the same element of Z , then an idle time will occur opposite to one of these operations since we have a time units left on each operation of V Z after scheduling its corresponding operations of V Z , V Z and V Z . Hence, this case is also not possible. J i on M 1 in parallel with the operation of J i on M 2 as Therefore, the only possible case is to schedule the operation of shown in Fig. 3.(a), and this completes the proof of the Lemma. 2 Following the same process, we schedule the remaining operations of Q ik , R ik , D ik , an operation of one job J i∗ of the set
V M i (not necessarily the same as J i ), J i∗ and J i∗ as depicted in Fig. 3.(b) by replacing in this figure J i , J i and J i with J i∗ ,
J i∗ and J i∗ respectively.
We are left with one operation on each machine of each of the sets V M i , V M i and V M i and with q jobs of each of the sets V Y , V Y , V Y , V Z , V Z , V Z and V Z . Since there is no idle time on both machines, we have: 1. The operations J z , J z and J z associated with the element z of Z (of V Z , V Z and V Z resp.) to be processed on M 1 have to be scheduled simultaneously with the operation of J z on M 2 . We are left with b − a time units on J z . 2. The operation J y (of V Y ) associated with y of Y to be processed on M 1 can be scheduled with its corresponding operations J y and J y (of V Y and V Y resp.) and with its corresponding operation J i of V M i . If we schedule J y in parallel with J y and J y , we are left with at least b time units on J y that should be processed in parallel with J i . Therefore, we have at most 2a time units remaining on J i .
JID:TCS AID:12159 /FLA
8
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.8 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
Fig. 9. Graph G = ( V ; E ) (case: b ≥ 1, b = a).
Fig. 10. Schedule of the jobs of V M and their corresponding jobs (case: b ≥ 1, b = a).
Fig. 11. Schedule of the jobs of V i − { J i , J i } (case: b ≥ 1, a = b).
3. The operation J i (of V M ) to be processed on M 1 can be scheduled simultaneously with its corresponding operations J i , J z and J i (of V M , V Z and V M resp.). If we process J i in parallel with J i , then we are left with at least a + b time units on Ji. From 1, 2 and 3, the only possible configuration is the one given in Fig. 6.(a). We can observe that the operations of J 1 , . . . , J q on M 2 correspond to a subset M ⊆ M with q elements that represents a solution of 3-DM. The remaining
operations are scheduled similarly by reversing the roles of the two machines as shown in Fig. 6.(b) by replacing J i , J i
and J i with J i , J i and J i respectively. If the sets { J i , i = 1, . . . , q} and { J i , i = 1, . . . , q} are different, we obtain another solution of 3-DM from the second set. The reduction used is polynomial, which completes the proof of the second case. Case 3: b = a. From an arbitrary instance of 3-DM, we build an instance I of our scheduling problem as shown in Fig. 9. The processing times of the operations are a and 3a. We have | V D i | = | V Li | = | V Ri | = | V Q i | = | M i | − 1, | V M i | = | V M i | = | M i | and q
| V Y | = | V Z | = q. Furthermore, A = V D ∪ V L ∪ V Q ∪ V M ∪ V Y ∪ V Z and B = ∪i =1 B i = V R ∪ V M . The processing times and the
agreement constraints are given in Fig. 9. We show that there exists a feasible schedule σ for I with C max (σ ) ≤ 6a(2| M | − q) if and only if 3-DM has a solution. Suppose that 3-DM has a solution M . We construct a feasible schedule σ for I as shown in Figs. 10 and 11, where the first diagram concerns the schedule of the jobs corresponding to M along with their corresponding jobs and the second represents the schedule of the remaining jobs. Conversely, assume that there exists a feasible schedule σ for I with C max (σ ) ≤ 6a(2| M | − q). Since the processing times of all the jobs sum up to 6a(2| M | − q) on each machine, then there is no idle time on M 1 and M 2 whatsoever. We claim
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.9 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
9
Fig. 12. Graph G = ( V ; E ) (case: a ≥ 1, −a < b < 0).
that for every i (i = 1, . . . , q), there are (| M i | − 1) 6-tuples of the form {D ik , R ik , L ik , Q ik , an operation of a job J i of the set V M i , J i } which must be scheduled in a time interval of length 6a as shown in Fig. 11.(a). Since there is no idle time on both machines, the operations of D ik and L ik on M 1 should be processed in parallel with their corresponding operation R ik . This latter can be scheduled simultaneously either with its corresponding operation Q ik of V Q i or with an operation of B. If we process R ik in parallel with an operation of B, we have at most 12a| M | − 6aq − 3a time units left. On the other hand, we have at least the following conflicting operations left: 2(| M | − q) − 1 of V D , 2(| M | − q) − 1 of V L , 2(| M | − q) of V Q , 2| M | of V M and 2q operations of each of the sets V Y and V Z . These operations require (2(| M | − q) − 1)a + (2(| M | − q) − 1)a + 2(| M | − q)(3a) + 2| M |a + 4aq = 12a| M | − 6aq − 2a time units. This case cannot occur since the time left is less than the time required by the conflicting operations. Similarly, we can show that the case in which the remaining part of R ik is scheduled in parallel with Q ik and with an operation of B cannot occur. Therefore, the only possible case is to process R ik in parallel with its corresponding operation Q ik . This latter, in its turn, has to be scheduled simultaneously with an operation J i of V M i , we are left with a time units on J i . Since the operation of J i requires a time units and can be processed in parallel only with J i , the only possible configuration is the one given in Fig. 11.(a) and the claim follows. Following the same process, we schedule the remaining operations of D ik , R ik , L ik , Q ik , an operation of one job J i∗ of the set V M i (not necessarily the same as J i ) and J i∗ as depicted in Fig. 11.(b) by replacing in this figure J i , J i and J i with
J i∗ , J i∗ and J i∗ respectively. We are left with one operation on each machine of each of the sets V M i and V M i and with q jobs of each of the sets V Y and V Z . One can verify without ambiguity that the remaining operation should be scheduled as shown in Fig. 10. Therefore, 3-DM has at least one solution given in Fig. 10.(a). Another solution of 3-DM can be obtained if the operations of V M scheduled in Fig. 10.(b) are different from the operations of V M scheduled in Fig. 10.(a). This completes the proof of Theorem 1. 2 In the following theorem, we consider the last case when −a < b < 0. Theorem 4. The problem O 2| AgreeG = ( V , E ), prpt , p j ∈ {a, 2a + b}|C max is NP-hard in the strong sense for G being a graph of the form G = ( A ∪ B , E ) (defined above) and for any two distinct values a and 2a + b such that −a < b < 0. Proof. We prove this result by means of a reduction from 3-DM. This proof is similar to that of Theorem 1 with some changes in the instance of the scheduling problem. Given an arbitrary instance of 3-DM, we construct an instance I of our scheduling problem as shown in Fig. 12. We have | V Ri | = | V Q i | = | V Di | = | V Li | = | M i | − 1, | V M i | = | V M i | = | M i | and q
| V Y | = | V Z | = | V Z | = | V Z | = q. On the other hand, B = V R ∪ V D ∪ V M ∪ V Z ∪ V Z , A 1i = V Q i ∪ V Li ∪ V M i , A 1 = ∪i =1 A 1i , A 2 = V Y ∪ V Z and A = A 1 ∪ A 2 . Observe that | A | = | B |. The processing times and the agreement constraints are given in Fig. 12. We show that there exists a feasible schedule σ for I with C max (σ ) ≤ 2(4a + b)| M | if and only if 3-DM has a solution. Suppose that 3-DM has a solution and let M be the required subset of M. We schedule the jobs associated with M and their corresponding jobs as shown in Fig. 13. The schedule of the remaining jobs is given in Fig. 14.
JID:TCS AID:12159 /FLA
10
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.10 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
Fig. 13. Schedule of the jobs of V M and their corresponding jobs (case: a ≥ 1, −a < b < 0).
Fig. 14. Schedule of the jobs of V i − { J i , J i } (case: a ≥ 1, −a < b < 0).
Fig. 15. Schedule of Q ik in parallel with R ik and D ik (case: a ≥ 1, −a < b < 0).
Conversely, suppose that there exists a feasible schedule σ for I with C max (σ ) ≤ 2(4a + b)| M |. Since the processing times of all the jobs sum up to 2(4a + b)| M | on both machines, then there is no idle time on M 1 and M 2 whatsoever. We claim that for every i (i = 1, . . . , q), there are (| M i | − 1) 6-tuples of the form {R ik , Q ik , D ik , L ik , an operation of a job J i of the set V Mi , J i } which must be scheduled in a time interval of length 4a + b as shown in Fig. 14.(a). To prove this claim we need the following Lemma. Lemma 5. If there exists a feasible schedule σ for I with C max (σ ) ≤ 2(4a + b)| M |, then the operation R ik (resp. D ik ) is processed in parallel only with its corresponding operation Q ik (resp. Q ik and L ik ). Proof. Since there is no idle time on both machines, the operation of Q ik on M 2 has to be processed simultaneously with the operations of its corresponding jobs R ik and D ik . Furthermore, D ik (resp. R ik ) can also be processed in parallel with its corresponding operation L ik and with some operations from B (resp. with some operations from B). Three cases may occur: Case 4.1: Schedule R ik and D ik in parallel with Q ik and with some operations from B as shown in Fig. 15.(a). The remaining time equals at most 2(4a + b)| M | − 2a = 8a| M | + 2b| M | − 2a time units. We have at least the following conflicting operations left: 2(| M | − q) − 1 of V Q , 2(| M | − q) of V L , 2| M | of V M and 2q operations of each of the sets V Y , and V Z . These operations require (2(| M | − q) − 1)(2a + b) + (2(| M | − q))a + 2| M |a + 2aq + 2q(2a + b) = 8a| M | + 2b| M | − 2a − b time units. Therefore, this case cannot occur since the remaining conflicting operations cannot be fitted in the time left. Case 4.2: Schedule R ik in parallel with Q ik and with some operations from B and schedule D ik in parallel with its corresponding operations Q ik and L ik as depicted in Fig. 15.(b). Since there is no idle time on both machines, the operation of L ik on M 2 has to be processed in parallel with the operation of a job J i of V M i . Let t > 0 be the amount of time in which R ik is processed simultaneously with the operation of B. We have at most 8a| M | + 2b| M | − 3a − b − t time units left, whereas the time required by the remaining conflicting operations equals at least 8a| M | + 2b| M | − 3a − b time units. Therefore, this case cannot occur since t > 0. Case 4.3: The last possible case occurs when t (given in Case 4.2) equals 0 as shown in Fig. 14.(a), which is the only possible configuration and the Lemma follows. 2 Now, we are left with a time units on J i that can be processed in parallel either with its corresponding operation J y or with J i . If we schedule the operation of J i in parallel with J y , the operation of J i will be superposed with its corresponding
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.11 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
11
operation of J z and an idle time of a + b units opposite to J z will occur. Therefore, the operation of J i on M 1 should be scheduled in parallel with its corresponding operation J i as depicted in Fig. 14.(a) and this completes the proof of the claim. Following the same process, we schedule the remaining operations of R ik , Q ik , D ik , L ik , an operation of a job J i∗ of the set V M i (not necessarily the same as J i ), J i∗ as depicted in Fig. 14.(b) by replacing, in this figure, J i and J i by J i∗ and
J i∗ respectively.
We are left with one operation on each machine of each of the sets V M i and V M i and with q jobs of each of the sets V Y , V Z , V Z and V Z . Since there is no idle time on both machines, the operation of J y of V Y to be processed in M 2 is adjacent to exactly one of the remaining operations of V M to be processed on M 1 . Otherwise, there exists another operation of V Y to be processed on M 2 that has not a corresponding operation in V M to be processed on M 1 and this will induce an idle time opposite to the former operation. We have: 1. The operation J y of V Y to be processed on M 2 have to be scheduled simultaneously with its corresponding operation J i of V M i . We are left with a + b time units on J i . 2. The operation J z of V Z to be processed on M 2 can be scheduled in parallel with its corresponding operations J z and J z of V Z and V Z respectively. If we schedule J z in parallel with J z , we are left with at least a + b time units on J z that should be processed in parallel with J z . Therefore, we have at most (−b) time units remaining on J z . J i of V M 3. The operation i to be processed on M 2 can be scheduled simultaneously with its corresponding operations J i and J z . The sum of the remaining processing times on the latter two operations equals at most a units and the processing time of the operation of J i is equal to a units. From 1, 2 and 3, the only possible configuration is the one given in Fig. 13.(a). The remaining operations are scheduled similarly by reversing the roles of the two machines as shown in Fig. 13.(b), where the operations of V M and V M are not necessary the same as in Fig. 13.(a). We can observe that the operations of J 1 , . . . , J q on M 1 correspond to a subset M ⊆ M with q elements that represents a solution of 3-DM. Another solution of 3-DM can be obtained if the operations of V M scheduled in Fig. 13.(b) are different from the operations of V M scheduled in Fig. 13.(a). The reduction used is polynomial, which completes the proof of this Theorem. 2 As a consequence of the two previous theorems, we obtain the following results. Corollary 6. The O 2| AgreeG = ( V , E ), prpt , p j ∈ {a, 2a + b}|C max problem is NP-hard in the strong sense for any two distinct values a and 2a + b with b = 0. Corollary 7. The O 2|rest .11, prpt , p j ∈ {a, 2a + b}|C max problem is NP-hard in the strong sense for any two distinct values a and 2a + b with b = 0. Proof. It has been shown in [17] that the OSA problem is polynomially equivalent to the problem O |rest .11|C max . From this equivalence and Corollary 6, the result follows. 2 When the jobs of the proportionate OSA problem have the same processing time, the scheduling problem can be seen as a graph theory problem. For O 2| AgreeG = ( V , E ), prpt , p j = 1|C max , it has been shown in [17] that this problem corresponds exactly to a maximum matching in a bipartite graph constructed from the agreement graph G, and therefore can be solved in polynomial time. For the case of three machines, it has been shown in [17] that O 3| AgreeG = ( V , E ), prpt , p j = 1|C max is NP-hard in the strong sense. Let us define the graph problem associated with the latter problem. Given an arbitrary instance I of the previous problem, we construct a 3-partite graph R = ( V 1 ∪ V 2 ∪ V 3 , U ) as follows (see Fig. 16):
• Each operation J i j of I is associated with a vertex v i j in V i , i ∈ {1, 2, 3}, j ∈ {1, . . . , n}. • For each two jobs J l and J k , such that { J l , J k } ∈ E, we construct a cycle in R of length 6 of the form { v 1l , v 2k , v 3l , v 1k , v 2l , v 3k , v 1l }. Observe that the graph R has the following characteristics. Remark 1. Every vertex of R has even degree. Proof. Since the set U can be partitioned into cycles and the degree of any vertex in a cycle is 2, it follows that the vertices of R have even degree. 2 Remark 2. The vertices v 1 j , v 2 j and v 3 j form an independent set, ∀ j = 1, . . . , n.
JID:TCS AID:12159 /FLA
12
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.12 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
Fig. 16. (a) conflict graph G = ( V , E ). (b) the 3-partite graph R = ( V 1 ∪ V 2 ∪ V 3 , U ) constructed from G. (c) a feasible schedule for the jobs of G.
Fig. 17. Construction of the network graph of Theorem 9: (a) agreement graph G. (b) processing times. (c) network N = ( V , U c , C ) associated.
Proof. Since U can be partitioned into cycles of length 6 of the form { v 1l , v 2k , v 3l , v 1k , v 2l , v 3k , v 1l } for l = k, then v 1l , v 2l and v 3l cannot be adjacent and the same for v 1k , v 2k and v 3k . In other words, there is no edge between any two vertices v aj and v bj with a = b and a, b = 1, . . . , 3 for all j = 1, . . . , n and the Remark follows. 2 We have not been able to locate any results in the literature regarding the complexity of the partition into triangles on the particular 3-partite graph R (this problem is denoted P3P-PIT). PIT is known to be NP-hard in the strong sense for arbitrary 3-partite graphs [10]. Van Rooij, Van Kooten Niekerk and Bodlaender [20] proved that PIT problem is polynomial-time solvable on graphs of maximum degree three, but graph R may have vertices of degree greater than 3. They also established ´ ´ Klinz and Woeginger [8] NP-hardness results for 4-regular graphs, however their graphs are not 3-partite. Recently, Custi c, showed that PIT on 6-regular 3-partite graphs is NP-hard, but their graph is an arbitrary 6-regular 3-partite graph.
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.13 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
13
Theorem 8. P3P-PIT is NP-hard in the strong sense. Proof. From the construction of R, it follows that P3P-PIT is polynomially equivalent to the problem O 3| AgreeG =
( V , E ), prpt , p j = 1|C max . Since the latter problem is strongly NP-Hard [17], the Theorem follows. 4. Polynomial cases We present, in what follows, some restricted cases that can be solved in polynomial time.
Theorem 9. For an arbitrary agreement graph, the two-machine OSA problem can be solved in O (n3 ) when the processing times of the operations on one of the machines are in {0, 1}. Proof. Let I be an instance of the OSA problem given above and G = ( V , E ) be the agreement graph associated. We suppose without loose of generality that the processing times of the operations of M 1 are in {0, 1}. Let V i = { J i1 , . . . , J in } be the set of operations to be executed on machine M i with non null processing times. We consider the following algorithm: Algorithm 1 Two-machine OSA problem with p i j ∈ {0, 1} on one of the machines. Input: the data of the instance I . 1: Construct the network N = ( V , U c , C ) as follows (see Fig. 17): V = V 1 ∪ V 2 ∪ {s, p }, where s is the source vertex and p is the sink vertex. U c = U 1 ∪ U 2 ∪ U 3 ∪ {u r }, where U 1 = {(s, J 1 j ) : J 1 j ∈ V 1 }, U 2 = {( J 2 j , p ) : J 2 j ∈ V 2 }, U 3 = {( J 1l , J 2k ), ( J 1k , J 2l ) ∈ V 1 × V 2 : { J l , J k } ∈ E } and u r = ( p , s) is a return arc. 2: Associate to the arcs of U 1 and U 3 a limited capacity that is equal one. For ( J 2 j , p ) ∈ U 2 , set C ( J 2 j , p ) = p 2 j . C (u r ) = +∞. 3: Determine a maximum flow f in the network N. 4: Schedule the operations J 2 j , j = 1, . . . , n, in any order. 5: Schedule each operation J 1k simultaneously with J 2l if f ( J 1k , J 2l ) = 1. 6: Schedule the remaining operations of V 1 in the time interval [ p2 j , p 2 j + | V 1 | − f (u r )]. Output: The optimal schedule
σ with C max (σ ) =
It is clear that the schedule
J 2 j ∈V 2
J 2 j ∈V 2
J 2 j ∈V 2
p 2 j + | V 1 | − f (u r ) .
σ obtained from Algorithm 1 is feasible. We have C max (σ ) =
J 2 j ∈V 2
p 2 j + | V 1 | − f (u r ). Since
f is a maximum flow in N, then C max (σ ) is at its minimum value and the obtained schedule is optimal. A maximal flow can be found in O (n3 ) time and the theorem follows. 2 Corollary 10. The O 2|rest .11|C max problem can be solved in O (n3 ) when the processing times of the operations of one of the machines are in {0, 1}. Proof. It has been shown in [17] that the OSA problem is polynomially equivalent to the problem O |rest .11|C max . From this equivalence and Theorem 9, the result follows. 2 Theorem 11. For an arbitrary bipartite agreement graph G = ( S 1 , S 2 ; E ), the two-machine OSA problem can be solved in O (n3 ) when the processing times of the operations of one of the sets S 1 and S 2 are in {0, 1}. Proof. Let I be an instance of the OSA problem given above and G = ( S 1 , S 2 ; E ) be the agreement graph associated. We suppose without loose of generality that the processing times of the operations of S 1 are in {0, 1}. Let V i = { O i1 , . . . , O i | V i | } be a set containing all the operations of the jobs of S i with non null processing times. We consider the following algorithm: Algorithm 2 Two-machine OSA problem with G = ( S 1 , S 2 ; E ) and p i j ∈ {0, 1} on S 1 . Input: the data of the instance I . 1: Construct the network N = ( V , U c , C ) as follows (see Fig. 18): V = V 1 ∪ V 2 ∪ {s, p }, where s is the source vertex and p is the sink vertex. U c = U 1 ∪ U 2 ∪ U 3 ∪ {u r }, where U 1 = {(s, O 1 j ) : O 1 j ∈ V 1 }, U 2 = {( O 2 j , p ) : O 2 j ∈ V 2 } and u r = ( p , s) is a return arc. For each couple of jobs { J l , J k } ∈ E, add two arcs in U 3 from V 1 to V 2 between the operations of J l and J k of two different machines. 2: Associate to the arcs of U 1 and U 3 a limited capacity that is equal to one. For ( O 2 j , p ) ∈ U 2 , set C ( O 2 j , p ) = p O 2 j , where p O 2 j is the processing time of the operation O 2 j . C (u r ) = +∞. 3: Find a maximum flow f in the network N. 4: Schedule the operations of V 2 on their respective machines in disjoint time intervals. 5: Schedule each operation O 1k of V 1 concurrently with O 2l of V 2 if f ( O 1k , O 2l ) = 1. 6: Schedule the remaining operations of V 1 on their respective machines in the time interval [ pO2j , p O 2 j + | V 1 | − f (u r )]. Output: The optimal schedule
σ with C max (σ ) =
O 2 j ∈V 2
O 2 j ∈V 2
p O 2 j + | V 1 | − f (u r ) .
O 2 j ∈V 2
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.14 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
14
Fig. 18. Construction of the network graph of Theorem 11: (a) agreement graph G. (b) processing times. (c) network N = ( V , U c , C ) associated.
Similarly to the previous theorem, one can verify that the schedule σ obtained from Algorithm 2 is feasible. We have C max (σ ) = p O 2 j + | V 1 | − f (u r ). Since f is a maximum flow in N, then C max (σ ) is at its minimum value and the O 2 j ∈V 2
obtained schedule is optimal. A maximal flow can be found in O (n3 ) time and the theorem follows.
2
5. Conclusion We studied in this paper the problem of scheduling with agreement graph in a two-machine open shop. We extended the NP-hardness of this problem which closes the complexity status for two distinct values of processing times and more general agreement graphs. Indeed, we showed that for p j ∈ {a, 2a + b} (b = 0), the proportionate two-machine OSA problem is NP-hard in the strong sense even for G being a graph of the form G = ( A ∪ B , E ), where G [ A ] is an empty graph and G [ B ] has a specific form (e.g. empty, complete, bipartite, etc). Thus, G can be bipartite, 3-partite, split graph, etc. We also discussed the relation between the proportionate OSA problem with p j = 1 and some graph problems; we have found that the partition into triangles on a particular 3-partite graph, where the set of edges can be partitioned into special cycles of length 6, is NP-hard in the strong sense. On the other hand, we showed that, when the operations of one of the machines require one unit of processing time, the problem can be solved in O (n3 ) for arbitrary agreement graphs. Moreover, when the agreement graph is a bipartite graph G = ( S 1 , S 2 ; E ) and the operations of one of the sets S 1 and S 2 have one unit of processing time, the problem can also be solved in O (n3 ). From these results, new complexity results of the two-machine open shop problem under resource constraints have been derived. For future perspectives, more research is needed concerning the complexity of the OSA problem when restricted to other particular graphs. It would be interesting also to design other polynomial cases and develop efficient algorithms to solve the general problem. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgement This research is funded in part by the Chaire Connected Innovation (https://chaire-connected-innovation.fr/). References [1] [2] [3] [4] [5] [6]
B.S. Baker, E.G. Coffman, Mutual exclusion scheduling, Theor. Comput. Sci. 162 (1996) 225–243. M. Bendraouche, M. Boudhar, Scheduling jobs on identical machines with agreement graph, Comput. Oper. Res. 39 (2012) 382–390. M. Bendraouche, M. Boudhar, Scheduling with agreements: new results, Int. J. Prod. Res. 54 (2015) 3508–3522. M. Bendraouche, M. Boudhar, A. Oulamara Scheduling, Agreement graph vs resource constraints, Eur. J. Oper. Res. 240 (2015) 355–360. J. Blazewicz, W. Cellary, R. Slowinski, J. Weglarz, Scheduling under resource constraints-deterministic models, Ann. Oper. Res. 7 (1986). J. Blazewicz, J.K. Lenstra, A.H.G. Rinnooy Kan, Scheduling subject to resource constraints: classification and complexity, Discrete Appl. Math. 5 (1983) 11–24. [7] Y. Cai, G. Chen, Y. Chen, R. Goebel, G. Lin, L. Liu, A. Zhang, Approximation algorithms for two-machine flow-shop scheduling with a conflict graph, in: L. Wang, D. Zhu (Eds.), Computing and Combinatorics, Springer International Publishing, Cham, 2018, pp. 205–217.
JID:TCS AID:12159 /FLA
Doctopic: Algorithms, automata, complexity and games
[m3G; v1.261; Prn:12/09/2019; 11:34] P.15 (1-15)
N.E.H. Tellache et al. / Theoretical Computer Science ••• (••••) •••–•••
15
[8] A. Custic, B. Klinz, G.J. Woeginger, Geometric versions of the three-dimensional assignment problem under general norms, Discrete Optim. 18 (2015) 38–55. [9] F. Gardi, Mutual exclusion scheduling with interval graphs or related classes, part I, Discrete Appl. Math. 157 (2009) 19–35. [10] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, New York, 1979. [11] T. Gonzalez, S. Sahni, Open shop scheduling to minimize finish time, J. Assoc. Comput. Mach. 23 (1976) 665–679. [12] R.L. Graham, E.L. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling: a survey, Ann. Discrete Math. 5 (1979) 287–326. [13] A. Mohabeddine, M. Boudhar, New results in two identical machines scheduling with agreement graphs, Theor. Comput. Sci. (2019). [14] M.L. Pinedo, Scheduling: Theory, Algorithms, and Systems, Springer-Verlag, New York, 2012. [15] N.E.H. Tellache, Shop Scheduling in the Presence of a Graph of Conflicts, PhD thesis, University of Science and Technology Houari Boumediene, 2017. [16] N.E.H. Tellache, M. Boudhar, The two-machine flow shop problem with conflict graphs, in: 8th IFAC Conference on Manufacturing Modelling, Management and Control MIM 2016, IFAC-PapersOnLine 49 (12) (2016) 1026–1031. [17] N.E.H. Tellache, M. Boudhar, Open shop scheduling problems with conflict graphs, Discrete Appl. Math. 227 (2017) 103–120. [18] N.E.H. Tellache, M. Boudhar, Two-machine flow shop problem with unit-time operations and conflict graph, Int. J. Prod. Res. 55 (2017) 1664–1679. [19] N.E.H. Tellache, M. Boudhar, Flow shop scheduling problem with conflict graphs, Ann. Oper. Res. 261 (1) (2018) 339–363. [20] J.M.M. van Rooij, M.E. van Kooten Niekerk, H.L. Bodlaender, Partition into triangles on bounded degree graphs, Theory Comput. Syst. 52 (2013) 687–718.