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

Size: px
Start display at page:

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

Transcription

1 Dynamic programming Doctoral course Optimization on graphs - Lecture.1 Giovanni Righini January 1 th, 201

2 Implicit enumeration Combinatorial optimization problems are in general NP-hard and we usually resort to implicit enumeration to solve them to optimality (this is also useful for approximation purposes). Two main methods for implicit enumeration are: branch-and-bound, dynamic programming. Dynamic programming is also an algorithmic framework to solve polynomial time problems efficiently. It also allows to devise pseudo-polynomial time algorithms as well as approximation algorithms.

3 An introductory example Consider the problem of finding a shortest path from node 0 to 9 on this graph, which is directed, acyclic and layered

4 An introductory example Consider the problem of finding a shortest path from node 0 to 9 on this graph, which is directed, acyclic and layered A greedy algorithm from 0 would produce a path of cost.

5 An introductory example Consider the problem of finding a shortest path from node 0 to 9 on this graph, which is directed, acyclic and layered A greedy algorithm from 9 would produce a path of cost.

6 An introductory example Consider the problem of finding a shortest path from node 0 to 9 on this graph, which is directed, acyclic and layered The optimal path has cost 0.

7 Bellman s optimality principle (195) An optimal policy is made of a set of optimal sub-policies. By policy we mean a sequence of decisions, i.e. of value assignments to the variables). A sub-policy is a sub-sequence of decisions, i.e. of value assignments to a subset of the variables. Richard E. Bellman (New York, )

8 The example revisited A decision must be taken every time the path is extended from one layer to the next. A policy is a path from 0 to 9. A sub-policy is any other path.

9 The example revisited The optimal policy is made of pairs of optimal sub-policies of the form (0, i) and (i,9). We only need to store optimal sub-policies. All the other sub-policies can be disregarded.

10 Dominance Given two sub-policies S and S, S dominates S only if all sub-policies that can be appended to S can also be appended to S, with no greater cost; the cost of S is less than the cost of S. When this occurs, S can be neglected from further consideration: it cannot be part of an optimal policy.

11 The example revisited In our example, all sub-policies leading to the same node (paths of the form (0, i)), can be completed by appending to them the same sub-policies (paths of the form (i, 9)). Then we need to store only an optimal one among them. All the others are dominated.

12 The example finally solved Let L = {0,...,L} be the set of layers. Let N l the subset of nodes in layer l L. Let w be the weight function of the arcs of the graph. c(0) = 0 l L, l 1 j N l c(j) = min i Nl 1 {c(i)+w ij }

13 Terminology and correspondence Nodes in the graph are states. Arcs of the graph are state transitions. Paths in the graphs are (sub-)policies. Values c(i) (costs of shortest paths from 0 to i) are labels. The solution process applies these two rules: Initialization (recursion base): c(0) = 0 Label extension (recursive step): l L, l 1 j N l c(j) = min i Nl 1 {c(i)+w ij }. It resembles recursive programming, but it is bottom-up instead of top-down. The execution of a dynamic programming algorithm resembles the evolution of a discrete dynamic system (automaton). The recursive step requires to solve a very easy optimization problem.

14 Another example Consider the problem of finding a shortest Hamiltonian path from node 0 to node 5 on this graph, that is directed but cyclic A policy (i.e. a path from 0 to 5) is feasible if and only if it visits all nodes exactly once.

15 Dominance? Reaching the same node is no longer sufficient for a path (sub-policy) to dominate another: they do not reach the same state.

16 Dominance Only if they have also visited the same subset of nodes, then they reach the same state. Initialization: c(0,{0}) = 0 Extension: c(j, S) = min i S\{j} {c(i, S\{j})+w ij } j 0.

17 Complexity The two D.P. algorithms have different complexity. Ex. 1: n. states = n. of distinct values of j = n. of nodes in the graph. State: (i) [last reached node]; Initialization: c(0) = 0; Extension: c(j) = min i Nl 1 {c(i)+w(i, j)} l 1 L, j N l. Ex. 2: n. states = n. distinct values of (j, S) = exponential number in the n. of nodes in the graph. State: (S, i) [visited subset, last reached node]; Initialization: c(0,{0}) = 0; Extension: c(j, S) = min i S\{j} {c(i, S\{j})+w ij } j 0. This is equivalent to solve the same problem as in Example 1 but on a larger state graph (one node for each distinct value of (j, S)). The complexity of the D.P. algorithm depends on the number of arcs in the state graph.

