Scheduling Two Agents on a Single Machine: A Parameterized Analysis of NP-hard Problems

Similar documents
Lecture 6 January 15, 2014

Upper Bounds for Stern s Diatomic Sequence and Related Sequences

Minimizing a convex separable exponential function subject to linear equality constraint and bounded variables

Branching Bisimilarity with Explicit Divergence

Modifying Shor s algorithm to compute short discrete logarithms

Bringing Order to Special Cases of Klee s Measure Problem

#A50 INTEGERS 14 (2014) ON RATS SEQUENCES IN GENERAL BASES

Expansion formula using properties of dot product (analogous to FOIL in algebra): u v 2 u v u v u u 2u v v v u 2 2u v v 2

IN this paper we study a discrete optimization problem. Constrained Shortest Link-Disjoint Paths Selection: A Network Programming Based Approach

THE BALANCED DECOMPOSITION NUMBER AND VERTEX CONNECTIVITY

Genetic Algorithms applied to Problems of Forbidden Configurations

Pseudo-automata for generalized regular expressions

Multi-agent scheduling on a single machine to minimize total weighted number of tardy jobs

Divide-and-Conquer. Reading: CLRS Sections 2.3, 4.1, 4.2, 4.3, 28.2, CSE 6331 Algorithms Steve Lai

Travel Grouping of Evaporating Polydisperse Droplets in Oscillating Flow- Theoretical Analysis

Structuring Unreliable Radio Networks

Determinants of generalized binary band matrices

10 Lorentz Group and Special Relativity

Polynomials Characterizing Hyper b-ary Representations

Recoverable Robustness in Scheduling Problems

Ahmed Nazeem and Spyros Reveliotis

