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

Similar documents
3.3 Easy ILP problems and totally unimodular matrices

Lecture #21. c T x Ax b. maximize subject to

Discrete Optimization

Data Structures and Algorithms (CSCI 340)

Travelling Salesman Problem

3.7 Cutting plane methods

Combinatorial optimization problems

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

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

Week 8. 1 LP is easy: the Ellipsoid Method

BBM402-Lecture 20: LP Duality

Cutting Plane Methods II

MVE165/MMG630, Applied Optimization Lecture 6 Integer linear programming: models and applications; complexity. Ann-Brith Strömberg

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

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

Lecture 5 January 16, 2013

Introduction to Integer Programming

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

Preliminaries and Complexity Theory

ON COST MATRICES WITH TWO AND THREE DISTINCT VALUES OF HAMILTONIAN PATHS AND CYCLES

Data Structures in Java

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

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Discrete Optimization 23

NP-problems continued

Integer Linear Programming (ILP)

Multicommodity Flows and Column Generation

Integer programming: an introduction. Alessandro Astolfi

Duality of LPs and Applications

Solving the MWT. Recall the ILP for the MWT. We can obtain a solution to the MWT problem by solving the following ILP:

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

EXERCISES SHORTEST PATHS: APPLICATIONS, OPTIMIZATION, VARIATIONS, AND SOLVING THE CONSTRAINED SHORTEST PATH PROBLEM. 1 Applications and Modelling

Discrete Optimization in a Nutshell

Selected partial inverse combinatorial optimization problems with forbidden elements. Elisabeth Gassner

CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi

Lectures 6, 7 and part of 8

Introduction to Mathematical Programming IE406. Lecture 21. Dr. Ted Ralphs

Polynomial-time Reductions

Mathematical Programs Linear Program (LP)

3.7 Strong valid inequalities for structured ILP problems

NP and Computational Intractability

15.083J/6.859J Integer Optimization. Lecture 2: Efficient Algorithms and Computational Complexity

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 17: Duality and MinMax Theorem Lecturer: Sanjeev Arora

NP-problems continued

Discrete (and Continuous) Optimization WI4 131

1 Primals and Duals: Zero Sum Games

The partial inverse minimum cut problem with L 1 -norm is strongly NP-hard. Elisabeth Gassner

Linear and Integer Programming - ideas

Combinatorial Optimization

15-850: Advanced Algorithms CMU, Fall 2018 HW #4 (out October 17, 2018) Due: October 28, 2018

Formal definition of P

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

4. How to prove a problem is NPC

Lecture 18: More NP-Complete Problems

LECTURE 1: INTRODUCTION

Maximum flow problem

Linear Programming. Scheduling problems

Lecture 23 Branch-and-Bound Algorithm. November 3, 2009

Lecture 4: NP and computational intractability

Contents. Introduction

MATTHIAS GERDTS. COMBINATORIAL OPTIMISATION MSM 3M02b

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Integer Programming ISE 418. Lecture 8. Dr. Ted Ralphs

Chapter 7 Network Flow Problems, I

CO759: Algorithmic Game Theory Spring 2015

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

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

Polynomial-Time Reductions

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

6.854 Advanced Algorithms

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

Determine the size of an instance of the minimum spanning tree problem.

Integer Programming ISE 418. Lecture 12. Dr. Ted Ralphs

Exercises NP-completeness

Fundamentals of optimization problems

Introduction to Integer Linear Programming

Representations of All Solutions of Boolean Programming Problems

CS/COE

Introduction to Bin Packing Problems

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

Unit 1A: Computational Complexity

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

Chapter 3, Operations Research (OR)

IE418 Integer Programming

Modeling with Integer Programming

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Minimum cost transportation problem

Algorithm Design Strategies V

1 Integer Decomposition Property

CS261: A Second Course in Algorithms Lecture #8: Linear Programming Duality (Part 1)

Week 4. (1) 0 f ij u ij.

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Lecture 5: Computational Complexity

1. Introduction Recap

Mathematics for Decision Making: An Introduction. Lecture 13

where X is the feasible region, i.e., the set of the feasible solutions.