18 Comparison with branch-and-bound B&B: sub-policies only diverge. D.P.: sub-policies sometimes converge. In both cases graphs are directed, acyclic and layered. But one is an arborescence, the other can be not.

19 Dynamic Programming in three steps In order to design a D.P. algorithm we need to: 1. put the decisions (i.e. the variables) in a sequence (policy); 2. define the state, i.e. the amount of information needed to transform a sub-policy into a complete policy;. find the recursive extension function (REF) to compute the labels of the states, following the sequence. The state of a dynamic system at time t summarizes the past history of the system up to time t, such that the evolution of the system after t depends on the state at time t but not on how it has been reached. Solving a problem with D.P. amounts at defining a suitable state-transition graph, on which we search for an optimal path. This graph is directed, acyclic and layered. The number of its nodes and arcs determines the complexity of the D.P. algorithm.

20 Shortest path on a digraph Consider the problem of finding a shortest path from node 0 to node 5 on the directed and cyclic graph of the previous example, assuming there are no cycles with negative cost

21 Shortest path on a digraph We cannot set the node labels once for ever: we need to correct them every time we discover a better path to the same node. However no optimal path can take more than N 1 arcs (in this case, 5 arcs). The labels we compute at each extension are optimal for each number of arcs of the path.

22 Shortest path on a digraph We reformulate the problem on a directed, acyclic and layered graph, with N layers State: (l, i) [n. extensions, last reached node]; Initialization: c(0, 0) = 0; Extension: c(l, j) = = min i N {c(l 1, i)+w ij } l 1 L, j N

23 Bellman-Ford algorithm (195) The label correcting algorithm obtained in this way is known as the Bellman-Ford algorithm. Time complexity: O(N ), as the number of arcs in the layered graph. Space complexity: O(N 2 ), to represent the graph. For each node in N we need to store a cost and a predecessor. No label can be considered permanent until: either all layers have been labeled, or no label update has occurred from one layer to the next one.

24 Dijkstra algorithm (1959) Under the hypothesis that arc weights are non-negative, we can permanently set the label of minimum cost in each layer. The label setting algorithm obtained in this way is known as the Dijkstra algorithm b

25 Dijkstra algorithm (1959) State: (l, i) [layer, node]; Initialization: c(0, 0) = 0; last = 0; Permanent(0) = {0}; Extension: c(l, j) = min{c(l 1, j), c(l 1, last(l 1))+w(last(l 1), j)} l 1 L, j Permanent(l 1); Permanent(l) = Permanent(l 1) {min j Permanent(l 1) {c(l, j)}}. Every node has only two predecessors: the time complexity is O(N 2 ).

26 Shortest trees and arborescences Bellman-Ford s and Dijkstra s algorithms compute the shortest paths arborescence, that contains all shortest paths from the root node to all the others (for the optimality principle). With a slight modification we can obtain Prim s algorithm to compute the minimum spanning tree on weighted (unoriented) graphs. All these are examples of dynamic programming algorithms for polynomial-time combinatorial optimization problems.

27 D.P. for NP-hard problems: the knapsack problem min z = j N c j x j s.t. j N a j x j b x j {0, 1} j N Assume b is a known constant and all data are integer. The number of possible solutions is 2 N and, even worse, the problem is NP-hard!

28 D.P. for NP-hard problems: the knapsack problem Policy: sort the items in N (the variables) from x 1 to x N. State: Feasibility depends on the residual capacity; Cost does not depend on previous decisions. Hence the state is given by the last item considered (i) and the capacity used so far (u). R.E.F.: Initialization: z(0, 0) = 0; Extension: z(i, u) = max{z(i 1, u), z(i 1, u a i )+c i }.

29 D.P. for NP-hard problems: the knapsack problem i-1, u X i =0 i, u X i =1 i, u+a i The state graph has a layer for each item (variable) j N and b + 1 nodes per layer. Complexity: The graph has O(Nb) nodes and each of them has only two predecessors. Then the D.P. algorithm has complexity O(Nb), which is pseudo-polynomial.

30 D.P. for strongly NP-hard problems: the ESPP Consider the problem of finding the elementary shortest path from s to t in a weighted directed cyclic graph with general weights. 1 1 s -1-1 t 1 2 The constraint that the path must be elementary is necessary in presence of negative cycles, because otherwise a finite optimal solution may not exist.

