Classification - Examples



Similar documents
Scheduling Single Machine Scheduling. Tim Nieberg

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Scheduling Shop Scheduling. Tim Nieberg

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Single machine parallel batch scheduling with unbounded capacity

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Real Time Scheduling Basic Concepts. Radek Pelánek

Abstract Title: Planned Preemption for Flexible Resource Constrained Project Scheduling

Approximability of Two-Machine No-Wait Flowshop Scheduling with Availability Constraints

Tutorial 8. NP-Complete Problems

Aperiodic Task Scheduling

Common Approaches to Real-Time Scheduling

Algorithm Design and Analysis

Introduction to Scheduling Theory

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Approximation Algorithms

Duplicating and its Applications in Batch Scheduling

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Completion Time Scheduling and the WSRPT Algorithm

Offline sorting buffers on Line

Stiffie's On Line Scheduling Algorithm

Factors to Describe Job Shop Scheduling Problem

Fairness in Routing and Load Balancing

List Scheduling in Order of α-points on a Single Machine

Real-Time Software. Basic Scheduling and Response-Time Analysis. René Rydhof Hansen. 21. september 2010

Lecture 7: NP-Complete Problems

5.1 Bipartite Matching

Scheduling Real-time Tasks: Algorithms and Complexity

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Discrete Optimization

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Applied Algorithm Design Lecture 5

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Heuristic Algorithms for Open Shop Scheduling to Minimize Mean Flow Time, Part I: Constructive Algorithms

CSC 373: Algorithm Design and Analysis Lecture 16

Dimensioning an inbound call center using constraint programming

8.1 Min Degree Spanning Tree

Topic: Greedy Approximations: Set Cover and Min Makespan Date: 1/30/06

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

Minimizing the Number of Machines in a Unit-Time Scheduling Problem

24. The Branch and Bound Method

3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches / /13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1

Scheduling a sequence of tasks with general completion costs

OHJ-2306 Introduction to Theoretical Computer Science, Fall

11. APPROXIMATION ALGORITHMS

The Model Checker SPIN

THROUGHPUT OPTIMIZATION IN ROBOTIC CELLS

A Beam Search Heuristic for Multi-Mode Single Resource Constrained Project Scheduling

A generalized job-shop problem with more than one resource demand per task

NP-Completeness and Cook s Theorem

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Constraint-Based Scheduling: A Tutorial

Integrated support system for planning and scheduling /4/24 page 75 #101. Chapter 5 Sequencing and assignment Strategies

CSC2420 Spring 2015: Lecture 3

Exponential time algorithms for graph coloring

Literature Review of Single Machine Scheduling Problem with Uniform Parallel Machines

On-line machine scheduling with batch setups

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Bounded Cost Algorithms for Multivalued Consensus Using Binary Consensus Instances

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Online Scheduling for Cloud Computing and Different Service Levels

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Establishing a Mobile Conference Call Under Delay and Bandwidth Constraints

A Hybrid Heuristic Rule for Constrained Resource Allocation in PERT Type Networks

The P versus NP Solution

MIP-Based Approaches for Solving Scheduling Problems with Batch Processing Machines

Discuss the size of the instance for the minimum spanning tree problem.

Dynamic programming formulation

The Trip Scheduling Problem

Integer factorization is in P

Analysis of Approximation Algorithms for k-set Cover using Factor-Revealing Linear Programs

The Goldberg Rao Algorithm for the Maximum Flow Problem

Arithmetic Coding: Introduction

CAD Algorithms. P and NP

Today. Intro to real-time scheduling Cyclic executives. Scheduling tables Frames Frame size constraints. Non-independent tasks Pros and cons

Near Optimal Solutions

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

A Study of Crossover Operators for Genetic Algorithm and Proposal of a New Crossover Operator to Solve Open Shop Scheduling Problem

Transcription:

Lecture 2 Scheduling 1 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking into account the earliest starting times of the jobs, such that the makespan is minimized n = 4, p = (2, 4, 2, 3), r = (5, 4, 0, 3) -1-

Lecture 2 Scheduling 2 Classification - Examples 1 r j C max given: n jobs with processing times p 1,...,p n and release dates r 1,...,r n jobs have to be scheduled without preemption on one machine taking into account the earliest starting times of the jobs, such that the makespan is minimized n = 4, p = (2, 4, 2, 3), r = (5, 4, 0, 3) 3 4 1 2 0 5 10 12 Feasible Schedule with C max = 12 (schedule is optimal) -1-

Lecture 2 Scheduling 3 Classification - Examples F2 w j T j given n jobs with weights w 1,...,w n and due dates d 1,...,d n operations (i,j) with processing times p ij, i = 1, 2; j = 1,...,n jobs have to be scheduled on two machines such that operation (2,j) is scheduled on machine 2 and does not start before operation (1,j), which is scheduled on machine 1, is finished and the total weighted tardiness is minimized ( ) 2 1 3 n = 3, p =, w = (3, 1, 5), d = (6, 9, 4) 3 4 1-2-

