Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

Size: px
Start display at page:

Download "Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on"

Transcription

1 6117CIT - Adv Topics in Computing Sci at Nathan 1 Algorithms The intelligence behind the hardware Outline! Approximation Algorithms The class APX! Some complexity classes, like PTAS and FPTAS! Illustration of some PTAS! Based on P. Schuurman and G. Woeginger (2001), Approximation Schemes - A Tutorial. M. Mastrolilli course notes 2 The class APX! (an abbreviation of "approximable").! The set of NP optimization problems that allow polynomial-time approximation algorithms with approximation ratio bounded by a constant (or constant-factor approximation algorithms for short).! Problems in this class have efficient algorithms that can find an answer within some fixed percentage of the optimal answer.! An approximation algorithm is called a!- approximation algorithm for some constant! if it can be proven that the solution that the algorithm finds is at most! times worse than the optimal solution. 3 1

2 Review from week 2! The vertex cover problem and traveling salesman problem with triangle inequality each have simple 2- approximation algorithms.! The traveling salesman problem with arbitrary edge-lengths can not be approximated with approximation ratio bounded by a constant as long as the Hamiltonianpath problem can not be solved in polynomial time. 4 Alternative view on PTAS! If there is a polynomial-time algorithm to solve a problem within every fixed percentage (one algorithm for each percentage), then the problem is said to have a polynomial-time approximation scheme (PTAS) Unless P=NP, it can be shown that there are problems that are in APX but not in PTAS; that is, problems that can be approximated within some constant factor, but not every constant factor. 5 More on APX! A problem is said to be APX-hard if there is a PTAS reduction from every problem in APX to that problem,! A problem is APX-complete if the problem is APX-hard and also in APX.! As a consequence of PTAS! APX, no APX-hard problem is in PTAS. 6 2

3 Focus on Optimization Problems! Notation We use I for an instance of an optimization problem We use I =n, for the length of the input instance We use Opt(I) for the value of the optimal solution! We focus on minimization problems in this lecture, but all concepts are symmetric for maximization problems. 7!- Approximation Algorithm We denote A(I) = solution value. An algorithm is an!-approximation Algorithm if A(I) "! Opt(I) for all instances and the running time is polynomial in I! = worst-case approximation ratio! >= 1 Good:! close to 1 8 PTAS: Polynomial Time Approximation Scheme This is a family {A#}#>0 of (1+#)-approximation algorithms with running time polynomial in I As observed in last lecture, the scheme fits the definition if the running time is exponential in 1/# : e.g. O( I 1/# ) NOTE: FPTAS: Fully PTAS running time also polynomial in 1/# : e.g. O( I /# 3 ) 9 3

4 Strongly and Weakly NP-hard! If a problem is NP-hard even if the input is encoded in unary, then it is called strongly NP-hard = NP-hard in the strong sense = unary NP-hard! If a problem is polynomially solvable under a unary encoding, then it is solvable in pseudo-polynomial time.! NP-Hard in the strong sense is contained within NP-Hard in the weak sense 10 Complexity Classes Relationships NP APX Pseudo-Poly PTAS FPTAS P 11 Some Known Approximation Algorithms Non-constant worst-case ratio Graph coloring O(n 1/2-e ) Total flow time O(n 1/2 ) Set covering O(log n) Vertex cover O(log n) Constant worst-case ratio TSP with triangle-inequalities 3/2 Max Sat PTAS Bin packing FPTAS Makespan on 2 machines 12 4

5 The first Approximation Algorithm (Graham 66)!""# $%& Makespan minimization on' $'identical machines (strongly'n!-hard) 1 - )* $'identical machines '''' +'jobs with lengths', -.', /.'0.', + Objective, smallest # $%& 1 / 1 $ # $%& 13 Algorithm: List-Scheduling (LS) LS: schedule jobs in any given order to the first available (i.e. idle) machine List:'2 -.'2 /'.'2 4'.'2 3'.'2 6'.' / / # $%& 14 Analysis of LS-Algorithm! Define the lower bound LB=max {max p j ;! p j /m}! Starting time of the FINAL job s f : starting time of the job that completes last! Observation (result by LS-Algorithm): 7 # $%& LS = s f +p f! Let E i be the completion (end) time of machine M i 15 5