31 D.P. for strongly NP-hard problems: the RCESPP Then we need to put into the state the information on which nodes have already been visited. State: (S, i) (visited subset, last reached node); Initialization: c({s}, s) = 0; Extension: c(s, j) = min i S\{j} {c(s\{j}, i)+w ij } j 0. The problem can also have other constraints, represented as consumptions of resources (capacity, time,...): this problem is called the Resource Constrained Elementary Shortest Path Problem. State: (S, q, i) (visited subset, resource consumption, last reached node); Initialization: c({s}, 0, s) = 0; Extension: c(s, q, j) = min i S\{j} {c(s\{j}, q d j, i)+w ij } j 0, where d j is the consumption of resources when visiting node j.

32 Dominance A label L = (S, q, i ) dominates a label L = (S, q, i ) only if: S S q q i = i c(l ) c(l ). Complexity: the n. of states grows exponentially with the size of the graph.

33 Bi-directional extension In bi-directional D.P. labels are extended both forward from vertex s to its successors and backward from vertex t to its predecessors. Backward states, recursive extension functions and dominance rules are symmetrical. A path from s to t is detected each time a forward state and a backward state can be feasibly joined through arc (i, j). Let L fw = (S fw, q fw, i) be a forward path and L bw = (S bw, q bw, j) be a backward path. When they are joined, the cost of the resulting s-t path is c(l fw )+w ij + c(l bw ). The two paths can be joined subject to: S fw S bw = q fw + q bw Q

34 Stopping at a half-way point We can stop extending a path in one direction when we have the guarantee that the remaining part of the path will be generated in the other direction and therefore no optimal solution will be lost. Then the extension of forward and backward labels is stopped while preserving the guarantee that the optimal solution will be found. Without this the bi-directional algorithm would simply produce twice as many labels compared to the mono-directional one. Possible stop criteria: stop when N/2 arcs have been used; stop when half the overall available amount of a resource has been consumed.

35 Bounding for fathoming labels Bounding is used as in branch-and-bound algorithms to detect labels that are not worth extending because lead to optimal solutions. For instance, given a label L = (S, q, i) it is possible to compute a lower bound LB(L) on the costs to be paid after visiting node i with the remaining amount Q q of available resources. min LB = b j y j subject to j N\S j N\S y j {0, 1} d j y j Q q j N\S where b j is a lower bound on the cost of visiting node j S and d j is the resource consumption when visiting node j. Label L can be fathomed if c(l)+lb UB, where UB is an incumbent upper bound.

36 State space relaxation State space relaxation was introduced by Christofides, Mingozzi and Toth in 191. The state space S explored by the D.P. algorithm is projected onto a lower dimensional space T, so that each state in T retains the minimum cost among those of its corresponding states in S (assuming minimization). SSR : S T such that c(t) = min s S:SSR(s)=t {c(s)}. In this way: the number of states to be explored is drastically reduced; some infeasible states s in S can be projected onto a state t corresponding to a feasible solution in T. The D.P. algorithm exploring T instead of S is faster and it does not guarantee to find an optimal solution, but rather a dual bound.

37 SSR of the set of visited nodes We map each state (S, q, i) onto a new state (σ, q, i), where σ = S represents the number of nodes visited (excluding s). Dominance condition S S is replaced by σ σ. Since σ N the D.P. has pseudo-polynomial time complexity. Since the state does no longer keep information about the set of already visited vertices, cycles are no longer forbidden; the solution is guaranteed to be feasible with respect to the resource constraints; is not guaranteed to be elementary. This technique can also be applied to bi-directional search.

38 Decremental state space relaxation Decremental SSR allows to tune a trade-off between D.P. with SSR (using σ) and exact D.P. (using S): a set V N of critical nodes is defined; S is now a subset of V; σ counts the overall number of visited nodes. For V = N, DSSR is equivalent to exact D.P.. For V =, DSSR is equivalent to D.P. with SSR. The algorithm is executed multiple times and after each iteration the nodes visited more than once are inserted into V. The algorithm ends when the optimal solution is also feasible (the path is elementary). An increasingly better lower bound is produced at each iteration. Computational experiments show that in many cases a critical set containing about 15% of the nodes is enough.

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

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

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

More information

2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines 2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

More information

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti

More information

Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling. Tim Nieberg Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

More information