Lecture 2 Scheduling 4 Classification - Examples F2 w j T j given n jobs with weights w 1,...,w n and due dates d 1,...,d n operations (i,j) with processing times p ij, i = 1, 2; j = 1,...,n jobs have to be scheduled on two machines such that operation (2,j) is schedules on machine 2 and does not start before operation (1,j), which is scheduled on machine 1, is finished and the total weighted ( tardiness ) is minimized 2 1 3 n = 3, p =, w = (3, 1, 5), d = (6, 9, 4) 3 4 1 M1 3 1 2 wj T j = 3(8 6) + (12 9) M2 3 1 2 +5(4 4) = 9 0 5 10 12 d 3 d 1 d 2-2-

Lecture 2 Scheduling 5 Classes of Schedules Nondelay Schedules: A feasible schedule is called a nondelay schedule if no machine is kept idle while a job/an operation is waiting for processing Example: P3 prec C max n = 6 p = (1, 1, 2, 2, 3, 3) 1 2 3 4 5 6-1-

Lecture 2 Scheduling 6 Classes of Schedules Nondelay Schedules: A feasible schedule is called a nondelay schedule if no machine is kept idle while a job/an operation is waiting for processing Example: P3 prec C max n = 6 p = (1, 1, 2, 2, 3, 3) Best nondelay: M1 M2 M3 1 2 3 4 5 6 1 2 3 4 5 6 Optimal M1 M2 M3 1 2 5 3 4 6-1-

Lecture 2 Scheduling 7 Classes of Schedules Remark: restricted to non preemptive schedules Active Schedules: A feasible schedule is called active if it is not possible to construct another schedule having at least one job/operation finishing earlier and no job/operation finishing later, possibly by changing the order of processing on the machines and Semi-Active Schedules: A feasible schedule is called semi-active if no job/operation can be finishing earlier without changing the order of processing on any one of the machines. -2-

Lecture 2 Scheduling 8 Classes of Schedules Examples of (semi)-active schedules: Prec: 1 2; 2 3 not semi-active M1 1 3 5 M2 2 4-3-

Lecture 2 Scheduling 9 Classes of Schedules Examples of (semi)-active schedules: Prec: 1 2; 2 3 not semi-active M1 1 3 5 M2 2 4 semi-active M1 1 3 5 M2 2 4-3-

Lecture 2 Scheduling 10 Classes of Schedules Examples of (semi)-active schedules: Prec: 1 2; 2 3 not semi-active M1 1 3 5 M2 2 4 semi-active M1 1 3 5 M2 2 4 active M1 1 5 3 M2 4 2-3-

Lecture 2 Scheduling 11 Classes of Schedules Properties: every nonpreemptive nondelay schedule is active every active schedule is semiactive if the objective criterion is regular, the set of active schedules contains an optimal schedule (regular = non decreasing with respect to the completion times) Summary: All schedules non- delay x active optimal schedule Semi active -4-

Lecture 2 Scheduling 12 Research topics for Scheduling determine border line between polynomially solvable and NP-hard models for polynomially solvable models find the most efficient solution method (low complexity) for NP-hard models develop enumerative methods (DP, branch and bound, branch and cut,...) develop heuristic approaches (priority based, local search,...) consider approximation methods (with quality guarantee)

Lecture 2 Scheduling 13 Intermezzo: Complexity Theory -1- mathematical framework to study the difficulty of algorithmic problems Notations/Definitions problem: generic description of a problem (e.g. 1 C j ) instance of a problem: given set of numerical data (e.g. n, p 1,...,p n ) size of an instance I: length of the string necessary to specify the data (Notation: I ) binary encoding: I = n + log(p 1 ) +... + log(p n ) unary encoding: I = n + p 1 +... + p n

Lecture 2 Scheduling 14 Intermezzo: Complexity Theory -2- Notations/Definitions efficiency of an algorithm: upper bound on number of steps depending on the size of the instance (worst case consideration) big O-notation: for an O(f(n)) algorithm a constant c > 0 and an integer n 0 exist, such that for an instance I with size n = I and n n 0 the number of steps is bounded by cf(n) Example: 7n 3 + 230n + 10 log(n) is O(n 3 ) (pseudo)polynomial algorithm: O(p( I )) algorithm, where p is a polynomial and I is coded binary (unary) Example: an O(n log( p j )) algorithm is a polynomial algorithm and an O(n p j ) algorithm is a pseudopolynomial algorithm