6 LS Analysis (cont)! LS places the last job in the machine that is mostly available s f! E i (for all other machines i!f) s f = E f - p f! This implies (summing for each machine) that m s f! [" i=1 (E i )] - p f s f! (1/m)([" i=1 E i ]-p f ) =(1/m)([" p j ] -p f )! But C max LS =s f +p f!(1/m) " p j + p f (1-(1/m))! Thus C max LS! [2- (1/m)]Opt 16 LS: Analysis Theorem: LS is a (2-1/m)-approximation algorithm. The approximation ratio is tight. Example: p 1 = p 2 = 1 and p 3 = 2 M 1 J 1 M 2 J 2 J 3 C max =3 M 1 M 2 J 3 J 1 J 2 C max =2 17 Linear Programming based approximation algorithms IDEA ILP relax LP difficult poly time Opt Opt LP A(I) # $ Opt round to integral values 18 6

7 Example: R2 C max R2 C max : Makespan minimization on 2 unrelated machines (weakly NP-hard) I: 2 unrelated machines n jobs Job j has length p 1j on machine M 1 p 2j on machine M 2 M 1 M 2 C max 19 Integer Linear Program (ILP)! We will encode by x ij the fact that job j is placed in machine i! Then the ILP looks as follows Minimize C max Subject to x 1j + x 2j =1, for j=1, n (each jobs is assigned once)! j=1 n p 1j x 1j " C max! j=1 n p 1j x 1j " C max x 1j, x 2j! {0, 1} (it most be on one machine or the other) j=1,,n 20 Linear Program (LP) Relaxation! We will encode by x ij the fact that job j is placed in machine i! Then the ILP looks as follows Minimize C max Subject to x 1j + x 2j =1, for j=1, n (each jobs is assigned once)! j=1 n p 1j x 1j " C max! j=1 n p 1j x 1j " C max x 1j, x 2j " 0 (it most be on some machine or split) j=1,,n 21 7

8 Analysis of the number of fractional jobs! Known: a basic optimal LP solution has the property that the number of variables that get positive values is at most the number of rows in the constraint matrix Thus, there are at most n+2 variables with positive values! Since C max is always positive, at most n+1 of the x ij variables are positive We reduce the value C max of if we make any pair of variables ofr the same job to zero! Every job has at least one positive variable associated with it Because x 1j + x 2j =1! CONCLUSION: At most 1 (ONE) job has been split onto two machines 22 Rounding M 1 M 2 J 1 J 4 J 2 J 3 J 6 J 5 J 5 Opt LP!!Opt J 5 : fractional M 1 M 2 J 1 J 4 J 2 J 3 J 6 J 5 J 5!!Opt ROUNDING!!"Opt 23 How to get a PTAS Input I Algorithm A Output A(I): feasible sol. for I Add structure IDEA:! Add more structure (depending on ") as "##, additional structure # 0! Compare as "##$!%&'""()%*'"(!#&)* 24 8

9 Structuring the Input! I I # difficult poly time Opt Opt # A(I) " (1+!) Opt back in poly time 25 Example!"P2 C max P2 C max Makespan minimization on 2 identical machines (weakly NP-hard) I: 2 identical machines n jobs with lengths p 1, p 2,, p n M1 M 2 Lower bound is again LB=max {max p j ; # p j /2} Thus LB " Opt " 2 LB C max 26 How to round the input! I I # p j >! LB big p j "! LB small! p j# := p j! $S/ (! LB)% jobs of length! LB where S= # small p j 27 9

10 Analysis of Rounded Instance I # Recall that! " # $ " 2&' How many big jobs? a big job has " #$ ( # &' This implies $)big* " 2/# How many conglomerates jobs? ow man1 small #o4s 5 A conglomerate of small jobs has " #$ 6 # &' This implies $)conglomerates* " 2/# LEMMA: The rounded instance has a constant(#) number of jobs. COROLARY: We can find its optimal solution in constant time!! PROOF: Use exhaustive search 28 Back to a feasible solution #&' #&' #&' #&' #&' ;"t $ small #&' #&' #&' #&' #&' "#&' Sum of the small 29 Back to a feasible solution (ctd) #&' #&' #&' #&' #&' ;"t $ #&' #&' #&' #&' #&' C ma> " ;"t $? #&' " )1?#* ;"t $ ;"t $ 30 10

11 How much error is introduced? C max! Opt # + " LB Opt #! Opt + " LB C max! Opt + 2" LB! (1+2") Opt # Wait till next slide 31!pt vs.!pt % (Case 1:LUCKY)M 1 big big... big Opt #! Opt M 2 big... "LB "LB (Case 2:Optimal solution here has to be as good as LS) M 1 M 2 big big big big... "LB... "LB Opt #! C max LS =s f +p f!(1/m) # p j + p f (1-(1/m)) Since m=2, and (1/m) # p j! Opt and p f /2! "LB, we have Opt #! Opt + "LB 32 Structuring the execution of an algorithm IDEA: take an exact but slow algorithm A and interact with it while it is working. Clean-up part of its memory. As a result the algorithm becomes faster (less data to process) and generates incorrect output. IDEAL CASE: the time complexity becomes polynomial and the incorrect output is a good approximation Compare: Tabu search vs. branch & bound 33 11

12 Example: R2 C max Exact Algorithm (Dynamic Program) Encode a partial schedule for the first k jobs by a vector (state) [!, "]! = total processing time on M 1 " = total processing time on M 2 Assign job one by one and update the states appropriately 34 Dynamic Program 1. S 0 #{ [0,0] } 2. For k # 1 to n do 3. S k # {} 4. For all [!, "] in S k-1 do 5. add the two states 6. [! + p 1k, "] and 7. [!, " + p 2k ] to S k 8. End For 9. End For 10. Output min{ max{!, "} [!, "] in S n } 35 (Perturbed) Dynamic Program 1. S 0 #{ [0,0] } 2. For k # 1 to n do 3. S k # {} 4. For all [!, "] in S k-1 do 5. add the two states 6. [! + p 1k, "] and 7. [!, " + p 2k ] to S k 8. End For 9. CLEAN UP S k 10.End For 11.Output min{ max{!, "} [!, "] in S n } 36 12

13 P :=! j max{p 1j, p 2j } State space in PxP box " := (1+#) 1/n ", " 2, " 3,... State Space S k " i " i+1 " i+2 " i+3 " i+4 37 Clean up S k P :=! j max{p 1j, p 2j } State space in PxP box " := (1+#) 1/n ", " 2, " 3,... " i " i+1 " i+2 " i+3 " i+4 38 Running Time The running time is n times the number of boxes. The number of boxes is at most (b+1) 2 where " b = P Therefore b=log(p) / log(") Since " = (1+#) 1/n then b $ n log(p) /log(1+#) $ n log(p) (1+#)/# Polynomial on the size of the unary encoding 39 13

14 How much error is introduced by clean up? Clean up replaces state "!!"# by another state "!"!""# in the same box:!/# $!" $!# "/# $ "" $ "# Therefore, (derivations can show) error $ # There are n clean up phases, and each clean up phase has error # Overall error $ # n = 1(% In-Approximability Techniques $%& '% &e 'i*p,%-e.he e0i*.ence %3 a 5T789 MAIN IDEA: Prove that the existence of a polynomial time approximation algorithm for problem p with worst case guarantee better than! implies the existence of an exact polynomial time algorithm for an NP-hard problem q (which implies P=NP) 42 14

15 Other general techniques! For FPTAS: Strong NP-hardness implies no FPTAS! For PTAS: Gap-technique ==> implies no PTAS MAX-SNP-hardness Implies no PTAS 43 Example to disproof existence of an FPTAS (unless P=NP)!""# $%& Makespan minimization on $ identical machines () $ identical machines * jobs with lengths +, /- + * PROOF: Assume +, /- + * are integers encoded in unary (e.g., +, 01 write: +, 0,,,2 Known:!""# $%& is NP-hard even under unary encoding 3! )0! + 4 polynomial in size of input "! and 5+6 is an integer in 7 8-,-.- / -! 9 44 Continuation (no FPTAS)!"##$%& () *+,-!.$/ & 7$6#8&934:; " %(:; < $ = % ( " $ ##!& ' ( ( ( % B ) 6 + ' & 6(9 15$$%&! > = ()@ 7(88 *+,-!A?+ ( ) B + ( C"))3)D,36& E < ) ( 6 ( + #$8:)$63(8A! :;(2 " ;,<# ;, <,/.!2 5+6 " 5+6 <,/.! This gives :;(2 " 5+6 <, implies :;(205+6 implies!0>!?? 45 15

16 The gap technique IDEA: Let f be a minimization with integral objective function values (costs). Let g be a fixed integer. Assume that the problem of deciding whether an instance of p has a feasible solution with cost at most g is NP-hard. Then p does not have an approximation algorithm with ratio! < (g + 1)/g, unless P=NP. 46 The Gap Technique (ctd) hard to decide if the cost is " & & &'( REDUCTION: Assume for any instance " it exists an a-approximation algorithm # with! $ %& ' ()*&. If,-.%") " &, then #%") "! & $ & ' ( # /01 2 If,-.%") >= & ' (, then #%") >= & ' ( # 3, possible costs of p 47 Example Problem (bin packing or scheduling with deadline) Input: 4 jobs with lengths - (, - 2, 7, - 4 and a hard deadline 8 Goal: find the minimum number 9 of machines on which all jobs can be completed before their deadline

17 Example (ctd) THEOREM. Deciding if "! # is $%-hard& PROOF: (use partition). Gap Technique For the Bin packing problem no " -approximation algorithm is possible with " ' ()# (that is, no PTAS!), unless %*$%&

This means that we can assume each list ) is

This means that we can assume each list ) is This means that we can assume each list ) is of the form ),, ( )with < and Since the sizes of the items are integers, there are at most +1pairs in each list Furthermore, if we let = be the maximum possible