A new Branch-and-Price Algorithm for the Traveling Tournament Problem (TTP) Column Generation 2008, Aussois, France

A new Branch-and-Price Algorithm for the Traveling Tournament Problem (TTP) Column Generation 2008, Aussois, France A new Branch-and-Price Algorithm for the Traveling Tournament Problem (TTP) Column Generation 2008, Aussois, France Stefan Irnich 1 sirnich@or.rwth-aachen.de RWTH Aachen University Deutsche Post Endowed

More information

Warshall s Algorithm: Transitive Closure

Warshall s Algorithm: Transitive Closure CS 0 Theory of Algorithms / CS 68 Algorithms in Bioinformaticsi Dynamic Programming Part II. Warshall s Algorithm: Transitive Closure Computes the transitive closure of a relation (Alternatively: all paths

More information

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

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 General Integer Linear Program: (ILP) min c T x Ax b x 0 integer Assumption: A, b integer The integrality condition

More information

8.1 Min Degree Spanning Tree

8.1 Min Degree Spanning Tree CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

More information

Scheduling Single Machine Scheduling. Tim Nieberg

Scheduling Single Machine Scheduling. Tim Nieberg Scheduling Single Machine Scheduling Tim Nieberg Single machine models Observation: for non-preemptive problems and regular objectives, a sequence in which the jobs are processed is sufficient to describe

More information

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 The final exam will cover seven topics. 1. greedy algorithms 2. divide-and-conquer algorithms

More information

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams André Ciré University of Toronto John Hooker Carnegie Mellon University INFORMS 2014 Home Health Care Home health care delivery

More information

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows TECHNISCHE UNIVERSITEIT EINDHOVEN Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows Lloyd A. Fasting May 2014 Supervisors: dr. M. Firat dr.ir. M.A.A. Boon J. van Twist MSc. Contents

More information

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design

Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,

More information

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

More information

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

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm. Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

More information

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

Why? A central concept in Computer Science. Algorithms are ubiquitous. Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

More information

Scheduling. Open shop, job shop, flow shop scheduling. Related problems. Open shop, job shop, flow shop scheduling

Scheduling. Open shop, job shop, flow shop scheduling. Related problems. Open shop, job shop, flow shop scheduling Scheduling Basic scheduling problems: open shop, job shop, flow job The disjunctive graph representation Algorithms for solving the job shop problem Computational complexity of the job shop problem Open

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

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

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm. Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

More information

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

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

Dynamic programming formulation

Dynamic programming formulation 1.24 Lecture 14 Dynamic programming: Job scheduling Dynamic programming formulation To formulate a problem as a dynamic program: Sort by a criterion that will allow infeasible combinations to be eli minated

More information

Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

More information

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

Discuss the size of the instance for the minimum spanning tree problem. 3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

More information

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

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8] Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

More information

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

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

More information

Lecture 7: Approximation via Randomized Rounding

Lecture 7: Approximation via Randomized Rounding Lecture 7: Approximation via Randomized Rounding Often LPs return a fractional solution where the solution x, which is supposed to be in {0, } n, is in [0, ] n instead. There is a generic way of obtaining

More information

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,

More information

Dynamic Programming and Graph Algorithms in Computer Vision

Dynamic Programming and Graph Algorithms in Computer Vision Dynamic Programming and Graph Algorithms in Computer Vision Pedro F. Felzenszwalb and Ramin Zabih Abstract Optimization is a powerful paradigm for expressing and solving problems in a wide range of areas,

More information

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...

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... Lecture 4 Scheduling 1 Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max structure of a schedule 0 Q 1100 11 00 11 000 111 0 0 1 1 00 11 00 11 00

More information

Classification - Examples

Classification - Examples 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

More information

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72. ADVANCED SUBSIDIARY GCE UNIT 4736/01 MATHEMATICS Decision Mathematics 1 THURSDAY 14 JUNE 2007 Afternoon Additional Materials: Answer Booklet (8 pages) List of Formulae (MF1) Time: 1 hour 30 minutes INSTRUCTIONS

More information

Exam study sheet for CS2711. List of topics

Exam study sheet for CS2711. List of topics Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure

More information

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

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

More information

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

More information

A column generation algorithm for a vehicle routing problem with economies of scale and additional constraints

A column generation algorithm for a vehicle routing problem with economies of scale and additional constraints A column generation algorithm for a vehicle routing problem with economies of scale and additional constraints Alberto Ceselli, Giovanni Righini, Matteo Salani Dipartimento di Tecnologie dell Informazione