Branch-and-Bound for the Travelling Salesman Problem

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Transcription:

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 1.1 Let G = (V, E, d) be a digraph with arc lengths d : E N and let s, t V be two distinct nodes in the digraph. Devise an integer linear program that models the problem of finding a shortest directed s-t path in G. What is the encoding length of your ILP? Answer to Exercise 1.1 Let A be the node-arc incidence matrix of G, i. e. +1, if e δ + (v) (outgoing arc), a v,e = 1, if e δ (v) (incoming arc), 0, otherwise. We use variables x e 0, 1 for all e E with the interpretation x e = 1, e is contained in a shortest s-t path, 0, otherwise. The ILP is basically a flow formulation: We are looking for a flow of value 1 from the source s to the sink t that incurs minimal cost: min e E d e x e Ax = 0 + 1 s 1 t x 0, 1 E Or directly, without using the incidence matrix A: min e E d e x e e δ (v) e δ + (s) x e x e = 1 x 0, 1 E e δ + (v) = 0 for all v V \ s, t The inflow constraints for t do not need to be included, because with the outflow constraints for s and the flow balance constraints for all other nodes they are already implied. For encoding the problem we need to represent the graph G, the arc lengths d and the two nodes s,t. For the graph, we can choose among a variety of representations, e. g. we could use the incidence Page 1 of 5

matrix as defined above. Each entry of this n m matrix is in 1, 0, 1, so we need Θ(nm) bits to encode it. The incidence matrix also defines an enumeration of both nodes and edges, so s and t can each be represented by a number in [n], accounting for an additional 2 size(n) bits. For the arc lengths we use a vector of length m that stores the arc length for each arc, so we need e E size(d e) bits to encode the lengths. Tutorial Problems Exercise 1.2 Find an ILP formulation for the Bin Packing Problem: Input: n N, weights w N n, a bin capacity C N Task: find a partition B 1 B 2... B k = [n] into a minimal number k of subsets of [n] such that w(b i ) C for all i [k] Answer to Exercise 1.2 We first need an upper bound for the number of bins that might be used. We may assume that w i C, otherwise the problem would be infeasible, thus the number of items n is a simple upper bound on the number of bins necessary. We use two classes of binary variables: x ij = 1, if item i is assigned to bin j 0, otherwise y j = 1, if bin j is used 0, otherwise The problem can then be expressed through the following integer linear program: min y j j=1 w i x ij Cy j j = 1,..., n i=1 x ij = 1 i = 1,..., n j=1 x 0, 1 n n y 0, 1 n Exercise 1.3 a) Imagine you had an algorithm to determine a feasible point of a polyhedron x R n : Ax b for arbitrary matrices A R m n and vectors b R m (if the inequalities are infeasible, the algorithm will detect and report this). How can you use that algorithm to determine the solution to a linear optimization problem? b) Consider again the situation of a), but now with an oracle that only reports whether the given system of linear inequalities is feasible or not (instead of returning a feasible point). Use that oracle to design an algorithm that solves a linear optimization problem. Can you do this using a polynomially bounded number of calls to the oracle? Page 2 of 5