More information

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved. Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should

More information

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved. Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 P and NP P: The family of problems that can be solved quickly in polynomial time.

More information

Linear Programming. Scheduling problems

Linear Programming. Scheduling problems Linear Programming Scheduling problems Linear programming (LP) ( )., 1, for 0 min 1 1 1 1 1 11 1 1 n i x b x a x a b x a x a x c x c x z i m n mn m n n n n! = + + + + + + = Extreme points x ={x 1,,x n

More information

Scheduling on Unrelated Parallel Machines. Approximation Algorithms, V. V. Vazirani Book Chapter 17

Scheduling on Unrelated Parallel Machines. Approximation Algorithms, V. V. Vazirani Book Chapter 17 Scheduling on Unrelated Parallel Machines Approximation Algorithms, V. V. Vazirani Book Chapter 17 Nicolas Karakatsanis, 2008 Description of the problem Problem 17.1 (Scheduling on unrelated parallel machines)

More information

Bin packing and scheduling

Bin packing and scheduling Sanders/van Stee: Approximations- und Online-Algorithmen 1 Bin packing and scheduling Overview Bin packing: problem definition Simple 2-approximation (Next Fit) Better than 3/2 is not possible Asymptotic

More information

Lecture 2: Scheduling on Parallel Machines

Lecture 2: Scheduling on Parallel Machines Lecture 2: Scheduling on Parallel Machines Loris Marchal October 17, 2012 Parallel environment alpha in Graham s notation): P parallel identical Q uniform machines: each machine has a given speed speed

More information

Approximation Basics

Approximation Basics Approximation Basics, Concepts, and Examples Xiaofeng Gao Department of Computer Science and Engineering Shanghai Jiao Tong University, P.R.China Fall 2012 Special thanks is given to Dr. Guoqiang Li for

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms What do you do when a problem is NP-complete? or, when the polynomial time solution is impractically slow? assume input is random, do expected performance. Eg, Hamiltonian path

More information

1 Ordinary Load Balancing