More information

Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling

Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling 6.854 Advanced Algorithms Lecture 16: 10/11/2006 Lecturer: David Karger Scribe: Kermin Fleming and Chris Crutchfield, based on notes by Wendy Chu and Tudor Leu Minimum cost maximum flow, Minimum cost circulation,

More information

CSC2420 Spring 2015: Lecture 3

CSC2420 Spring 2015: Lecture 3 CSC2420 Spring 2015: Lecture 3 Allan Borodin January 22, 2015 1 / 1 Announcements and todays agenda Assignment 1 due next Thursday. I may add one or two additional questions today or tomorrow. Todays agenda

More information

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems Abstract A Constraint Programming based Column Generation Approach to Nurse Rostering Problems Fang He and Rong Qu The Automated Scheduling, Optimisation and Planning (ASAP) Group School of Computer Science,

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

More information

Chapter 15: Dynamic Programming

Chapter 15: Dynamic Programming Chapter 15: Dynamic Programming Dynamic programming is a general approach to making a sequence of interrelated decisions in an optimum way. While we can describe the general characteristics, the details

More information

Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

More information

24. The Branch and Bound Method

24. The Branch and Bound Method 24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no

More information

THE SCHEDULING OF MAINTENANCE SERVICE

THE SCHEDULING OF MAINTENANCE SERVICE THE SCHEDULING OF MAINTENANCE SERVICE Shoshana Anily Celia A. Glass Refael Hassin Abstract We study a discrete problem of scheduling activities of several types under the constraint that at most a single

More information

Problem Set 7 Solutions

Problem Set 7 Solutions 8 8 Introduction to Algorithms May 7, 2004 Massachusetts Institute of Technology 6.046J/18.410J Professors Erik Demaine and Shafi Goldwasser Handout 25 Problem Set 7 Solutions This problem set is due in

More information

2.1 Closed-loop optimization of discrete-time systems: inventory control

2.1 Closed-loop optimization of discrete-time systems: inventory control Chapter 2 Dynamic Programming 2.1 Closed-loop optimization of discrete-time systems: inventory control We consider the following inventory control problem: The problem is to minimize the expected cost

More information

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction

Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach

More information

Compact Representations and Approximations for Compuation in Games

Compact Representations and Approximations for Compuation in Games Compact Representations and Approximations for Compuation in Games Kevin Swersky April 23, 2008 Abstract Compact representations have recently been developed as a way of both encoding the strategic interactions

More information

Branch-and-Price for the Truck and Trailer Routing Problem with Time Windows

Branch-and-Price for the Truck and Trailer Routing Problem with Time Windows Branch-and-Price for the Truck and Trailer Routing Problem with Time Windows Sophie N. Parragh Jean-François Cordeau October 2015 Branch-and-Price for the Truck and Trailer Routing Problem with Time Windows

More information

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

More information

Minimize subject to. x S R

Minimize subject to. x S R Chapter 12 Lagrangian Relaxation This chapter is mostly inspired by Chapter 16 of [1]. In the previous chapters, we have succeeded to find efficient algorithms to solve several important problems such

More information

Social Media Mining. Graph Essentials

Social Media Mining. Graph Essentials Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

More information

Classification - Examples -1- 1 r j C max given: n jobs with processing times p 1,..., p n and release dates

Classification - Examples -1- 1 r j C max given: n jobs with processing times p 1,..., p n and release dates Lecture 2 Scheduling 1 Classification - Examples -1-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

More information

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

More information

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company

The Problem of Scheduling Technicians and Interventions in a Telecommunications Company The Problem of Scheduling Technicians and Interventions in a Telecommunications Company Sérgio Garcia Panzo Dongala November 2008 Abstract In 2007 the challenge organized by the French Society of Operational

More information

Inverse Optimization by James Orlin

Inverse Optimization by James Orlin Inverse Optimization by James Orlin based on research that is joint with Ravi Ahuja Jeopardy 000 -- the Math Programming Edition The category is linear objective functions The answer: When you maximize

More information

Guessing Game: NP-Complete?

Guessing Game: NP-Complete? Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

More information

Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

More information

Solutions to Homework 6

Solutions to Homework 6 Solutions to Homework 6 Debasish Das EECS Department, Northwestern University ddas@northwestern.edu 1 Problem 5.24 We want to find light spanning trees with certain special properties. Given is one example