Lecture 2 Scheduling 15 Intermezzo: Complexity Theory -3- Classes P and N P a problem is (pseudo)polynomial solvable if a (pseudo)polynomial algorithm exists which solves the problem Class P: contains all decision problems which are polynomial solvable Class N P: contains all decision problems for which - given an yes instance - the correct answer, given a proper clue, can be verified by a polynomial algorithm Remark: each optimization problem has a corresponding decision problem by introducing a threshold for the objective value (does a schedule exist with objective smaller k?)

Lecture 2 Scheduling 16 Intermezzo: Complexity Theory -4- Polynomial reduction a decision problem P polynomially reduces to a problem Q, if a polynomial function g exists that transforms instances of P to instances of Q such that I is a yes instance of P if and only is g(i) is a yes instance of Q Notation: P Q NP-complete a decision problem P N P is called NP-complete if all problems from the class N P polynomially reduce to P an optimization problem is called NP-hard if the corresponding decision problem is NP-complete

Lecture 2 Scheduling 17 Intermezzo: Complexity Theory -5- Examples of NP-complete problems: SATISFIABILITY: decision problem in Boolean logic, Cook in 1967 showed that all problems from N P polynomially reduce to it PARTITION: given n positive integers s 1,...,s n and b = 1/2 n j=1 s j does there exist a subset J I = {1,...,n} such that s j = b = j J j I\J s j

Lecture 2 Scheduling 18 Intermezzo: Complexity Theory -6- Examples of NP-complete problems (cont.): 3-PARTITION: given 3n positive integers s 1,...,s 3n and b with b/4 < s j < b/2, j = 1,...,3n and b = 1/n 3n j=1 s j do there exist disjoint subsets J i I = {1,...,3n} such that j J i s j = b; i = 1,...,n

Lecture 2 Scheduling 19 Intermezzo: Complexity Theory -7- Proving NP-completeness If an NP-complete problem P can be polynomially reduced to a problem Q N P, then this proves that Q is NP-complete (transitivity of polynomial reductions) Example: PARTITION P2 C max Proof: on the board Famous open problem: Is P = N P? solving one NP-complete problem polynomially, would imply P = N P

Lecture 2 Scheduling 20 Single machine models Observation: for non-preemptive problems and regular objectives, a sequence in which the jobs are processed is sufficient to describe a solution Dispatching (priority) rules static rules - not time dependent e.g. shortest processing time first, earliest due (in absence of release dates) date first dynamic rules - time dependent e.g. largest available job (i.e. r j t); t current time for some problems dispatching rules lead to optimal solutions

Lecture 2 Scheduling 21 Single machine models: 1 w j C j -1- Given: n jobs with processing times p 1,...,p n and weights w 1,...,w n Consider case: w 1 =... = w n (= 1):

Lecture 2 Scheduling 22 Single machine models: 1 w j C j -1- Given: n jobs with processing times p 1,...,p n and weights w 1,...,w n Consider special case: w 1 =... = w n (= 1): SPT-rule: shortest processing time first Theorem: SPT is optimal for 1 C j Proof: by an exchange argument (on board) Complexity: O(n log(n))

Lecture 2 Scheduling 23 Single machine models: 1 w j C j -2- General case WSPT-rule: weighted shortest processing time first, i.e. sort jobs by increasing p j /w j -values Theorem: WSPT is optimal for 1 w j C j Proof: by an exchange argument (exercise) Complexity: O(n log(n)) Further results: 1 tree w j C j can be solved by in polynomial time (O(n log(n))) (see [Brucker 2004]) 1 prec C j is NP-hard in the strong sense (see [Brucker 2004])

Lecture 2 Scheduling 24 Single machine models: 1 prec f max -1- Given: n jobs with processing times p 1,...,p n precedence constraints between the jobs non-decreasing functions f 1,...,f n objective criterion f max = max{f 1 (C 1 ),...,f n (C n )} Observation: completion time of last job = p j

Lecture 2 Scheduling 25 Single machine models: 1 prec f max -1- Given: n jobs with processing times p 1,...,p n precedence constraints between the jobs regular functions f 1,...,f n objective criterion f max = max{f 1 (C 1 ),...,f n (C n )} Observation: completion time of last job = p j Method plan backwards from p j to 0 from all available jobs (jobs from which all successors have already been scheduled), schedule job which is cheapest on that position

Lecture 2 Scheduling 26 Single machine models: 1 prec f max -2- S set of already scheduled jobs (initial: S = ) J set of all jobs, which successors have been scheduled (initial: all jobs without successors) t time where next job will be completed (initial: t = p j ) Algorithm 1 prec f max (Lawler s Algorithm) REPEAT select j J such that f j (t) = min k J f k (t); schedule j such that it completes at t; add j to S, delete j from J and update J; t := t p j ; UNTIL J =.

Lecture 2 Scheduling 27 Single machine models: 1 prec f max -3- Theorem: Algorithm 1 prec f max is optimal for 1 prec f max Proof: on the board Complexity: O(n 2 )