1 Ordinary Load Balancing Comp 260: Advanced Algorithms Prof. Lenore Cowen Tufts University, Spring 208 Scribe: Emily Davis Lecture 8: Scheduling Ordinary Load Balancing Suppose we have a set of jobs each with their own finite

More information

8 Knapsack Problem 8.1 (Knapsack)

8 Knapsack Problem 8.1 (Knapsack) 8 Knapsack In Chapter 1 we mentioned that some NP-hard optimization problems allow approximability to any required degree. In this chapter, we will formalize this notion and will show that the knapsack

More information

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle Directed Hamiltonian Cycle Chapter 8 NP and Computational Intractability Claim. G has a Hamiltonian cycle iff G' does. Pf. Suppose G has a directed Hamiltonian cycle Γ. Then G' has an undirected Hamiltonian

More information

APTAS for Bin Packing

APTAS for Bin Packing APTAS for Bin Packing Bin Packing has an asymptotic PTAS (APTAS) [de la Vega and Leuker, 1980] For every fixed ε > 0 algorithm outputs a solution of size (1+ε)OPT + 1 in time polynomial in n APTAS for

More information

Machine scheduling with resource dependent processing times

Machine scheduling with resource dependent processing times Mathematical Programming manuscript No. (will be inserted by the editor) Alexander Grigoriev Maxim Sviridenko Marc Uetz Machine scheduling with resource dependent processing times Received: date / Revised

More information

A New Approximation Algorithm for the Asymmetric TSP with Triangle Inequality By Markus Bläser

A New Approximation Algorithm for the Asymmetric TSP with Triangle Inequality By Markus Bläser A New Approximation Algorithm for the Asymmetric TSP with Triangle Inequality By Markus Bläser Presented By: Chris Standish chriss@cs.tamu.edu 23 November 2005 1 Outline Problem Definition Frieze s Generic

More information

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund Multiprocessor Scheduling I: Partitioned Scheduling Prof. Dr. Jian-Jia Chen LS 12, TU Dortmund 22/23, June, 2015 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 1 / 47 Outline Introduction to Multiprocessor

More information

Travelling Salesman Problem

Travelling Salesman Problem Travelling Salesman Problem Fabio Furini November 10th, 2014 Travelling Salesman Problem 1 Outline 1 Traveling Salesman Problem Separation Travelling Salesman Problem 2 (Asymmetric) Traveling Salesman

More information

Integer Linear Programs

Integer Linear Programs Lecture 2: Review, Linear Programming Relaxations Today we will talk about expressing combinatorial problems as mathematical programs, specifically Integer Linear Programs (ILPs). We then see what happens

More information

Scheduling Parallel Jobs with Linear Speedup

Scheduling Parallel Jobs with Linear Speedup Scheduling Parallel Jobs with Linear Speedup Alexander Grigoriev and Marc Uetz Maastricht University, Quantitative Economics, P.O.Box 616, 6200 MD Maastricht, The Netherlands. Email: {a.grigoriev, m.uetz}@ke.unimaas.nl

More information

More Approximation Algorithms

More Approximation Algorithms CS 473: Algorithms, Spring 2018 More Approximation Algorithms Lecture 25 April 26, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 28 Formal definition of approximation

More information

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling.

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling. Algorithm Design Scheduling Algorithms Part 2 Parallel machines. Open-shop Scheduling. Job-shop Scheduling. 1 Parallel Machines n jobs need to be scheduled on m machines, M 1,M 2,,M m. Each machine can

More information

Algorithms Design & Analysis. Approximation Algorithm

Algorithms Design & Analysis. Approximation Algorithm Algorithms Design & Analysis Approximation Algorithm Recap External memory model Merge sort Distribution sort 2 Today s Topics Hard problem Approximation algorithms Metric traveling salesman problem A

More information

Approximation Preserving Reductions

Approximation Preserving Reductions Approximation Preserving Reductions - Memo Summary - AP-reducibility - L-reduction technique - Complete problems - Examples: MAXIMUM CLIQUE, MAXIMUM INDEPENDENT SET, MAXIMUM 2-SAT, MAXIMUM NAE 3-SAT, MAXIMUM

More information

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size.

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size. 10 2.2. CLASSES OF COMPUTATIONAL COMPLEXITY An optimization problem is defined as a class of similar problems with different input parameters. Each individual case with fixed parameter values is called

More information

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs Computational Complexity IE 496 Lecture 6 Dr. Ted Ralphs IE496 Lecture 6 1 Reading for This Lecture N&W Sections I.5.1 and I.5.2 Wolsey Chapter 6 Kozen Lectures 21-25 IE496 Lecture 6 2 Introduction to

More information

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Week Cuts, Branch & Bound, and Lagrangean Relaxation Week 11 1 Integer Linear Programming This week we will discuss solution methods for solving integer linear programming problems. I will skip the part on complexity theory, Section 11.8, although this is

More information

Computational Complexity

Computational Complexity Computational Complexity Problems, instances and algorithms Running time vs. computational complexity General description of the theory of NP-completeness Problem samples 1 Computational Complexity What

More information

Lecture 4: An FPTAS for Knapsack, and K-Center

Lecture 4: An FPTAS for Knapsack, and K-Center Comp 260: Advanced Algorithms Tufts University, Spring 2016 Prof. Lenore Cowen Scribe: Eric Bailey Lecture 4: An FPTAS for Knapsack, and K-Center 1 Introduction Definition 1.0.1. The Knapsack problem (restated)