Answer to Exercise 1.3 a) The main idea is to employ duality theory: A primal feasible solutions is optimal if and only if there is a corresponding dual feasible solution with the same objective value. Consider the problem of finding an optimal solution of the linear optimization problem max c T x : Ax b. (1) The dual optimization problem is min b T y : A T y = c, y 0. (2) According to duality theory, x and y are optimal for the primal and the dual problem, if and only if they are both feasible for their respective problems and the objective values agree. Thus, we need to find a feasible point (x, y) of the polyhedron P = (x, y) R n+m : Ax b, A T y = c, y 0, b T y = c T x This polyhedron can easily be transformed into the desired form, and any feasible point will constitute an optimal solution to the original LP. If the oracle returns a feasible solution (x, y ), then b T y c T x Thus, x is an optimal solution for (1). If the oracle returns that P does not have a feasible point, then either (1) is infeasible or its dual is infeasible, which means that (1) is unbounded. Polynomial size: Clear. b) Using the results from the first part of this proble, it suffices to construct an algorithm that given a feasible system of inequalities constructs a feasible point. Let us first assume that P has a vertex v. Then the active inequalities in v form a system of linear equalities A I x = b I such that v is the unique solution, where A I = (a i, i I) T denotes the submatrix of rows I of A. The idea is now to find such a set I that defines a feasible point. Then, we can solve this system of linear equalities easily to obtain the feasible point. The following algorithm accomplishes this. i) set C 0 = A, d 0 = b ii) for i 0,..., m 1 do 1) call oracle whether there is a feasible point for C i x d i, a T i x b i ( ) ( ) C 2) if answer = YES, then C i+1 i d =, d i+1 i = b i 3) else C i+1 = C i, d i+1 = d i end if iii) end for iv) if rank(c m ) < n, then a T i 1) fill up C m with arbitrary linearly independent rows to achieve full rank 2) fill up d m with zeros, such that the number of rows is equal to C m v) end if Page 3 of 5

vi) solve C m x = d m vii) return solution x Obviously, the oracle is called only polynomially often and each time the input into the oracle is polynomial in the input size. Exercise 1.4 In this exercise we will establish a connection between three different ways to state a problem. As an example, consider the traveling salesman problem: Problem 1: TSP optimization problem Instance: n, m N, a graph G = (V, E) with n nodes and m edges, a weight vector c N m Task: Determine if a Hamilton circuit exists in G and if so, return one with minimum total weight. Problem 2: TSP function problem Instance: n, m N, a graph G = (V, E) with n nodes and m edges, a weight vector c N m Task: Return the length of a Hamilton circuit with minimum total weight in G or, if no Hamilton circuit exists. Problem 3: TSP decision problem Instance: n, m N, a graph G = (V, E) with n nodes and m edges, a weight vector c N m, K N Question: Does a Hamilton circuit of total weight at most K exist in G? Obviously, if we have an algorithm that solves the optimization problem, the other two version can also be solved. In this exercise, we will show that the reverse is also (essentially) true. a) Imagine you had an algorithm that could solve the decision problem for TSP which may be used as a black box (more formally called an oracle). Design an algorithm that uses the decision oracle to solve the function problem. Can you find an algorithm that calls the oracle only polynomially often and with polynomially bounded inputs (such an algorithm would be called oracle-polynomial)? (In particular, you may not just call the decision oracle K times, since K is exponential in the input size of the instance remember that K is part of the input.) b) Imagine you had an algorithm that could solve the function problem for TSP. Design an algorithm that uses this function oracle to solve the optimization problem. Again, try to find an oracle-polynomial algorithm! Answer to Exercise 1.4 a) i) TSP problem, oracle for decision problem. Aim: Solve function problem 1) set M = (n + 1)c max 2) call oracle with G and M 3) if answer of oracle is NO then return end if 4) m = 0 5) µ = m+m 2 6) while ( m M ) do Page 4 of 5

A. call oracle with G and µ B. if answer = YES, then M = µ C. else m = µ + 1 end if D. µ = m+m 2 7) end while 8) return M Input size to oracle is polynomial: G has obiously polynomial size, M = n c max. Hence, M has also polynomial size. Number of calls to the oracle is O(log(M)), since the size of intervall [m, M] decreases by a factor of at least 2 and m, M N. Besides, this is polynomial in the input size and it bounds the running time of the algorithm, assuming that a call to the oracle has constant cost. ii) Oracle function for TSP. Aim: Algorithm for optimization problem 1) apply oracle to obtain an optimal value m for G and c 2) if m = then return " Graph is not Hamiltonian" end if 3) Ẽ = E 4) forall f E do A. set c (e) = c(e) e f and c (f) = m + 1 B. apply oracle to V, Ẽ) and c to obtain m C. if m = m then remove f from Ẽ end if 5) end for 6) return Ẽ. Polynomial size of each input into the oracle is clear. Number of oracle calls: 1 + m, which is also polynomial. If an oracle call has constant cost, then the algorithm runs in polynomial time. Page 5 of 5