More information

A Practical Scheme for Wireless Network Operation

A Practical Scheme for Wireless Network Operation A Practical Scheme for Wireless Network Operation Radhika Gowaikar, Amir F. Dana, Babak Hassibi, Michelle Effros June 21, 2004 Abstract In many problems in wireline networks, it is known that achieving

More information

Measuring the Performance of an Agent

Measuring the Performance of an Agent 25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational

More information

Algorithms and Data Structures (INF1) Lecture 14/15 Hua Lu

Algorithms and Data Structures (INF1) Lecture 14/15 Hua Lu Algorithms and Data Structures (INF1) Lecture 14/15 Hua Lu Department of Computer Science Aalborg University Fall 2007 This Lecture Shortest paths Problem preliminary Shortest paths in DAG Bellman-Moore

More information

Steiner Tree Approximation via IRR. Randomized Rounding

Steiner Tree Approximation via IRR. Randomized Rounding Steiner Tree Approximation via Iterative Randomized Rounding Graduate Program in Logic, Algorithms and Computation μπλ Network Algorithms and Complexity June 18, 2013 Overview 1 Introduction Scope Related

More information

11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS 11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: vertex cover LP rounding: vertex cover generalized load balancing knapsack problem Lecture slides by Kevin Wayne Copyright 2005

More information

Adaptive Memory Programming for the Vehicle Routing Problem with Multiple Trips

Adaptive Memory Programming for the Vehicle Routing Problem with Multiple Trips Adaptive Memory Programming for the Vehicle Routing Problem with Multiple Trips Alfredo Olivera, Omar Viera Instituto de Computación, Facultad de Ingeniería, Universidad de la República, Herrera y Reissig

More information

Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

More information

1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT

1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT DECISION 1 Revision Notes 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT Make sure you show comparisons clearly and label each pass First Pass 8 4 3 6 1 4 8 3 6 1 4 3 8 6 1 4 3 6 8 1

More information

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

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004 Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

More information

A Column Generation Model for Truck Routing in the Chilean Forest Industry

A Column Generation Model for Truck Routing in the Chilean Forest Industry A Column Generation Model for Truck Routing in the Chilean Forest Industry Pablo A. Rey Escuela de Ingeniería Industrial, Facultad de Ingeniería, Universidad Diego Portales, Santiago, Chile, e-mail: pablo.rey@udp.cl

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning LU 2 - Markov Decision Problems and Dynamic Programming Dr. Martin Lauer AG Maschinelles Lernen und Natürlichsprachliche Systeme Albert-Ludwigs-Universität Freiburg martin.lauer@kit.edu

More information

CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

More information

Max Flow, Min Cut, and Matchings (Solution)

Max Flow, Min Cut, and Matchings (Solution) Max Flow, Min Cut, and Matchings (Solution) 1. The figure below shows a flow network on which an s-t flow is shown. The capacity of each edge appears as a label next to the edge, and the numbers in boxes

More information

Dynamic Programming. Applies when the following Principle of Optimality

Dynamic Programming. Applies when the following Principle of Optimality Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.

More information

Analysis of Algorithms, I

Analysis of Algorithms, I Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

More information

A Computer Application for Scheduling in MS Project

A Computer Application for Scheduling in MS Project Comput. Sci. Appl. Volume 1, Number 5, 2014, pp. 309-318 Received: July 18, 2014; Published: November 25, 2014 Computer Science and Applications www.ethanpublishing.com Anabela Tereso, André Guedes and

More information

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

1 Definitions. Supplementary Material for: Digraphs. Concept graphs Supplementary Material for: van Rooij, I., Evans, P., Müller, M., Gedge, J. & Wareham, T. (2008). Identifying Sources of Intractability in Cognitive Models: An Illustration using Analogical Structure Mapping.

More information

Optimal Index Codes for a Class of Multicast Networks with Receiver Side Information

Optimal Index Codes for a Class of Multicast Networks with Receiver Side Information Optimal Index Codes for a Class of Multicast Networks with Receiver Side Information Lawrence Ong School of Electrical Engineering and Computer Science, The University of Newcastle, Australia Email: lawrence.ong@cantab.net

More information

OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION

OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION Sérgio Pequito, Stephen Kruzick, Soummya Kar, José M. F. Moura, A. Pedro Aguiar Department of Electrical and Computer Engineering

More information