More information

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT ,7 CMPUT 675: Approximation Algorithms Fall 2011 Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Pacing, MAX-SAT Lecturer: Mohammad R. Salavatipour Scribe: Weitian Tong 6.1 Bin Pacing Problem Recall the bin pacing

More information

The Knapsack Problem. 28. April /44

The Knapsack Problem. 28. April /44 The Knapsack Problem 20 10 15 20 W n items with weight w i N and profit p i N Choose a subset x of items Capacity constraint i x w i W wlog assume i w i > W, i : w i < W Maximize profit i x p i 28. April

More information

Improved Bounds for Flow Shop Scheduling

Improved Bounds for Flow Shop Scheduling Improved Bounds for Flow Shop Scheduling Monaldo Mastrolilli and Ola Svensson IDSIA - Switzerland. {monaldo,ola}@idsia.ch Abstract. We resolve an open question raised by Feige & Scheideler by showing that

More information

COSC 341: Lecture 25 Coping with NP-hardness (2)

COSC 341: Lecture 25 Coping with NP-hardness (2) 1 Introduction Figure 1: Famous cartoon by Garey and Johnson, 1979 We have seen the definition of a constant factor approximation algorithm. The following is something even better. 2 Approximation Schemes

More information

1 Column Generation and the Cutting Stock Problem

1 Column Generation and the Cutting Stock Problem 1 Column Generation and the Cutting Stock Problem In the linear programming approach to the traveling salesman problem we used the cutting plane approach. The cutting plane approach is appropriate when

More information

1 The Knapsack Problem

1 The Knapsack Problem Comp 260: Advanced Algorithms Prof. Lenore Cowen Tufts University, Spring 2018 Scribe: Tom Magerlein 1 Lecture 4: The Knapsack Problem 1 The Knapsack Problem Suppose we are trying to burgle someone s house.

More information

Problem Complexity Classes

Problem Complexity Classes Problem Complexity Classes P, NP, NP-Completeness and Complexity of Approximation Joshua Knowles School of Computer Science The University of Manchester COMP60342 - Week 2 2.15, March 20th 2015 In This

More information

5 Integer Linear Programming (ILP) E. Amaldi Foundations of Operations Research Politecnico di Milano 1

5 Integer Linear Programming (ILP) E. Amaldi Foundations of Operations Research Politecnico di Milano 1 5 Integer Linear Programming (ILP) E. Amaldi Foundations of Operations Research Politecnico di Milano 1 Definition: An Integer Linear Programming problem is an optimization problem of the form (ILP) min

More information

Computational complexity theory

Computational complexity theory Computational complexity theory Introduction to computational complexity theory Complexity (computability) theory deals with two aspects: Algorithm s complexity. Problem s complexity. References S. Cook,

More information

Lec. 2: Approximation Algorithms for NP-hard Problems (Part II)

Lec. 2: Approximation Algorithms for NP-hard Problems (Part II) Limits of Approximation Algorithms 28 Jan, 2010 (TIFR) Lec. 2: Approximation Algorithms for NP-hard Problems (Part II) Lecturer: Prahladh Harsha Scribe: S. Ajesh Babu We will continue the survey of approximation

More information

Knapsack. Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i

Knapsack. Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i Knapsack Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i Goal: find a subset of items of maximum profit such that the item subset fits in the bag Knapsack X: item set

More information

ECS122A Handout on NP-Completeness March 12, 2018

ECS122A Handout on NP-Completeness March 12, 2018 ECS122A Handout on NP-Completeness March 12, 2018 Contents: I. Introduction II. P and NP III. NP-complete IV. How to prove a problem is NP-complete V. How to solve a NP-complete problem: approximate algorithms

More information

P,NP, NP-Hard and NP-Complete

P,NP, NP-Hard and NP-Complete P,NP, NP-Hard and NP-Complete We can categorize the problem space into two parts Solvable Problems Unsolvable problems 7/11/2011 1 Halting Problem Given a description of a program and a finite input, decide

More information

Topics in Theoretical Computer Science April 08, Lecture 8

Topics in Theoretical Computer Science April 08, Lecture 8 Topics in Theoretical Computer Science April 08, 204 Lecture 8 Lecturer: Ola Svensson Scribes: David Leydier and Samuel Grütter Introduction In this lecture we will introduce Linear Programming. It was

More information

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case

More information

Now just show p k+1 small vs opt. Some machine gets k=m jobs of size at least p k+1 Can also think of it as a family of (1 + )-approximation algorithm

Now just show p k+1 small vs opt. Some machine gets k=m jobs of size at least p k+1 Can also think of it as a family of (1 + )-approximation algorithm Review: relative approx. alg by comparison to lower bounds. TS with triangle inequality: A nongreedy algorithm, relating to a clever lower bound nd minimum spanning tree claim costs less than TS tour Double

More information

Algorithms. Grad Refresher Course 2011 University of British Columbia. Ron Maharik

Algorithms. Grad Refresher Course 2011 University of British Columbia. Ron Maharik Algorithms Grad Refresher Course 2011 University of British Columbia Ron Maharik maharik@cs.ubc.ca About this talk For those incoming grad students who Do not have a CS background, or Have a CS background

More information

Polynomial-time reductions. We have seen several reductions:

Polynomial-time reductions. We have seen several reductions: Polynomial-time reductions We have seen several reductions: Polynomial-time reductions Informal explanation of reductions: We have two problems, X and Y. Suppose we have a black-box solving problem X in