Linear Programming. Our market gardener example had the form: min x. subject to: where: [ acres cabbages acres tomatoes T

Optimal Routing in Chord

SOME GENERAL RESULTS AND OPEN QUESTIONS ON PALINTIPLE NUMBERS

1 Caveats of Parallel Algorithms

Properties of proper rational numbers

arxiv: v2 [cs.dm] 12 Jul 2014

SINGLE MACHINE SEQUENCING Part 2. ISE480 Sequencing and Scheduling Fall semestre

Toward the Complexity of the Existence of Wonderfully Stable Partitions and Strictly Core Stable Coalition Structures in Hedonic Games

Depth versus Breadth in Convolutional Polar Codes

The Incomplete Perfect Phylogeny Haplotype Problem

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

Essential facts about NP-completeness:

1 Systems of Differential Equations

Design Variable Concepts 19 Mar 09 Lab 7 Lecture Notes

Creating Rational Equations that have R ational Solutions. By Alan Roebuck Chaffey College

The WHILE Hierarchy of Program Schemes is Infinite

The Traveling Salesman Problem with Few Inner Points

Finding the next solution in constraint- and preference-based knowledge representation formalisms

Max-margin structured output learning in L 1 norm space

On Two Class-Constrained Versions of the Multiple Knapsack Problem

STRONG NORMALITY AND GENERALIZED COPELAND ERDŐS NUMBERS

arxiv: v1 [math.nt] 27 May 2018

Chaos and Dynamical Systems

CHAPTER 5. Linear Operators, Span, Linear Independence, Basis Sets, and Dimension

Batch delivery scheduling with simple linear deterioration on a single machine 1

Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems

Single Machine Scheduling with Job-Dependent Machine Deterioration

1 Hoeffding s Inequality

SVETLANA KATOK AND ILIE UGARCOVICI (Communicated by Jens Marklof)

Combinatorial Structure of Single machine rescheduling problem

Evidence, eminence and extrapolation

The Mean Version One way to write the One True Regression Line is: Equation 1 - The One True Line

Generalized Reed-Solomon Codes

Santa Claus Schedules Jobs on Unrelated Machines

Representation theory of SU(2), density operators, purification Michael Walter, University of Amsterdam

Polynomial time solutions for scheduling problems on a proportionate flowshop with two competing agents

Polynomial Degree and Finite Differences

Creating Good Equations for the Classroom: Rational, Logarithmic and Square Root aversion ""Î# 9Î#!"'

Codes in the Damerau Distance for Deletion and Adjacent Transposition Correction

Robot Position from Wheel Odometry

Reversal of regular languages and state complexity

A Division Algorithm Approach to p-adic Sylvester Expansions

Zeroing the baseball indicator and the chirality of triples

A matroid associated with a phylogenetic tree

The variance for partial match retrievals in k-dimensional bucket digital trees

On Learning Linear Ranking Functions for Beam Search

Content Delivery in Erasure Broadcast. Channels with Cache and Feedback

Lower bounds for polynomial kernelization

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory

RADAR Oxford Brookes University Research Archive and Digital Asset Repository (RADAR)

Kernelization by matroids: Odd Cycle Transversal

Weak Keys of the Full MISTY1 Block Cipher for Related-Key Cryptanalysis

Energy-Efficient Scheduling of Real-Time Tasks on Cluster-Based Multicores

Solving Systems of Linear Equations Symbolically

Math 3450 Homework Solutions

Fast inverse for big numbers: Picarte s iteration

Minimum Wages, Employment and. Monopsonistic Competition

At first numbers were used only for counting, and 1, 2, 3,... were all that was needed. These are called positive integers.

Scheduling jobs with agreeable processing times and due dates on a single batch processing machine

arxiv: v1 [cs.dm] 26 Apr 2010

Explicit constructions of quasi-monte Carlo rules for the numerical integration of high dimensional periodic functions

Vector Spaces. EXAMPLE: Let R n be the set of all n 1 matrices. x 1 x 2. x n

The Capacity Region of 2-Receiver Multiple-Input Broadcast Packet Erasure Channels with Channel Output Feedback

arxiv: v2 [cs.ds] 27 Nov 2014

arxiv: v1 [cs.fl] 24 Nov 2017

CS264: Beyond Worst-Case Analysis Lecture #18: Smoothed Complexity and Pseudopolynomial-Time Algorithms

MATH 225: Foundations of Higher Matheamatics. Dr. Morton. 3.4: Proof by Cases

TIGHT BOUNDS FOR THE FIRST ORDER MARCUM Q-FUNCTION

Finding Consensus Strings With Small Length Difference Between Input and Solution Strings

The polynomial solvability of selected bicriteria scheduling problems on parallel machines with equal length jobs and release dates

Minimizing Mean Flowtime and Makespan on Master-Slave Systems

8. Prime Factorization and Primary Decompositions

CS264: Beyond Worst-Case Analysis Lecture #15: Smoothed Complexity and Pseudopolynomial-Time Algorithms

A Geometric Approach to Carlitz-Dedekind Sums

Rollout Policies for Dynamic Solutions to the Multi-Vehicle Routing Problem with Stochastic Demand and Duration Limits

Single machine scheduling with forbidden start times

ANOVA 3/12/2012. Two reasons for using ANOVA. Type I Error and Multiple Tests. Review Independent Samples t test

PMS 2012 April Leuven

Lecture 4 Scheduling 1

Transcription:

Scheduling Two Agents on a Single Machine: A Parameterized Analysis of NP-hard Prolems Danny Hermelin 1, Judith-Madeleine Kuitza 2, Dvir Shatay 1, Nimrod Talmon 3, and Gerhard Woeginger 4 arxiv:1709.04161v1 [cs.ds] 13 Sep 2017 1 Ben Gurion University of the Negev, Israel hermelin@gu.ac.il, dvirs@gu.ac.il 2 TU Berlin, Germany udith-madeleine.kuitza@campus.tu-erlin.de 3 Weizmann Institute of Science, Israel nimrodtalmon77@gmail.com 4 Eindhoven University of Technology, The Netherlands gwoegi@win.tue.nl Astract. Scheduling theory is an old and well-estalished area in cominatorial optimization, whereas the much younger area of parameterized complexity has only recently gained the attention of the community. Our aim is to ring these two areas closer together y studying the parameterized complexity of a class of single-machine two-agent scheduling prolems. Our analysis focuses on the case where the numer of os elonging to the second agent is consideraly smaller than the numer of os elonging to the first agent, and thus can e considered as a fixedparameter k. We study a varietyof cominations of scheduling criteria for the two agents, and for each such comination we pinpoint its parameterized complexity with respect to the parameter k. The scheduling criteria that we analyze include the total weighted completion time, the total weighted numer of tardy os, and the total weighted numer of ust-in-time os. Our analysis draws a orderline etween tractale and intractale variants of these prolems. Preliminary version of this work appeared in the proceedings of the International symposium on Parameterized and Exact Computation (IPEC) 2015.

1 Introduction Scheduling is a well-studied area in operations research that provides fertile grounds for several cominatorial prolems. In a typical scheduling prolem, we are given a set of os that are to e scheduled on a set of machines which is arranged according to a specific machine setting. The oective is to determine a schedule which minimizes a predefined scheduling criterion such as the makespan, total weighted completion time, and total weighted tardiness of the schedule. There are various machine settings including the single machine setting, parallel machines, flow-shop and o-shop, and each scheduling prolem may in addition have various attriutes and constraints. We refer the reader to e.g. [6,19,28] for an extensive introduction to the area of scheduling, and for a detailed survey of classical results. Many scheduling prolems are NP-hard. Typically, such hard prolems include a multitude of parameters, and many NP-hardness proofs exploit the fact that these parameters can e aritrary large in theory. However, in many practical settings, one or more of these parameters will actually e quite small. For example, the numer of different items that can e processed in the shop might e limited, resulting in a scheduling instance where only a limited numer of different processing times appear. A limited set of planned delivery dates resulting in a scheduling instance with a limited numer of different due dates is another example. It is therefore natural to ask whether NP-hard scheduling prolems ecome tractale when some of their parameters can e assumed to e comparatively small in practice. Luckily, a framework for answering such questions has een recently developed y the computer science community - the theory of parameterized complexity. Parameterized complexity facilitates the analysis of computational prolems in terms of various instance parameters that may e independent of the total input length. In this way, prolem instances are analyzed not only according to the total input length n, ut also according to an additional numerical parameter k that may encode other aspects of the input. A prolem is considered tractale if there is an algorithm that optimally solves any instance in f(k) n O(1) time, where f() is allowed to e any aritrary computale function which is independent of n, and the exponent in n O(1) is required to e independent of k. For example, a running-time of 2 O(k) n3 is considered tractale in the parameterized setting, while n O(k) is not. 2

In this way we can model scenarios where certain prolem parameters are typically much smaller than the total input length, yet may not e small enough to e considered constant. Parameterized complexity has enoyed tremendous success since its first developments in the early 90s, as can e exemplified y the various textooks on the suects [7,10,8,25]. However, there are currently very few papers that attack scheduling prolems from the parameterized perspective [5,9,21,31,32]. This is rather disappointing since scheduling prolems seem to e particulary adequate for parameterized analyses. For one, scheduling prolems which are NP-hard lack polynomial-time algorithms for finding optimal solutions, and in several applications, approximate solutions can result in ig revenue losses. This gives strong motivation for computing exact solutions even if computing such solutions requires a lot of resources. Secondly, as argued aove, scheduling prolems typically have an aundance of natural prolem parameters that can e comparatively small in practice. Thus, algorithms whose running times grow exponentially in such parameters alone should e quite useful for practical purposes. Our aim in this paper is to help close the gap etween research in parameterized complexity and the area of scheduling. We initiate a parameterized analysis on prolems occurring in the setting of multi-agent scheduling [2], a contemporary area which is nowadays at the cutting edge of scheduling research. We focus on the most asic case where there are only two agents, and all os are to e processed on a single machine. Furthermore, our parameterized analysis focuses on the scenario where the second agent has a significantly smaller numer of os than the other. The numer of os elonging to this agent is thus taken as a parameter, and is denoted y k throughout the paper. We preform an extensive parameterized analysis for several two-agent single-machine scheduling prolems with respect to this parameter, providing a clear picture of the applicaility of parameterized algorithmics to these prolems. 1.1 Our contriution In this work we investigate a variety of cominations for the oective functions of each agent. For each such comination, we consider the prolem where each agent has a ound on his oective function, and the goal is to determine whether there exists a single-machine schedule that meets oth ounds simultaneously. The oective functions we consider are (see Section 2 for formal definitions): 3

1. Total weighted completion time, where os have weights, and the goal is to minimize the sum of weighted completion time over the entire o set of the agent. 2. Total weighted numer of tardy os, where os have weights and due-dates, and the oective is to minimize the total weighted numer of os that terminate after their due-date. 3. Total weighted numer of ust-in-time ( JIT) os, where os have weights and due-dates, and the goal is to maximize the total weighted numer of os that terminate precisely on their due date. We consider several cominations of these scheduling criteria for which the corresponding prolem is NPcomplete, and for each such comination we determine whether or not the corresponding scheduling prolem ecomes fixed-parameter tractale with respect to k. There are also other sutleties that we consider, such as the unit weight case or the unit processing-time case. The paper is organized according to the first agent s scheduling criteria. Thus, Section 3 deals with the case where the scheduling criterion of agent 1 is the total weighted completion time, Section 4 focuses on prolems where the first agent criterion is the total weighted numer of tardy os, and Section 5 is concerned with prolems where the first agent criterion is the total weighted numer of JIT os. 1.2 Related work The set of two-agent scheduling prolems was first introduced y Baker and Smith [4] and Agnetis et al. [3]. For different cominations of the scheduling criteria, Baker and Smith focus on analyzing the prolem of finding a schedule that minimizes the weighted sum of the two criteria, while Agnetis et al. focus on analyzing the prolem of minimizing the first agent criterion while keeping the value of the second agent criterion not greater than a given ound. Following these two fundamental papers, numerous researchers have studied different cominations of multi-agent scheduling prolems, see e.g. [14,17,20,23,34,33]. Detailed surveys of these prolems appear in Perez-Gonzalez and Framinan [27] and in a recent ook y Agnetis et al. [2]. We give further detail of the results that are more directly related to our work in the appropriate sections of the remainder of the paper. 4

2 Preliminaries In this section we introduce the notation and terminology that will e used throughout the paper. In particular, we provide concrete definitions for the prolems we study, as well as a very rief introduction to the theory of parameterized complexity. 2.1 Scheduling notation and prolem definitions In all prolems considered in this paper, the input consists of two sets of os that have to e processed nonpreemptively on a single machine. The first set J (1) = {J (1) 1,...,J(1) n } elongs to agent 1, while the second set J (2) = {J (2) 1,...,J(2) } elongs to agent 2. We assume that k n, and for practical purposes one should k think of k as much smaller than n. Let p (i) e a positive integer denoting the processing time of o J (i). Moreover, when relevant, let d (i) and w (i) e two positive integers representing the due date and the weight of o J (i), respectively. A schedule σ of J (1) J (2) is a set of disoint time intervals I (i) = (C (i) p (i),c(i) ] for = 1,...,n if i = 1 and = 1,...,k if i = 2, where I (i) represents the time interval in σ where o J (i) is processed on the single machine. Note that C (i) represents the completion time of J (i). In case, one or oth of the agents os have due dates, we will use L (i) = C (i) d (i) to denote the lateness of o J (i), and we set L (i) max = max L (i). If L(i) 0, then o J (i) is an early o in σ, and otherwise it is tardy. Accordingly, the set E (i) = {J (i) J (i) L (i) 0} is the set of early os in σ that elongs to agent i, and the set T (i) = {J (i) J (i) L (i) > 0} is the set of tardy os that elong to agent i. We also use Ê(i) to denote the set Ê(i) = {J (i) J (i) L (i) = 0}. The quality of a schedule is measured y two different criteria, one per each agent. We focus on prolems for which either one of the two agents criteria may e either one of the following three possiilities: 1. The weighted sum of completion times, denoted y w (i) C(i). 2. The weighted numer of tardy os, where o J (i) is said to e tardy if C (i) > d (i). We use a inary indicator variale U (i) which indicates whether or not J (i) is tardy, and w (i) U(i) denotes the weighted numer of tardy os of agent i. 5

3. The weighted numer of ust-in-time (JIT) os, where o J (i) is said to e ust-in-time if C (i) = d (i). We use a inary indicator variale E (i) which indicates whether or not J (i) is ust-in-time, and w (i) E(i) denotes the weighted numer of ust-in-time os of agent i. Note that while first two criteria are minimization criteria, the latter is a maximization criterion. For each possile comination of the criteria aove, we consider the decision prolem where we are given two positive integer ounds A 1 and A 2, one for each agent, and we need to find if there exists a o schedule in which oth ounds are met. In case the scheduling criterion is the sum of weighted completion times or weighted numer of tardy os, the ound A i is regarded as an upper-ound, while for weighted numer of ust-in-time os it is a lower-ound. We refer to such a o schedule, if it exists, as a feasile o schedule. Using the standard three field notation in scheduling, we denote this set of prolems y 1 C (1),C (2), where C (i) { (i) w C(i) A i, w (i) U(i) A i, } w (i) E (i) A i, for i = 1,2. We will sometimes consider special cases of these prolems, and when doing so we use the middle field to denote restrictions on our input. For example, the 1 (1) p = 1, w (1) C (1) A 1, C (2) A 2 prolem is the prolem where the scheduling criterion for the first agent is the weighted sum of completion times, for the second agent is the (unweighed) sum of completion time and agent 1 has os with unit processing times. 2.2 Basic concepts in parameterized complexity theory The main oective in parameterized complexity theory is to analyze the tractaility of NP-hard prolems with respect to input parameters that are not necessarily related to the total input size. Thus, prolem instances are not only measured in terms of their input size n, ut also in terms of an additional parameter k. In this context, a prolem is said to e tractale, or fixed-parameter tractale (FPT), if there is an algorithm that solves each instance of size n and parameter k in f(k) n O(1) time. Here, the function f() can e any aritrarycomputale (e.g. exponential) function so long as it depends only on k, and the exponent in n O(1) is independent of k. The reader is referred to the excellent texts on the suect for more information [7,10,8,25]. In parameterized complexity, a running-time of 2 O(k) n3 is considered tractale, and even 2 22O(k) n 100 is considered tractale. Note that while the aove definition might allow some quite large running-times, when 6

k is sufficiently smaller than n, any such run-time drastically outperforms more common algorithms with running-times of n O(k) or n O(k2), for example. Moreover, a running time of, say, 2 O(k) n 3, with moderate constants in the exponent can e quite fast in practice. In any case, parameterized complexity provides the most convenient form of analyzing the complexity an NP-hard prolem with respect to the size of a given parameter. In our context, the parameter of each instance will always e the numer of os of agent 2. Thus, we consider the setting where agent 1 has significantly more os to schedule, ut nevertheless we still wish to meet oth agents criteria. Note that if a prolem is NP-hard already for constant values of its parameter, then a fixed-parameter tractale algorithm for the prolem will imply that P=NP. Thus, in our context, if we show that one of the prolems we consider is already NP-hard when agent 2 has a constant numer of os, this excludes the possiility that the prolem has a fixed-parameter tractale algorithm under the assumption of P NP. For showing such hardness results, we will use the classical NP-complete Partition prolem [11], often used in the context of scheduling prolems: Definition 1 (The Partition prolem). Given a set X = {x 1,...,x m } of positive integers (encoded in inary) with m =1 x = 2z, determine whether X can e partitioned into two sets S 1 and S 2 such that x S 1 x = x S 2 x = z. 3 Weighted Sum of Completion Times Inthissectionwestudythe1 w (1) C (1) A 1, C (2) prolemwherec (2) caneanyofthethreescheduling criteria discussed in Section 2. We first show that all the three corresponding prolems are unlikely to admit a fixed-parameter algorithm, since they are all NP-complete even for k = 1 (i.e, agent 2 has a single o) as we show in Theorem 1. This motivates us to study four special cases: We show that in case the os of agent 1 all have unit weight, the prolem ecomes FPT when the criteria for agent 2 is either weighted sum of completion times or weighted numer of tardy os. However, when the criteria of agent 2 is the numer of ust-in-time os, the prolem remains intractale in this case as well. We also provide an FPT algorithm for the case where oth criteria are the weighted sum of completion times, and agent 1 has os with unit processing times. 7

3.1 Intractaility of the general prolem with respect to k The fact that the single agent 1 w C prolem is solvale in O(nlogn) time (see Smith [30]) gives us some hope that at least one of the 1 w (1) C (1) A 1, C (2) prolems is tractale when k is small. Unfortunately, in the following theorem we show that this is not the case for all three criteria, even if the second agent has a single o of a unit weight. We will show this via a reduction from the NP-complete Partition prolem (see Definition 1). Theorem 1. The 1 w (1) C (1) A 1, C (2) prolem is NP-complete for k = 1, when C (2) is either C (2) A 2, U (2) A 2, or E (2) A 2. Proof. We provide a reduction from the NP-complete Partition prolem defined aove. Given an instance (X,z) to the Partition prolem, with X = {x 1,...,x m }, we construct the following two-agent scheduling instance: Agent 1 will have n = m os and agent 2 will have a single o (i.e., k = 1). For = 1,...,n, we set p (1) = w (1) = x. Moreover, we set p (2) 1 = 1, and in case C (2) { U (2) A 2, E (2) A 2 }, we also set d (2) 1 = z+1. The ound on the total weighted completion time of agent 1 is set to A 1 = z+ n i=1 i =1 x ix. The ound of agent 2 depends on his scheduling criterion: If it is the sum of completion times, we set A 2 = z+1, if it is the weighted numer of tardy os we set A 2 = 0, and if it is the weighted numer of JIT os we set A 2 = 1. Now suppose that X can e partitioned into two sets S 1 and S 2 with x i S 1 x i = x i S 2 x i = z. We construct a schedule σ where we first schedule all agent s 1 os corresponding to elements of S 1 in an aritrary order, followed y o J (2) 1, followed y all of the os of agents 1 corresponding to the elements of S 2 in an aritrary order. Oserve that o J (2) 1 completes in σ after x i S 1 x i + 1 = z +1 time units, and so the ound of agent 2 is met in all three criteria C (2). To see that the first agent ound is met as well, oserve that if we exclude J (2) 1 from σ then the total weighted completion time of agent 1 os is precisely n i i=1 =1 x ix. Adding o J (2) 1 increases the completion time of each of the first agent os that correspond to elements of S 2 y a unit. Thus, J (2) 1 contriutes precisely x i S 2 x i = z to the total weighted completion time of agent 1 os, and so the first agent ound on the total weighted completion time is met as well. 8

For the other direction, suppose there is a feasile schedule σ for any possile option of C (2). Let J (1) 1 denotethe set ofagent1os thatarescheduledeforeoj (2) 1 in σ, andlet J (1) 2 denote agent 1 remaining os. Since agent 2 ound is satisfied in σ, in each of the three possile criteria it must e that p (1) J (1) J (1) z. 1 Moreover,note that the total weighted completion time of agent 1 os is n i i=1 =1 x ix + p (1) J (1) J (1). 2 Sinceagent1oundisalsomet yσ,itmustethat p (1) J (1) J (1) z.sincethesumofallprocessingtimes 2 of agent 1 os is 2z, we get that p (1) J (1) J (1) = p (1) 1 J (1) J (1) = z. Thus, setting S 1 = {x : J (1) J (1) 1 } 2 and S 2 = {x : J (1) J (1) 2 } yields a solution to our Partition instance. 3.2 An FPT algorithm for the 1 C (1) A 1, w (2) C (2) A 2 prolem In stark contrast to the result in Theorem 1, we next show that, although eing NP-complete (see Agnetis et al. [3]), the 1 C (1) A 1, w (2) C (2) A 2 prolem is much easier to handle. We present an FPT algorithm for this prolem for parameter k, using the powerful result of Lenstra concerning mixed integer linear programs [18]. To egin with, we will need the following lemma which can e easily derived y using a simple pair-wise interchange argument (see also Agnetis et al. [3] that prove the same argument for the less general case where oth agents os have unit weights): Lemma 1. If there is a feasile solution for the 1 C (1) A 1, w (2) C (2) A 2 prolem, then there exists a feasile solution where the os of agent 1 are scheduled in a non-decreasing order of p (1), i.e., according to the shortest processing time (SPT) rule. Considernowthe1 C (1) A 1, w (2) C (2) A 2 prolem.duetolemma1,weassume,withoutloss ofgeneralitythattheosofagent1arenumeredaccordingtothesptrulesuchthatp (1) 1 p (1) 2... p (1) n. By allowing an additional multiplicative factor of k! to the running time of our algorithm, we can focus on a reduced suprolem where the ordering of the second agent os is predefined. Given a suprolem, we renumer the second agent os according to this ordering. Then, to determine whether a feasile schedule is actually possile for the given suprolem, we only need to figure out if it is possile to interleave the two ordered sets of os together in a way that satisfies oth agents ounds. Towards this aim, we formalize any given suprolem as a mixed integer linear program (MILP) where the numer of integer variales is k. We then complete the proof y using the celerated result of Lenstra [18] which states that determining 9

whether a given MILP has a feasile solution is fixed-parameter tractale with respect to the numer of integer variales. To formulate a given suprolem as an MILP, we define an integer variale x for each o J (2) representing the numer of os elonging to agent 1 that are scheduled efore J (2). Therefore, for each 1 k, we add the constraint that 0 x n. (1) Moreover, for 1 k 1, we add the constraint that x x +1. (2) Lemma 2. The ound on the total completion time of the first agent os can e formulated y the following constraint: n k (n +1) p (1) + (n x ) p (2) A 1. (3) =1 =1 Proof. Oserve that the first term in the left-hand side of constraint (3) is precisely the total completion time of the first agent os when no o of the second agent is scheduled at all. We now add the second agent os according to the intended meaning of the variales x 1,...,x k. If there are x os of agent 1 scheduled prior to J (2) in the presumed schedule, then J (2) causes an increase of p (2) to the completion time of n x os elonging to the first agent. Thus, adding all of agent 2 os causes an additional increase of k =1 (n x ) p (2) to the total completion time of the first agent os. The encoding of the second agent ound is a it more involved. Specifically, for each J (2), we introduce a real-valued variale y which we would like to e equal to the contriution of the first agent os to the completion time of J (2). Note that y our intended meaning for variale x, this is precisely x i=1 p(1) i. However, we cannot encode this directly as a linear constraint. We therefore introduce n additional realvalued varialescorrespondingtoj (2), denoted asy i fori {1,...,n},which areensured toe non-negative y adding the constraint that y i 0 (4) 10

for i {1,...,n} and {1,...,k}. The y i variales are used to provide upper-ounds to the steps in the contriution of the first agent os as depicted in Fig. 1. Accordingly, we add the constraints y i (x i+1) (p (1) i p (1) i 1 ) (5) foreachi {1,...,n}and {1,...,k}(naturally,wesetherep (1) 0 = 0). Furthermore, we add the constraint that n y y i (6) i=1 for any {1,...,k} so that y will equal its intended meaning. p y i (x i+1) (p (1) i p (1) i 1 ) J (1) J (1) 2 J (2) 1 Fig.1. The contriution of x os that of agent 1 which are scheduled prior to J (2) of this o y x i=1 p(1) i. The variale y i is intended to capture the i th step of this contriution. increases the completion time Lemma 3. The ound on the total weighted completion time of the second agent os can e formulated y the following constraint: k i=1 w (2) i i p (2) =1 k + w (2) y =1 A 2. (7) Proof. Oserve that the first term in the left-hand side of constraint (7) is the total weighted completion time of the second agent ordered os J (2) 1,...,J(2), assuming no os of agent 1 are scheduled. We argue k that the second term upper-ounds the contriution of agent 1 os. For this, it suffices to show that the contriution of agent 1 os to the completion time of J (2), for each {1,...,k}, is at most y. We know that this contriution is x i=1 p(1) i. Since we are concerned only with feasile solutions where the constraints 11

on variales y i,y i1...,y in are met, we have y n y i i=1 x n max{0,(x i+1) (p (1) i p (1) i 1 )} = (x i+1) (p (1) i p (1) i=1 i=1 i 1 ) x = x p (1) 1 +(x 1)(p (1) 2 p (1) 1 )+ +(p(1) x p (1) x ) = 1 p (1) i. i=1 To summarize, due to Lemma 1, we can solve the 1 C (1) A 1, w (2) C (2) A 2 prolem y solving O(k!) MILP formulations, each of which has only k integer variales. Correctness of each of these formulations follows from Lemmas 2 and 3, and the analysis aove. Using Lenstra s result [18], we therefore otain the following theorem: Theorem 2. 1 C (1) A 1, w (2) C (2) A 2 is fixed-parameter tractale with respect to k. 3.3 An FPT algorithm for 1 (1) p = 1, w (1) C (1) A 1, w (2) C (2) A 2 The prolem of determining whether there exists a schedule where oth agents meet their respective ounds on their total weighted completion times was shown to e NP-complete even if the os of oth agents all have unit processing times [26]. Here we complement this result, as well as the result given in Theorem 1, y showing that the prolem is FPT with respect to k when the os of the first agent have unit processing times. The following lemma is crucial for the construction of the FPT algorithm, and can e proven y a simple pairwise interchange argument. Lemma 4. If there is a feasile schedule for the 1 (1) p = 1, w (1) C (1) A 1, w (2) C (2) A 2 prolem, then there is a feasile schedule for the prolem where the first agent os are scheduled in a non-increasing weight order. Assume, without loss of generality, that w (1) 1 w (1) n. Accordingly, ased on Lemma 4, we can restrict our search for a feasile schedule to those schedules in which o J (1) is scheduled efore J (1) +1 for all {1,...,n 1}. As in the proof of Theorem 2, y allowing an additional multiplicative factor of k! to the running time of our algorithm, we can focus on a reduced suprolem where the ordering of the second 12

agent os is also predefined. Given such an ordering, we renumer the second agent os according to the ordering. In what follows we prove that each suprolem is FPT with respect to k. The proof uses the same ideas as the proof of Theorem 2 and thus is riefly presented. Here as well we define variales x 1,...,x k, ut this time x represents the numer of the first agent os that are scheduled after J (2). Accordingly, we have to include the constraint in (1) and for 1 k 1 the following constraint as well: x x +1. (8) The ound on the weighted sum of completion times of the second agent os can e expressed y k i k p (2) + w (2) (n x ) A 2, (9) i=1 w (2) i =1 where the first term in the left-hand side is the weighted sum of completion times of the second agent os if they are scheduled one after the other at the eginning of the schedule, and the second term in the left-hand side corresponds to the contriution of the first agent os to the weighted sum of completion times of the second agent os. =1 To ound the total weighted completion time of the first agent os, we need again to introduce a set of real-valued variales y,y 1,...,y n for each {1...,k}. Here, variale y is meant to encode the contriution of J (2) to the total weighted completion time of the first agent os. Note that this is precisely p (2) n i=n x +1 w(1) i.weusethevarialesy i toencodelower-oundsonthestepsofthesum n i=n x +1 w(1) i, as done in the proof of Theorem 2. Accordingly, for {1,...,k}, we include the set of constraints in (6). Moreover, for i {1,...,n} and {1,...,k}, we include the set of constraints in (4) and also the following set of constraints y i (x n+i)(w (1) i w (1) i+1 ), (10) where w (1) n+1 = 0 y definition. Finally, we encode the ound on the total weighted completion time of the first agent os y n w (1) =1 k + p (2) y =1 A 1, (11) where the first term in the left-hand side is the weighted sum of completion time of the first agent os if they are scheduled one after the other at the eginning of the schedule, and the second term in the left-hand 13

side corresponds to the contriution of the second agent os to the weighted sum of completion times of the first agent os. Theorem 3. The 1 (1) p = 1, w (1) C (1) A 1, w (2) C (2) with respect to k. A 2 prolem is fixed-parameter tractale 3.4 The 1 C (1) A 1, w (2) U (2) A 2 prolem Ng et al. [24] and Leung et al. [20] proved that the 1 C (1) A 1, U (2) A 2 prolem is NP-complete. We next prove that the more general 1 C (1) A 1, w (2) U (2) A 2 prolem is FPT with respect to k. Our proof depends on the following easy-to-provelemma (recall the definitions of E (i) and T (i) in Section 2): Lemma 5. If there is a feasile solution for an instance of the 1 C (1) A 1, w (2) U (2) A 2 prolem, then for the same instance there exists a feasile solution in which (i) the os of agent 1 are scheduled in a non-decreasing order of p (1) (i.e., according to the SPT rule); (ii) the os in E (2) are scheduled in a nondecreasing order of d (2) (i.e., according to the EDD rule); and (iii) the os in T (2) are scheduled last in an aritrary order. Consider now the 1 C (1) A 1, w (2) U (2) A 2 prolem and define a set of 2 k suprolems corresponding to the O(2 k ) possile ways to partition set J (2) into E (2) and T (2) such that the condition J (2) T (2) w (2) A 2 holds. Due to Lemma 5, each suprolem reduces to an instance of the 1 C (1) A 1, L (2) max 0 prolem which includes the n os of agent 1 and only the O(k) early os of agent 2. In the reduced suprolem, we need to find if it is possile to schedule the os in J (1) E (2) such that all os in E (2) are indeed early (i.e., completed not later than its due date), and C (1) A 1. Thus, the fact that the 1 C (1) A 1, L (2) max 0 prolem is solvale in O(n+k) = O(n) time (see Yuan et al. [34]) leads to the following theorem: Theorem 4. The 1 C (1) A 1, w (2) U (2) A 2 prolem is solvale in O(2 k n) time. 14

3.5 Intractaility of the 1 C (1) A 1, E (2) A 2 prolem Consider an instance of the 1 C (1), E (2) A 2 prolem, with k = 1 and A2 = 1. If there is a feasile solution for such an instance, then the single o of agent 2 is scheduled in a JIT mode, i.e., during time interval (d (2) 1 p (2) 1,d(2) 1 ]. Thus, such an instance is equivalent to an instance of a 1 C (1) prolem with a single non-availaility interval (more commonly denoted y 1 C (1),n a ). This prolem is known to e NP-complete when C (1) = C (1) A 1 (see Adiri et al. [1] and Lee and Liman [16]). Thus, we have the following corollary: Corollary 1. The 1 C (1) A 1, E (2) A 2 prolem is NP-complete even for k = 1. 4 Weighted Numer of Tardy Jos In this section we study variants of our prolem of the form 1 w (1) U (1) A 1, C (2). That is, variants where the scheduling criteria of agent 1 is the weighted numer of tardy os. Note that already the single agent 1 w U A prolem is NP-complete, even when all due dates are equal (a resulting dating ack to Karp s seminal NP-completeness paper [13]). Therefore, any variant of our prolem when the os of the first agent have weights is hard. Corollary 2. The 1 d = d, w (1) U (1) A 1, C (2) prolem is NP-complete for k 0. Due to Theorem 2, we restrict our analysis elow to the unweighed 1 U (1) A 1, C (2) prolem. We provide a fixed-parameter algorithm for the case where the criteria of agent 2 is also the (weighted) numer of tardy os. This algorithm is then extended to the case where the os of agent 1 may have aritrary weights, ut oth agents os have unit processing times. On the contrary,when the criteria for agent 2 is the weighted numer of JIT os, we show that the prolem is intractale already for highly restrictive special cases. We do not know whether the prolem is fixed-parameter tractale when the criteria for agent 2 is the total weighted completion time; in the case, we can only show an n O(k) -time algorithm. 15

4.1 An n O(k) -time algorithm for the 1 U (1) A 1, w (2) C (2) A 2 prolem The question whether the 1 U (1) A 1, (2) w C (2) A 2 prolem is fixed-parameter tractale or not remains an open question. Nevertheless, we show elow that the prolem can e solved in much slower ut still non-trivial n O(k) time. This leads to the conclusion that the prolem elongs to the parameterized class XP (see e.g. [8] for a formal definition), and is solvale in polynomial time when k is upper ounded y a constant. We egin with the following easy lemma. Lemma 6. If there is a feasile solution for an instance of the 1 U (1) A 1, (2) w C (2) A 2 prolem, then for the same instance there exists a feasile solution in which (i) U (1) = A 1 ; (ii) the os in E (1) J (2) are scheduled first followed y the os in T (1) that are scheduled last in an aritrary order; and (iii) the os in E (1) are scheduled according to the EDD rule (i.e., in non-decreasing order of d (1) ). Following Lemma 6, we renumer the os in J (1) according to the EDD rule. Furthermore, we divide the original prolem into k! instances, each of which represent a different processing order of the os in J (2). Consider a given instance, and assume that the os in J (2) are numered according to their processing order. For each such instance, we consider all possile partitions of J (1) into k + 1 susets, J (1) = J (1) 0 J (1) k, and all possile sets of k + 1 integers {e 0,...,e k } with e i J (1) i for each i {0,...,k +1} and k i=0 e i = n A 1. Note that there areo(n 2k+2 ) such pairs({j (1) 0,...,J (1) k },{e 0,...,e k }). Givensuch a pair,we arelooking for a restricted schedule that satisfies the following three conditions: (i) there are at most e i early os among the os in J (1) i for each i = 0,...,k; (ii) o J 2 i+1 is scheduled right after the e i early os within J (1) i for i = 0,...,k 1; and (iii) w (2) C (2) A 2. Note that the instance corresponding to the particular processing order of J (2) has a feasile schedule iff such a restricted schedule corresponding to some pair ({J (1) 0,...,J (1) k },{e 0,...,e k }) exists. Below we show how to compute a restricted schedule, if it exists, in O(n log n) time. This will yield the following theorem: Theorem 5. The 1 U (1) A 1, w (2) C (2) A 2 prolem is solvale in O(k!n 2k+1 logn) time. Consider some pair ({J (1) 0,...,J (1) k },{e 0,...,e k }) as aove. Note that if our goal was only to find a schedule for there are at most e i early os in J (1) i for each i, then this translates to solving k disoint 16

instances of the single agent 1 U n i e i prolem over each set of os J (1) i, where n i = J (1) i. Each such instance can e solved in O(n i lgn i ) time y a slight modification of the classical algorithm of Moore [22], which gives us a total of O(nlogn) time for all k+1 instances. Furthermore, Moore s algorithm computes the schedule with minimum makespan (i.e., final completion time) amongst all schedules with at most e i tardy os. Thus, composing the k+1 schedules into a single schedule for oth agents y scheduling J (2) (1) i+1 after the final o scheduled in J i, gives us a schedule which minimizes w (2) C (2) over all schedules which satisfy properties (i) and (ii) aove. Thus, in O(nlgn) time we can determine whether there exists a restricted schedule corresponding to ({J (1) 0,...,J (1) k },{e 0,...,e k }), and so Theorem 5 holds. We mention that this algorithm can slightly e improved if the os of agent 2 have unit weights. In this case, we know that it is optimal to order these os in a non-decreasing order of p (2), i.e., according to the shortest processing time (SPT) rule. Thus, we do not have to try out all possile orderings of J (2), reducing the time complexity of the algorithm aove y a factor of O(k!). Corollary 3. The 1 U (1) A 1, C (2) A 2 prolem is solvale in O(n 2k+1 logn) time. 4.2 An FPT algorithm for 1 U (1) A 1, w (2) U (2) A 2 We next show that the 1 U (1) A 1, w (2) U (2) A 2 prolem is FPT with respect to k. Our proof depends on the following easy-to-prove lemma: Lemma 7. If there is a feasile solution for an instance of the 1 U (1) A 1, w (2) U (2) A 2 prolem, then for the same instance there exists a feasile solution in which the os in E (1) E (2) are scheduled first according to the EDD rule (i.e., in non-decreasing order of d (i) ), followed y the os in T (1) T (2) that are scheduled last in an aritrary order. Consider now an instance of the 1 U (1) A 1, w (2) U (2) A 2 prolem, and define a set of 2 k instances corresponding to the O(2 k ) possile ways to partition set J (2) into E (2) and T (2) such that the feasiility condition J (2) A 2 holds in each instance. Due to Lemma 7, each of these instances is an instance of the 1 U (1) A 1,L (2) max 0 prolem in which we need to find a feasile schedule for agent T (2) w (2) 1 suect to scheduling the set of O(k) os in E (2) such that they are all early. Agnetis et al. showed that the 17

1 U (1) A 1,L (2) max 0 prolem is solvale in O(nlogn+klogk) = O(nlogn) time [3]. Thus, we otain the following: Theorem 6. The 1 U (1) A 1, w (2) U (2) A 2 prolem is solvale in O(2 k nlogn) time. 4.3 An FPT algorithm for 1 (1) p = p (2) = 1, w (1) U (1) A 1, w (2) U (2) A 2 The 1 w (1) U (1) A 1, w (2) U (2) A 2 prolem is NP-complete even for the case of unit processing time [26]. Next we complement this result, as well as Theorem 2, y showing that this prolem is FPT with respect to k. First oserve that Lemma 7 holds here as well. Thus, we again create 2 k instances from our 1 (1) p = p (2) = 1, w (1) U (1) A 1, w (2) U (2) A 2 instance, where in each instance the set E (2) J (2) may vary. In any given instance of these 2 k instances we may assume that J (2) T (2) w (2) A 2. Furthermore, again due to Lemma 7, each of these instances is in fact an instance of the 1 p (1) = p (2) = 1, w (1) U (1) A 1, L (2) max 0 prolem in which we need to find a feasile schedule for agent 1 suect to scheduling the set of O(k) os in E (2) such that they are all early. This latter prolem is solvale in O(max{nlogn,k}) = O(nlogn) time [26]. Thus, we get: Theorem 7. The 1 p (1) = p (2) = 1, w (1) U (1) A 1, w (2) U (2) A 2 prolem is solvale in O(2 k nlogn) time. 4.4 Intractaility of the 1 U (1) A 1, E (2) A 2 prolem Following the oservation made in Section 3.5, we can conclude that an instance of the 1 (1) d = d, U (1) A 1, (2) E A 2 prolem with k = 1 and A 2 = 1 is equivalent to an instance of the 1 d (1) = d, U (1) A 1,n a prolem, which is known to e NP-complete (see Lee [15]). Thus, we have the following corollary: Corollary 4. The 1 d (1) = d, U (1) A 1, E (2) A 2 prolem is NP-complete for k 1. 5 Weighted Numer of Just-in-Time Jos We next consider prolems of the form 1 w (1) E (1) A 1, C (2), i.e., prolems where the criteria of agent 1 is the total weighted numer of JIT os. Recall that a o J (i) is scheduled in JIT mode if it is scheduled 18

precisely at the time interval (d (i) p (i),d(i) ]. We will show that when either C(2) = w (2) U (2) A 2, or C (2) = w (2) E (2) A 2, the prolem is fixed-parameter tractale in k. We also show that when C (2) = (2) w C (2) A 2 the prolem is fixed-parameter tractale if the first agent os are unweighed, while the more general case (where the first agent os are weighted) is left open. 5.1 The 1 E (1) A 1, w (2) C (2) A 2 prolem The 1 E (1) A 1, C (2) A 2 prolem is known to e NP-complete [29]. We next prove that the more general 1 E (1) A 1, w (2) C (2) A 2 prolem is FPT with respect to k. As usual, we egin with an easy-to-prove lemma: Lemma 8. In any feasile schedule for the 1 E (1) A 1, w (2) C (2) A 2 prolem the os in E (1) are scheduled in non-decreasing due date (EDD) order. Moreover, if there is a feasile solution for the prolem, then there is a feasile solution in which Ê(1) = E (1) = A 1, and the os in set T (1) = J (1) \ Ê(1) are scheduled last in an aritrary order. Following Lemma 8, we assume without loss of generality that the os in J (1) are indexed according to the EDD rule, i.e., d (1) 1 d (1) 2... d (1) n. We will show that for any fixed ordering of the os of agents 2, we can determine in polynomial time whether there exists a feasile schedule where the relative order of agent 2 os is exactly this ordering. Since there are k! orderings of the os of agent 2, this will imply that the 1 E (1) A 1, w (2) C (2) A 2 prolem is FPT with respect to k. Consider any fixed ordering J (2) 1,...,J(2) k of the os of agent 2. For convenience purposes, let J (1) 0 and J (1) n+1 e two dummy os of agent 1 with p(1) 0 = w (1) 0 = d (1) 0 = p (1) n+1 = w(1) n+1 = 0 and d(1) n+1 =. Consider any given feasile schedule σ with J a (1) and J (1) eing two os of agent 1 that are scheduled in JIT mode, with no other os of agent 1 scheduled in etween them. Oviously, d (1) d (1) a p (1) 0, as otherwise J a (1) and J (1) cannot e oth scheduled in JIT mode. For l {0,...,k 1}, let k(a,,l) denote the numer of os in a maximal consecutive susequence of os in {J (2) l+1,...,j(2) k } with total processing time not greater than d (1) d (1) a p (1). Then the following lemma holds: Lemma 9. Suppose there is a feasile schedule in which J (1) a and J (1) are scheduled in JIT mode with no other os of agent 1 scheduled etween them, and there are exactly l os elonging to agent 2 that are 19

scheduled prior to J (1) a. Then there exists a feasile schedule where the sequence of os J (2) l+1,...,j(2) l+k(a,,l) is scheduled right after the completion time of o J (1) a, and no other os are scheduled prior to the completion of o J (1). ForapairofosJ a (1),J (1) J (1) and l {0,...,k 1},let w(a,,l) denote the minimum contriutionof the o sequence J (2) l+1,...,j(2) l+k(a,,l) to the total weighted completion time of agent 2 in any feasile schedule σ. If no such schedule exists, define w(a,,l) =. According to Lemma 9 we can compute w(a,,l) y using the following formula: w(a,,l) = l+k(a,,l) =l+1 l+k(a,,l) w (2) C (2) = =l+1 w (2) ( d (1) a + i=l+1 p (2) i ). (12) Now, for,e {0,...,n + 1}, and l {0,...,k 1}, let W(,e,l) denote the minimum total weighted completion time of the first l os of agent 2, among all partial schedules on the o set {J (1) 1,...,J(1),J (2) 1,...,J(2) l }, such that e = Ê(1) = E (1) and J (1) Ê(1) is the last o to e scheduled. (Again, set W(,e,l) = if no such schedule exists.) Note that y definition, the completion time of such a feasile partial schedule is exactly at time d (1). The value W(,e,l) can e computed using the following recursion that considers all possile ways of appending partial schedules that have fewer os of agent 2 and one less JIT o of agent 1: W(a,e 1,l )+w(a,,l ) : d (1) d (1) W(,e,l) = min 0 a 1 0 l l : otherwise. a p (1) 0, l = l +k(a,,l ). (13) Our algorithm computes all possile W(,e,l) values for {0,...,n + 1}, e {0,...,A 1 }, and l {0,...,k}, using the recursion given in Equation 13. For this, it computes in a preprocessing step all values w(a,,l) and k(a,,l), for 0 a < n+1 and 0 l k. The ase cases of the recursion are given y W(0,0,0) = 0, and W(0,e,l) = for e 0 or l 0. We report that there exists a feasile schedule for our 1 E (1) A 1, C (2) A 2 (2) instance, restricted to the relative fixed ordering J 1,...,J(2) k for the os of agent 2, iff W(n+1,A 1,k) A 2. Correctness of our algorithm is immediate from the aove discussion. Let us now analyze its time complexity. There are k! ways to order the os of agent 2. For each such order, we compute all values W(,e,l), w(a,,l) and k(a,,l). All values k(a,,l) can e computed straightforwardly in O(n 2 k 2 ) time. Using these 20

values, and Equation 12, all values w(a,,l) can also e computed in O(n 2 k 2 ) time. Finally, using dynamic programming along with Equation 13, computing all values W(,e,l) requires O(n 3 k 2 ) time. Thus, for each fixed ordering of J (2), we spend a total of O(n 3 k 2 ) time. All together, this gives us an O(k!k 2 n 3 ) time algorithm. Theorem 8. The 1 E (1) A 1, w (2) C (2) A 2 prolem is solvale in O(k!k 2 n 3 ) time. 5.2 The 1 w (1) E (1) A 1, w (2) U (2) A 2 prolem We next show how to modify the ideas used in Section 5.1 so that they apply to the 1 w (1) E (1) A 1, w (2) U (2) A 2 prolem. We egin with the following analog of Lemma 8: Lemma 10. In any feasile schedule for an instance of the 1 w (1) E (1) A 1, w (2) U (2) A 2 prolem, the os in Ê(1) E (2) are scheduled in an earliest due date (EDD) order. Moreover, if there is a feasile solution for the instance, then there is a feasile solution in which the os in set T (1) T (2) are scheduled last in an aritrary order. Following Lemma 10, we assume that the os in J (1) are numered according to the EDD rule such that d (1) 1 d (1) 2... d (1) n. We create O(2 k ) instances of the prolem, according to all possile candidate sets for E (2) such that w (2) J (2) / E (2) A 2 holds. Each instance is in fact an instance of the 1 w (1) E (1) A 1, L (2) max 0 prolem which includes the n os of agent 1 and only the O(k) early os of agent 2. In the reduced instance, we need to determine whether there exists a schedule where each o in E (2) is indeed early (i.e., completed not later than its due date) and w (1) E (1) A 1. Below, we show how we can solve this prolem in polynomial time. We egin y renumering the os in E (2) such that d (2) 1 d (2) 2... d (2) k, where k = E (2). As in Section 5.1, we add two dummy os J (1) 0 and J (1) n+1 with d(1) 0 = p (1) 0 = w (1) 0 = p (1) n+1 = w(1) n+1 = 0 and d (1) n+1 =. Furthermore, we again let k(a,,l) denote, for 0 a < n and 0 l < k, the length of the maximal consecutive susequence of os in {J (2) l+1,...,j(2) k } with total processing time not greater than d (1) d (1) a p (1). Then Lemma 9 holds here as well, and we can assume that if J a (1) and J (1) are oth scheduled in JIT mode, with no other agent 1 os etween them, then J (2) l+1,...,j(2) l+k(a,,l) is scheduled right after the completion of J (1) a (and no other os are scheduled prior to the completion of J (1) ). 21

Since no os of agent 2 are allowed to e late, a partial schedule that includes os J a (1) and J (1) as two consecutive JIT os with l early os of agent 2 scheduled efore J (1) a is a feasile partial schedule with l +k(a,,l ) early os of agent 2 scheduled efore J (1) only if the following two conditions holds: Condition 1: d (1) d (1) a p (1) 0; and Condition 2: d (1) a + i=l +1 p(2) i d (2) 0 for all = l +1,...,l + k(a,,l ). Now, let W(,l) represent the maximum total weighted numer of JIT os among all partial schedules on o set {J (1) 1,...,J(1),J (2) 1,...,J(2) l } where all os {J (2) 1,...,J(2) l } are early and J (1) Ê(1) is the last scheduled o. Note that as opposed to Section 5.1, here this value represents the criteria of agent 1. Each value W(, l) can e computed with the following recursion that considers all possile ways of appending partial schedules that have fewer early os of agent 2 and one less JIT o of agent 1: W(,l) = max 0 a 1 0 l l 1 W(a,l )+w (1) : conditions 1 and 2 hold and l = l + k(a,,l ). : otherwise. (14) The ase cases for this recursion are given y W(0,0) = 0, and W(0,l) = for l 0. Our algorithm reports that there exists a feasile solution to the instance of 1 w (1) E (1) A 1, w (2) U (2) A 2 prolem iff for some set E (2) with J (2) / E (2) w (2) A 2 we have W(n+1, E (2) ) A 1. The running time of this algorithm can e ounded y O(2 k k 2 n 2 ), using a similar analysis to the one given in Section 5.1. Thus, we otain: Theorem 9. The 1 w (1) E (1) A 1, w (2) U (2) A 2 prolem is solvale in O(2 k k 2 n 2 ) time. 5.3 The 1 w (1) E (1) A 1, w (2) E (2) A 2 prolem It is known that the 1 w (1) E (1) A 1, w (2) E (2) A 2 prolem is NP-complete, and that it is polynomial-time solvale if the weights of either one of the two agents are all equal [29]. Below we show that (i) the prolem is NP-complete even for the case of unit processing time; and that (ii) the general prolem (with aritrary processing time) is FPT with respect to k. Theorem 10. The 1 (1) p = p (2) = 1, w (1) E (1) A 1, w (2) E (2) A 2 prolem is NP-complete. 22

Proof. Given an instance (X, z) to the NP-hard Partition prolem (see Definition 1), we construct the following instance for the 1 p (1) = p (2) = 1, w (1) E (1) A 1, w (2) E (2) A 2 prolem. We set n = k = m, and for = 1,...,n we set w (1) = w (2) = x and d (1) = d (2) = (recall that here p (1) = p (2) = 1). Moreover,we set A 1 = A 2 = z. Note that since os J (1) and J (2) have the same due date of for = 1,...,n, only one of them can e completed in a JIT mode. Thus, the total gain for oth agents is restricted to e not more than n =1 x = 2z. Suppose that X can e partitioned into two sets S 1 and S 2 with x S 1 x = x S 2 x = z. Schedule each o in {J (i) x S i } during time interval ( 1,], and schedule the remaining os in an aritrary order. Then each o in {J (i) x S i } is scheduled in JIT mode, and Ê(i) = {J (i) x S i } for i = 1,2. The fact that x S i x = z, for i = 1,2, implies that in σ we have J (i) Ê(i) w (i) = z for each agent i. Thus, there is a feasile schedule for our constructed instance. For the other direction, suppose there exists a schedule σ with w (i) E(i) A i = z for i = 1,2. Then since the total gain in the oective function of oth agents is restricted to e not more than 2z, we have that w (i) E (i) = z for i = 1,2. This means that y setting S i = {x : E (i) = 1}, for i = 1,2, we otain a solution for (X,z) with x S i x = z for i = 1,2. Next, we show that the 1 w (1) E (1) A 1, w (2) E (2) A 2 prolem is FPT with respect to k. To this end, it is convenient to view all os in J (1) J (2) as time intervals. For a o J (i) J (1) J (2), let the time interval of J (i) e I (i) = (d (i) p (i),d(i) ]. Then if J(i) is required to e scheduled in JIT mode, it has to e scheduled within its time interval I (i). Thus, any pair of os J 1,J 2 J (1) J (2) can e simultaneously scheduled in JIT mode iff I 1 I 2 =. This means that our goal now translates to finding a set of pairwise disoint time intervals, for which the total weight of set of intervals related to the os of each agent met its ound. We try out all possile candidates for Ê(2) ; that is, all susets of agent 2 os J 2 J (2) that have pairwise disoint time intervals and J (2) J 2 w (2) A 2. For each such suset J 2, we compute the suset of agent 1 os J 1 J (1) with time intervals that do not intersect any time interval of a o in J 2. That is, J 1 = {J (1) J (1) : I (1) I (2) i = for all J (2) i J 2 }. We then compute a maximum weight pairwise disoint suset I1 of intervals in the set I 1 = {I (1) : J (1) J 1 }, and report that we have found a feasile schedule if 23