1 Approximating Set Cover

1 Approximating Set Cover CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning LU 2 - Markov Decision Problems and Dynamic Programming Dr. Joschka Bödecker AG Maschinelles Lernen und Natürlichsprachliche Systeme Albert-Ludwigs-Universität Freiburg jboedeck@informatik.uni-freiburg.de

More information

Analysis of Algorithms I: Optimal Binary Search Trees

Analysis of Algorithms I: Optimal Binary Search Trees Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search

More information

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,

More information

Chapter 13: Binary and Mixed-Integer Programming

Chapter 13: Binary and Mixed-Integer Programming Chapter 3: Binary and Mixed-Integer Programming The general branch and bound approach described in the previous chapter can be customized for special situations. This chapter addresses two special situations:

More information

Near Optimal Solutions

Near Optimal Solutions Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.

More information

Facility Location: Discrete Models and Local Search Methods

Facility Location: Discrete Models and Local Search Methods Facility Location: Discrete Models and Local Search Methods Yury KOCHETOV Sobolev Institute of Mathematics, Novosibirsk, Russia Abstract. Discrete location theory is one of the most dynamic areas of operations

More information

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

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

More information

Vehicle routing problems with alternative paths: an application to on-demand transportation

Vehicle routing problems with alternative paths: an application to on-demand transportation Vehicle routing problems with alternative paths: an application to on-demand transportation Thierry Garaix, Christian Artigues, Dominique Feillet, Didier Josselin To cite this version: Thierry Garaix,

More information

Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing

Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing Multi-layer MPLS Network Design: the Impact of Statistical Multiplexing Pietro Belotti, Antonio Capone, Giuliana Carello, Federico Malucelli Tepper School of Business, Carnegie Mellon University, Pittsburgh

More information

The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

More information

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming

More information

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

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models Integer Programming INTEGER PROGRAMMING In many problems the decision variables must have integer values. Example: assign people, machines, and vehicles to activities in integer quantities. If this is

More information

Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

More information

A network flow algorithm for reconstructing. binary images from discrete X-rays

A network flow algorithm for reconstructing. binary images from discrete X-rays A network flow algorithm for reconstructing binary images from discrete X-rays Kees Joost Batenburg Leiden University and CWI, The Netherlands kbatenbu@math.leidenuniv.nl Abstract We present a new algorithm

More information

Research Paper Business Analytics. Applications for the Vehicle Routing Problem. Jelmer Blok

Research Paper Business Analytics. Applications for the Vehicle Routing Problem. Jelmer Blok Research Paper Business Analytics Applications for the Vehicle Routing Problem Jelmer Blok Applications for the Vehicle Routing Problem Jelmer Blok Research Paper Vrije Universiteit Amsterdam Faculteit

More information

Approximation Algorithms. Scheduling. Approximation algorithms. Scheduling jobs on a single machine

Approximation Algorithms. Scheduling. Approximation algorithms. Scheduling jobs on a single machine Approximation algorithms Approximation Algorithms Fast. Cheap. Reliable. Choose two. NP-hard problems: choose 2 of optimal polynomial time all instances Approximation algorithms. Trade-off between time

More information

Instruction Scheduling. Software Pipelining - 2

Instruction Scheduling. Software Pipelining - 2 and Software Pipelining - 2 Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline Simple Basic Block Scheduling

More information

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem John Karlof and Peter Hocking Mathematics and Statistics Department University of North Carolina Wilmington Wilmington,

More information

each college c i C has a capacity q i - the maximum number of students it will admit

each college c i C has a capacity q i - the maximum number of students it will admit n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

More information

The truck scheduling problem at cross-docking terminals

The truck scheduling problem at cross-docking terminals The truck scheduling problem at cross-docking terminals Lotte Berghman,, Roel Leus, Pierre Lopez To cite this version: Lotte Berghman,, Roel Leus, Pierre Lopez. The truck scheduling problem at cross-docking

More information

A greedy algorithm for the DNA sequencing by hybridization with positive and negative errors and information about repetitions

A greedy algorithm for the DNA sequencing by hybridization with positive and negative errors and information about repetitions BULLETIN OF THE POLISH ACADEMY OF SCIENCES TECHNICAL SCIENCES, Vol. 59, No. 1, 2011 DOI: 10.2478/v10175-011-0015-0 Varia A greedy algorithm for the DNA sequencing by hybridization with positive and negative

More information