More information

Unit 1A: Computational Complexity

Unit 1A: Computational Complexity Unit 1A: Computational Complexity Course contents: Computational complexity NP-completeness Algorithmic Paradigms Readings Chapters 3, 4, and 5 Unit 1A 1 O: Upper Bounding Function Def: f(n)= O(g(n)) if

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Computational Complexity CLRS 34.1-34.4 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 50 Polynomial

More information

The Power of Preemption on Unrelated Machines and Applications to Scheduling Orders

The Power of Preemption on Unrelated Machines and Applications to Scheduling Orders MATHEMATICS OF OPERATIONS RESEARCH Vol. 37, No. 2, May 2012, pp. 379 398 ISSN 0364-765X (print) ISSN 1526-5471 (online) http://dx.doi.org/10.1287/moor.1110.0520 2012 INFORMS The Power of Preemption on

More information

Computational complexity theory

Computational complexity theory Computational complexity theory Introduction to computational complexity theory Complexity (computability) theory deals with two aspects: Algorithm s complexity. Problem s complexity. References S. Cook,

More information

Decision Procedures An Algorithmic Point of View

Decision Procedures An Algorithmic Point of View An Algorithmic Point of View ILP References: Integer Programming / Laurence Wolsey Deciding ILPs with Branch & Bound Intro. To mathematical programming / Hillier, Lieberman Daniel Kroening and Ofer Strichman

More information

Approximation Schemes for Parallel Machine Scheduling Problems with Controllable Processing Times

Approximation Schemes for Parallel Machine Scheduling Problems with Controllable Processing Times Approximation Schemes for Parallel Machine Scheduling Problems with Controllable Processing Times Klaus Jansen 1 and Monaldo Mastrolilli 2 1 Institut für Informatik und Praktische Mathematik, Universität

More information

Approximation Schemes A Tutorial

Approximation Schemes A Tutorial Approximation Schemes A Tutorial Petra Schuurman Gerhard J. Woeginger Summary: This tutorial provides an introduction into the area of polynomial time approximation schemes. The underlying ideas, the main

More information

P C max. NP-complete from partition. Example j p j What is the makespan on 2 machines? 3 machines? 4 machines?

P C max. NP-complete from partition. Example j p j What is the makespan on 2 machines? 3 machines? 4 machines? Multiple Machines Model Multiple Available resources people time slots queues networks of computers Now concerned with both allocation to a machine and ordering on that machine. P C max NP-complete from

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

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

CS264: Beyond Worst-Case Analysis Lecture #15: Smoothed Complexity and Pseudopolynomial-Time Algorithms CS264: Beyond Worst-Case Analysis Lecture #15: Smoothed Complexity and Pseudopolynomial-Time Algorithms Tim Roughgarden November 5, 2014 1 Preamble Previous lectures on smoothed analysis sought a better

More information

11.1 Set Cover ILP formulation of set cover Deterministic rounding

11.1 Set Cover ILP formulation of set cover Deterministic rounding CS787: Advanced Algorithms Lecture 11: Randomized Rounding, Concentration Bounds In this lecture we will see some more examples of approximation algorithms based on LP relaxations. This time we will use

More information

Asymptotic Polynomial-Time Approximation (APTAS) and Randomized Approximation Algorithms

Asymptotic Polynomial-Time Approximation (APTAS) and Randomized Approximation Algorithms Approximation Algorithms Asymptotic Polynomial-Time Approximation (APTAS) and Randomized Approximation Algorithms Jens Egeblad November 29th, 2006 Agenda First lesson (Asymptotic Approximation): Bin-Packing

More information

Analysis of Algorithms. Unit 5 - Intractable Problems

Analysis of Algorithms. Unit 5 - Intractable Problems Analysis of Algorithms Unit 5 - Intractable Problems 1 Intractable Problems Tractable Problems vs. Intractable Problems Polynomial Problems NP Problems NP Complete and NP Hard Problems 2 In this unit we

More information

Solutions to Exercises

Solutions to Exercises 1/13 Solutions to Exercises The exercises referred to as WS 1.1(a), and so forth, are from the course book: Williamson and Shmoys, The Design of Approximation Algorithms, Cambridge University Press, 2011,

More information

Integer Linear Programming (ILP)

Integer Linear Programming (ILP) Integer Linear Programming (ILP) Zdeněk Hanzálek, Přemysl Šůcha hanzalek@fel.cvut.cz CTU in Prague March 8, 2017 Z. Hanzálek (CTU) Integer Linear Programming (ILP) March 8, 2017 1 / 43 Table of contents

More information

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle 8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,

More information

All-norm Approximation Algorithms

All-norm Approximation Algorithms All-norm Approximation Algorithms Yossi Azar Leah Epstein Yossi Richter Gerhard J. Woeginger Abstract A major drawback in optimization problems and in particular in scheduling problems is that for every

More information

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

CS264: Beyond Worst-Case Analysis Lecture #18: Smoothed Complexity and Pseudopolynomial-Time Algorithms CS264: Beyond Worst-Case Analysis Lecture #18: Smoothed Complexity and Pseudopolynomial-Time Algorithms Tim Roughgarden March 9, 2017 1 Preamble Our first lecture on smoothed analysis sought a better theoretical

More information

ILP Formulations for the Lazy Bureaucrat Problem

ILP Formulations for the Lazy Bureaucrat Problem the the PSL, Université Paris-Dauphine, 75775 Paris Cedex 16, France, CNRS, LAMSADE UMR 7243 Department of Statistics and Operations Research, University of Vienna, Vienna, Austria EURO 2015, 12-15 July,

More information

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P Easy Problems vs. Hard Problems CSE 421 Introduction to Algorithms Winter 2000 NP-Completeness (Chapter 11) Easy - problems whose worst case running time is bounded by some polynomial in the size of the

More information

Lecture 11 October 7, 2013

Lecture 11 October 7, 2013 CS 4: Advanced Algorithms Fall 03 Prof. Jelani Nelson Lecture October 7, 03 Scribe: David Ding Overview In the last lecture we talked about set cover: Sets S,..., S m {,..., n}. S has cost c S. Goal: Cover

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 0, Winter 08 Design and Analysis of Algorithms Lecture 8: Consolidation # (DP, Greed, NP-C, Flow) Class URL: http://vlsicad.ucsd.edu/courses/cse0-w8/ Followup on IGO, Annealing Iterative Global Optimization

More information

ABHELSINKI UNIVERSITY OF TECHNOLOGY

ABHELSINKI UNIVERSITY OF TECHNOLOGY Approximation Algorithms Seminar 1 Set Cover, Steiner Tree and TSP Siert Wieringa siert.wieringa@tkk.fi Approximation Algorithms Seminar 1 1/27 Contents Approximation algorithms for: Set Cover Steiner

More information

Σ w j. Σ v i KNAPSACK. for i = 1, 2,..., n. and an positive integers K and W. Does there exist a subset S of {1, 2,..., n} such that: and w i

Σ w j. Σ v i KNAPSACK. for i = 1, 2,..., n. and an positive integers K and W. Does there exist a subset S of {1, 2,..., n} such that: and w i KNAPSACK Given positive integers v i and w i for i = 1, 2,..., n. and an positive integers K and W. Does there exist a subset S of {1, 2,..., n} such that: Σ w j W i S and Σ v i K i S A special case: SUBSET

More information

Computational Complexity

Computational Complexity Computational Complexity Algorithm performance and difficulty of problems So far we have seen problems admitting fast algorithms flow problems, shortest path, spanning tree... and other problems for which

More information

Week 8. 1 LP is easy: the Ellipsoid Method

Week 8. 1 LP is easy: the Ellipsoid Method Week 8 1 LP is easy: the Ellipsoid Method In 1979 Khachyan proved that LP is solvable in polynomial time by a method of shrinking ellipsoids. The running time is polynomial in the number of variables n,

More information

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM 8. INTRACTABILITY I poly-time reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin

More information

Introduction to Bin Packing Problems

Introduction to Bin Packing Problems Introduction to Bin Packing Problems Fabio Furini March 13, 2015 Outline Origins and applications Applications: Definition: Bin Packing Problem (BPP) Solution techniques for the BPP Heuristic Algorithms

More information

Topic: Intro, Vertex Cover, TSP, Steiner Tree Date: 1/23/2007

Topic: Intro, Vertex Cover, TSP, Steiner Tree Date: 1/23/2007 CS880: Approximations Algorithms Scribe: Michael Kowalczyk Lecturer: Shuchi Chawla Topic: Intro, Vertex Cover, TSP, Steiner Tree Date: 1/23/2007 Today we discuss the background and motivation behind studying

More information

A polynomial-time approximation scheme for the two-machine flow shop scheduling problem with an availability constraint

A polynomial-time approximation scheme for the two-machine flow shop scheduling problem with an availability constraint A polynomial-time approximation scheme for the two-machine flow shop scheduling problem with an availability constraint Joachim Breit Department of Information and Technology Management, Saarland University,

More information

Some Open Problems in Approximation Algorithms

Some Open Problems in Approximation Algorithms Some Open Problems in Approximation Algorithms David P. Williamson School of Operations Research and Information Engineering Cornell University February 28, 2011 University of Bonn Bonn, Germany David

More information

Introduction to Integer Programming

Introduction to Integer Programming Lecture 3/3/2006 p. /27 Introduction to Integer Programming Leo Liberti LIX, École Polytechnique liberti@lix.polytechnique.fr Lecture 3/3/2006 p. 2/27 Contents IP formulations and examples Total unimodularity

More information

Tractable & Intractable Problems

Tractable & Intractable Problems Tractable & Intractable Problems We will be looking at : What is a P and NP problem NP-Completeness The question of whether P=NP The Traveling Salesman problem again Programming and Data Structures 1 Polynomial

More information

Welcome to... Problem Analysis and Complexity Theory , 3 VU

Welcome to... Problem Analysis and Complexity Theory , 3 VU Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office: Inffeldgasse 16B/II, room IC02044 slides: http://www.ist.tugraz.at/pact17.html

More information

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs LP-Duality ( Approximation Algorithms by V. Vazirani, Chapter 12) - Well-characterized problems, min-max relations, approximate certificates - LP problems in the standard form, primal and dual linear programs

More information

CS 583: Approximation Algorithms: Introduction

CS 583: Approximation Algorithms: Introduction CS 583: Approximation Algorithms: Introduction Chandra Chekuri January 15, 2018 1 Introduction Course Objectives 1. To appreciate that not all intractable problems are the same. NP optimization problems,

More information

Lecture 4. 1 FPTAS - Fully Polynomial Time Approximation Scheme

Lecture 4. 1 FPTAS - Fully Polynomial Time Approximation Scheme Theory of Computer Science to Msc Students, Spring 2007 Lecturer: Dorit Aharonov Lecture 4 Scribe: Ram Bouobza & Yair Yarom Revised: Shahar Dobzinsi, March 2007 1 FPTAS - Fully Polynomial Time Approximation

More information

Approximation Schemes for Job Shop Scheduling Problems with Controllable Processing Times

Approximation Schemes for Job Shop Scheduling Problems with Controllable Processing Times Approximation Schemes for Job Shop Scheduling Problems with Controllable Processing Times Klaus Jansen 1, Monaldo Mastrolilli 2, and Roberto Solis-Oba 3 1 Universität zu Kiel, Germany, kj@informatik.uni-kiel.de

More information

Computer Sciences Department

Computer Sciences Department Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y

More information

Computability and Complexity Theory

Computability and Complexity Theory Discrete Math for Bioinformatics WS 09/10:, by A Bockmayr/K Reinert, January 27, 2010, 18:39 9001 Computability and Complexity Theory Computability and complexity Computability theory What problems can

More information

Decision Diagrams for Discrete Optimization

Decision Diagrams for Discrete Optimization Decision Diagrams for Discrete Optimization Willem Jan van Hoeve Tepper School of Business Carnegie Mellon University www.andrew.cmu.edu/user/vanhoeve/mdd/ Acknowledgments: David Bergman, Andre Cire, Samid

More information

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502) Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik Combinatorial Optimization (MA 4502) Dr. Michael Ritter Problem Sheet 1 Homework Problems Exercise

More information

Lecture 18: PCP Theorem and Hardness of Approximation I

Lecture 18: PCP Theorem and Hardness of Approximation I Lecture 18: and Hardness of Approximation I Arijit Bishnu 26.04.2010 Outline 1 Introduction to Approximation Algorithm 2 Outline 1 Introduction to Approximation Algorithm 2 Approximation Algorithm Approximation

More information

APPROXIMATION ALGORITHMS FOR SCHEDULING ORDERS ON PARALLEL MACHINES

APPROXIMATION ALGORITHMS FOR SCHEDULING ORDERS ON PARALLEL MACHINES UNIVERSIDAD DE CHILE FACULTAD DE CIENCIAS FÍSICAS Y MATEMÁTICAS DEPARTAMENTO DE INGENIERÍA MATEMÁTICA APPROXIMATION ALGORITHMS FOR SCHEDULING ORDERS ON PARALLEL MACHINES SUBMITTED IN PARTIAL FULFILLMENT

More information

Introduction to Complexity Theory

Introduction to Complexity Theory Introduction to Complexity Theory Read K & S Chapter 6. Most computational problems you will face your life are solvable (decidable). We have yet to address whether a problem is easy or hard. Complexity

More information

Lecture 20: LP Relaxation and Approximation Algorithms. 1 Introduction. 2 Vertex Cover problem. CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8

Lecture 20: LP Relaxation and Approximation Algorithms. 1 Introduction. 2 Vertex Cover problem. CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8 CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8 Lecture 20: LP Relaxation and Approximation Algorithms Lecturer: Yuan Zhou Scribe: Syed Mahbub Hafiz 1 Introduction When variables of constraints of an

More information

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness Computers and Intractability A Guide to the Theory of NP-Completeness The Bible of complexity theory Background: Find a good method for determining whether or not any given set of specifications for a

More information

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Marc Uetz University of Twente m.uetz@utwente.nl Lecture 8: sheet 1 / 32 Marc Uetz Discrete Optimization Outline 1 Lagrangian

More information

A Robust APTAS for the Classical Bin Packing Problem

A Robust APTAS for the Classical Bin Packing Problem A Robust APTAS for the Classical Bin Packing Problem Leah Epstein 1 and Asaf Levin 2 1 Department of Mathematics, University of Haifa, 31905 Haifa, Israel. Email: lea@math.haifa.ac.il 2 Department of Statistics,

More information

P, NP, NP-Complete, and NPhard

P, NP, NP-Complete, and NPhard P, NP, NP-Complete, and NPhard Problems Zhenjiang Li 21/09/2011 Outline Algorithm time complicity P and NP problems NP-Complete and NP-Hard problems Algorithm time complicity Outline What is this course

More information

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003 CS6999 Probabilistic Methods in Integer Programming Randomized Rounding April 2003 Overview 2 Background Randomized Rounding Handling Feasibility Derandomization Advanced Techniques Integer Programming

More information

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2) Algorithms and Theory of Computation Lecture 22: NP-Completeness (2) Xiaohui Bei MAS 714 November 8, 2018 Nanyang Technological University MAS 714 November 8, 2018 1 / 20 Set Cover Set Cover Input: a set

More information

SDP Relaxations for MAXCUT

SDP Relaxations for MAXCUT SDP Relaxations for MAXCUT from Random Hyperplanes to Sum-of-Squares Certificates CATS @ UMD March 3, 2017 Ahmed Abdelkader MAXCUT SDP SOS March 3, 2017 1 / 27 Overview 1 MAXCUT, Hardness and UGC 2 LP

More information

Computers and Intractability

Computers and Intractability Computers and Intractability A Guide to the Theory of NP-Completeness The Bible of complexity theory M. R. Garey and D. S. Johnson W. H. Freeman and Company, 1979 The Bandersnatch problem Background: Find

More information