2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1

Size: px
Start display at page:

Download "2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1"

Transcription

1 2 GRAPH AND NETWORK OPTIMIZATION E. Amaldi Introduction to Operations Research Politecnico Milano 1

2 A variety of decision-making problems can be formulated in terms of graphs and networks Examples: - transportation and distribution problems (freight and people), - network design (communication, electrical and others), - location problems (services and facilities), - project planning, resource management, - financial planning, timetable scheduling, - production planning,... E. Amaldi Introduction to Operations Research Politecnico Milano 2

3 2.1 Graphs and algorithms E. Amaldi Introduction to Operations Research Politecnico Milano 3

4 2.1.1 Graphs Example Road network which connects n cities n= city node connection edge 4 Model: A graph G = (N, E) which consists of a set N={1,2,3,4,5} of nodes (vertices) and a set E={[1,2],[1,3],[1,4],[1,5],[2,3],[2,5],[3,4],[3,5],[4,5]} N N of edges connecting them. [, ] indicate an unordered pair of nodes E. Amaldi Introduction to Operations Research Politecnico Milano 4

5 Two nodes are adjacent if they are connected by an edge. An edge e is incident in a node v if v is an endpoint of e. G nodes 1 and 2 are adjacent edge [1,5] is incident in nodes 1 and 5 4 The degree of a node is the number of incident edges. Example: node 1 has degree 4 and node 4 has degree 3 E. Amaldi Introduction to Operations Research Politecnico Milano 5

6 Given a graph G=(N, E) with n = N e m = E n=4 m=4 v 1 v 2 v 3 N = { v 1, v 2, v 3, v 4 } E = { [v 1, v 2 ], [v 2, v 3 ], [v 2, v 4 ], [v 3, v 4 ] } v 4 A sequence of consecutive edges [v 1, v 2 ], [v 2, v 3 ],, [v k-1, v k ] is a path which connects nodes v 1 and v k v 1 v 2 v 3 v k E. Amaldi Introduction to Operations Research Politecnico Milano 6

7 v i, v j N are connected if there exists a path connecting them v j v i G = (N, E) is connected if v i, v j are connected v i, v j N connected 4 not connected E. Amaldi Introduction to Operations Research Politecnico Milano 7

8 If some connections can be travelled only in one direction: directed graph G = (N, A), where A is a set of ordered pairs of nodes (v i, v j ) called arcs v i v j (v i, v j ) A 1 2 G E. Amaldi Introduction to Operations Research Politecnico Milano 8

9 A sequence of consecutive arcs (v 1, v 2 ), (v 2, v 3 ),, (v k-1, v k ) is a directed path from v 1 to v k v 1 v 2 v k directed path from 1 to 2 4 E. Amaldi Introduction to Operations Research Politecnico Milano 9

10 A cycle ( circuit ) is a ( directed ) path with v k = v 1 v 2 v 1 = v k v 3 v k cycle C 4 E. Amaldi Introduction to Operations Research Politecnico Milano 10

11 Compatibility and incompatibility relations Esempio 3 tasks and 2 engineers i j N 1 N 2 N 2 = N \ N 1 edge [i, j] indicates that task i can be executed by engineer j G is bipartite if there exists a partition (N 1, N 2 ) of N s.t. no edge connects nodes in the same N i (i = 1, 2 ) E. Amaldi Introduction to Operations Research Politecnico Milano 11

12 G is complete if E = { [v i, v j ] : v i, v j N, i j } n=4 m=6 Property For any undirected graph with n nodes, the number of edges m is such that n( n 1) m 2 For directed graphs we have m n(n-1). In both case we have equality for complete graphs. E. Amaldi Introduction to Operations Research Politecnico Milano 12

13 Precedence constraints between entities A project is composed of n activities {a i } 1 i n with m precedence relations between pairs of activities a i a j (a j cannot start before a i is completed) Model: directed graph G=(N, A) with n= N and m= A s.t. activity node i j a i a j E. Amaldi Introduction to Operations Research Politecnico Milano 13

14 2.1.2 Graph reachability Problem Given a directed graph G = (N, A) and a node s, determine all the nodes that are reachable from s. s Successor lists : S(1) = { 2, 4 } S(2) = { 5 } S(3) = { 5, 6 } S(4) = { 2 } S(5) = { 4 } S(6) = { 2 } E. Amaldi Introduction to Operations Research Politecnico Milano 14

15 Efficient algorithm which allows to find all nodes reachable from s? input G = (N, A) with n = N and m = A, described by the successor lists, and a node s output Subset M N of nodes of G reachable from s Q = queue containing the nodes reachable from s and not yet processed (First-In First-Out policy) E. Amaldi Introduction to Operations Research Politecnico Milano 15

16 Example Q = { 1 } e M = Ø Q = { 1 } e M = {1} Q = { 2, 4 } e M = M {2} Q = { 4, 5 } e M = M {4} M Q = { 5 } Q = e M = M {5} Subset M = { 1, 2, 4, 5 } of nodes that have been labeled is the subset of nodes reachable from s = 1. NB: There are no arcs exiting M and entering in N \ M! E. Amaldi Introduction to Operations Research Politecnico Milano 16

17 Graph reachability algorithm output Labeled nodes (in M) are reachable from s BEGIN Q := {s}; M := ; WHILE Q DO /* process a node h Q */ Select a node h Q e set Q := Q \ {h}; M := M {h}; /* label h */ FOR EACH j S(h) DO IF j M AND j Q THEN Q := Q {j} END-IF END-FOR END-WHILE END FIFO queue Q breadth-first search node exploration E. Amaldi Introduction to Operations Research Politecnico Milano 17

18 Given a set of nodes S N, the cut induced by S, δ(s) = { (v,w) A : v S, w N \ S o w S, v N \ S }, is the subset of edges with an endpoint in S and the other one in N \ S. Example N \ S S δ + (S) = { (v, w) A : v S, w N \ S } outgoing cut δ - (S) = { (v, w) A : w S, v N \ S} entering cut E. Amaldi Introduction to Operations Research Politecnico Milano 18

19 Example N \ M M The algorithm (exploration) stops because δ + (M)=Ø δ - (M) is the set of arcs with head in M and tail not in M E. Amaldi Introduction to Operations Research Politecnico Milano 19

20 2.1.3 Complexity of algorithms Algorithm: sequence of instructions that allow to solve the instances of a problem Since the computing time is computer dependent, we consider the elementary operations (arithmetic operations, comparisons,...) we assume they all have the same cost Examples: 1) Dot product of a, b R n requires n multiplications and n-1 additions 2n-1 elementary operations 2) Given two nxn matices A and B, the product AB requires (2n-1)n 2 elementary operations E. Amaldi Introduction to Operations Research Politecnico Milano 20

21 In general it is hard to determine the exact number of elementary operations (e.o.) as a function of the size of the instance (here n o m) We consider the speed of growth in the worst case: We look for a function f(n) which is an upper bound on the number of e.o. needed to solve every instance of size n number of e.o. for every instance of size n f (n) E. Amaldi Introduction to Operations Research Politecnico Milano 21

22 A function f (n) is order of g(n) and we write f (n) = O( g (n) ) if c > 0 such that f (n) c g(n), for n sufficiently large asymptotically c g f n 0 Examples 3n 3 + n = O(n 3 ) 6n = O(n 2 ) E. Amaldi Introduction to Operations Research Politecnico Milano 22

23 We distinguish between algorithms whose order of complexity (in the worst case) is polynomial: O( n d ) for a given constant d The algorithms with a higher order polynomial complexity (such as O(n 10 ) ) are not efficient in practice! exponential: O ( 2 n ) E. Amaldi Introduction to Operations Research Politecnico Milano 23

24 Polynomial versus exponential growth E. Amaldi Introduction to Operations Research Politecnico Milano 24

25 E. Amaldi Introduction to Operations Research Politecnico Milano 25

26 Example: complexity of exploration algorithm At each iteration of the cyclewhile: select one node h Q non yet processed, extract it from Q and label it by inserting it in M insert in Q all unlabeled nodes j that are directly reachable from h Since each node h is insereted in Q at most once, each arc (h, j) is considered at most once Overall complexity O(n + m), where n = N e m = A NB: for dense graphs m = O(n 2 ) E. Amaldi Introduction to Operations Research Politecnico Milano 26

27 2.1.4 Subgraph Example Design a communication network that connects n cities ( offices ) Model: Undirected graph G = (N, E) with n = N, m = E 1 2 n=5 5 3 The edges represent the possible links 4 E. Amaldi Introduction to Operations Research Politecnico Milano 27

28 G = (N, E ) is a subgraph of G = (N, E) if N N and E E only contains edges with both endpoints in N. G=(N, E) G =(N, E ) N = {1,2,3,5} N E = {[1,2],[1,5],[2,3],[2,5],[3,5]} E E. Amaldi Introduction to Operations Research Politecnico Milano 28

29 Desired properties of a communication network: 1) every pair of cities must be connected connected subgraph containing all the nodes of G 2) do not waste resources acyclic subgraph (without cycles) A tree G T = (N, T) of G is a subgraph of G that is both connected and acyclic. 1 2 G T 5 3 T={[1,5],[2,5],[3,5]} E. Amaldi Introduction to Operations Research Politecnico Milano 29

30 G T = (N, T) is a spanning tree of G = (N, E) if it contains all the nodes of G ( namely N = N ) 1 2 G T The leaves of a tree are the nodes of degree 1. E. Amaldi Introduction to Operations Research Politecnico Milano 30

31 Trees properties 1 ) Every tree T with n 2 nodes has at least 2 leaves. Proof By contradiction: if T has 0 or 1 leaves, it would be possible to travel along its edges starting from the leaf (if there is one) or from any node, using each edge at most once. Since a tree has no cycles, the nodes cannot be visited twice. If there is no (other) leaf, we can leave each node along an unused incident edge. an infinite path in a finite graph! E. Amaldi Introduction to Operations Research Politecnico Milano 31

32 2 ) Every tree with n nodes has n 1 edges. Dim. By induction: Inductive base : true for n = 1 (1 node and 0 edges) Inductive step : if it true for the trees with n nodes, it is also true for those with n + 1 nodes. Consider a tree T 1 with n + 1 nodes. By deleting one leaf and its incident edge, we obtain a tree T 2 with n nodes. Since by assumption Property 2) holds for T 2, T 2 has n 1 edges. T 1, which has one more edge than T 2, has n edges. E. Amaldi Introduction to Operations Research Politecnico Milano 32

33 3 ) Any pair of nodes is connected via a unique path otherwise there would be a cycle! 4 ) By adding to a tree any edge that it does not contain, we create a unique cycle consisting of the path of Property 3) and the new edge. E. Amaldi Introduction to Operations Research Politecnico Milano 33

34 5 ) Exchange property Let G T = (N, T ) be a spanning tree of G = (N, E) Consider an edge e T and the unique cycle C of T {e} (Property 4). For each edge f C \ {e}, the subgraph T {e} \ {f } is also a spanning tree of G. G T f e 3 C T {e} \ {f } E. Amaldi Introduction to Operations Research Politecnico Milano 34

Chapter 3: Discrete Optimization Integer Programming

Chapter 3: Discrete Optimization Integer Programming Chapter 3: Discrete Optimization Integer Programming Edoardo Amaldi DEIB Politecnico di Milano edoardo.amaldi@polimi.it Sito web: http://home.deib.polimi.it/amaldi/ott-13-14.shtml A.A. 2013-14 Edoardo

More information

Preliminaries and Complexity Theory

Preliminaries and Complexity Theory Preliminaries and Complexity Theory Oleksandr Romanko CAS 746 - Advanced Topics in Combinatorial Optimization McMaster University, January 16, 2006 Introduction Book structure: 2 Part I Linear Algebra

More information

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees , 2009 Lecture 5: Shortest Paths & Spanning Trees University of Twente m.uetz@utwente.nl wwwhome.math.utwente.nl/~uetzm/dw/ Shortest Path Problem "#$%&'%()*%"()$#+,&- Given directed "#$%&'()*+,%+('-*.#/'01234564'.*,'7+"-%/8',&'5"4'84%#3

More information

Chapter 3: Discrete Optimization Integer Programming

Chapter 3: Discrete Optimization Integer Programming Chapter 3: Discrete Optimization Integer Programming Edoardo Amaldi DEIB Politecnico di Milano edoardo.amaldi@polimi.it Website: http://home.deib.polimi.it/amaldi/opt-16-17.shtml Academic year 2016-17

More information

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

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1 CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY E. Amaldi Foundations of Operations Research Politecnico di Milano 1 Goal: Evaluate the computational requirements (this course s focus: time) to solve

More information

Combinatorial Optimization

Combinatorial Optimization Combinatorial Optimization Problem set 8: solutions 1. Fix constants a R and b > 1. For n N, let f(n) = n a and g(n) = b n. Prove that f(n) = o ( g(n) ). Solution. First we observe that g(n) 0 for all

More information

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11 Undirected Graphs Undirected graph. G = (V, E) V = nodes. E = edges between pairs of nodes. Captures pairwise relationship between objects. Graph size parameters: n = V, m = E. V = {, 2, 3,,,, 7, 8 } E

More information

CSE 321 Solutions to Practice Problems

CSE 321 Solutions to Practice Problems CSE 321 Solutions to Practice Problems Instructions: Feel free NOT to multiply out binomial coefficients, factorials, etc, and feel free to leave answers in the form of a sum. No calculators, books or

More information

Chapter 7 Network Flow Problems, I

Chapter 7 Network Flow Problems, I Chapter 7 Network Flow Problems, I Network flow problems are the most frequently solved linear programming problems. They include as special cases, the assignment, transportation, maximum flow, and shortest

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

GRAPH ALGORITHMS Week 3 (16-21 October 2017)

GRAPH ALGORITHMS Week 3 (16-21 October 2017) GRAPH ALGORITHMS Week 3 (16-21 October 2017) C. Croitoru croitoru@info.uaic.ro FII October 15, 2017 1 / 63 OUTLINE Graph Theory Vocabulary 1 Definition of a Graph 2 Variations in the Definition of a Graph

More information

Enumerate all possible assignments and take the An algorithm is a well-defined computational

Enumerate all possible assignments and take the An algorithm is a well-defined computational EMIS 8374 [Algorithm Design and Analysis] 1 EMIS 8374 [Algorithm Design and Analysis] 2 Designing and Evaluating Algorithms A (Bad) Algorithm for the Assignment Problem Enumerate all possible assignments

More information

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} Preliminaries Graphs G = (V, E), V : set of vertices E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) 1 2 3 5 4 V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} 1 Directed Graph (Digraph)

More information

ICS 252 Introduction to Computer Design

ICS 252 Introduction to Computer Design ICS 252 fall 2006 Eli Bozorgzadeh Computer Science Department-UCI References and Copyright Textbooks referred [Mic94] G. De Micheli Synthesis and Optimization of Digital Circuits McGraw-Hill, 1994. [CLR90]

More information

Generating p-extremal graphs

Generating p-extremal graphs Generating p-extremal graphs Derrick Stolee Department of Mathematics Department of Computer Science University of Nebraska Lincoln s-dstolee1@math.unl.edu August 2, 2011 Abstract Let f(n, p be the maximum

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

Problem-Solving via Search Lecture 3

Problem-Solving via Search Lecture 3 Lecture 3 What is a search problem? How do search algorithms work and how do we evaluate their performance? 1 Agenda An example task Problem formulation Infrastructure for search algorithms Complexity

More information

Scheduling and Optimization Course (MPRI)

Scheduling and Optimization Course (MPRI) MPRI Scheduling and optimization: lecture p. /6 Scheduling and Optimization Course (MPRI) Leo Liberti LIX, École Polytechnique, France MPRI Scheduling and optimization: lecture p. /6 Teachers Christoph

More information

Discrete Optimization 2010 Lecture 3 Maximum Flows

Discrete Optimization 2010 Lecture 3 Maximum Flows Remainder: Shortest Paths Maximum Flows Discrete Optimization 2010 Lecture 3 Maximum Flows Marc Uetz University of Twente m.uetz@utwente.nl Lecture 3: sheet 1 / 29 Marc Uetz Discrete Optimization Outline

More information

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows Matching Input: undirected graph G = (V, E). M E is a matching if each node appears in at most one Part V edge in M. Maximum Matching: find a matching of maximum cardinality Matchings Ernst Mayr, Harald

More information

Combinatorial optimization problems

Combinatorial optimization problems Combinatorial optimization problems Heuristic Algorithms Giovanni Righini University of Milan Department of Computer Science (Crema) Optimization In general an optimization problem can be formulated as:

More information

Maximum flow problem (part I)

Maximum flow problem (part I) Maximum flow problem (part I) Combinatorial Optimization Giovanni Righini Università degli Studi di Milano Definitions A flow network is a digraph D = (N,A) with two particular nodes s and t acting as

More information

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms REVIEW QUESTIONS Chapter 1: Foundations: Sets, Logic, and Algorithms 1. Why can t a Venn diagram be used to prove a statement about sets? 2. Suppose S is a set with n elements. Explain why the power set

More information

IS 709/809: Computational Methods in IS Research Fall Exam Review

IS 709/809: Computational Methods in IS Research Fall Exam Review IS 709/809: Computational Methods in IS Research Fall 2017 Exam Review Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Exam When: Tuesday (11/28) 7:10pm

More information

Chapter 3. Complexity of algorithms

Chapter 3. Complexity of algorithms Chapter 3 Complexity of algorithms In this chapter, we see how problems may be classified according to their level of difficulty. Most problems that we consider in these notes are of general character,

More information

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu)

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu) 15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu) First show l = c by proving l c and c l. For a maximum matching M in G, let V be the set of vertices covered by M. Since any vertex in

More information

Maximum flow problem

Maximum flow problem Maximum flow problem 7000 Network flows Network Directed graph G = (V, E) Source node s V, sink node t V Edge capacities: cap : E R 0 Flow: f : E R 0 satisfying 1. Flow conservation constraints e:target(e)=v

More information

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs:

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs: Instructions and Announcements Homework #3 ue Time: 017/1/14 (Thu.) 17:0 Contact TAs: ada-ta@csie.ntu.edu.tw There are four programming problems and two handwritten problems. Programming. The judge system

More information

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

15.083J/6.859J Integer Optimization. Lecture 2: Efficient Algorithms and Computational Complexity 15.083J/6.859J Integer Optimization Lecture 2: Efficient Algorithms and Computational Complexity 1 Outline Efficient algorithms Slide 1 Complexity The classes P and N P The classes N P-complete and N P-hard

More information

Register machines L2 18

Register machines L2 18 Register machines L2 18 Algorithms, informally L2 19 No precise definition of algorithm at the time Hilbert posed the Entscheidungsproblem, just examples. Common features of the examples: finite description

More information

Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic).

Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic). Trees A tree is a graph which is (a) Connected and (b) has no cycles (acyclic). 1 Lemma 1 Let the components of G be C 1, C 2,..., C r, Suppose e = (u, v) / E, u C i, v C j. (a) i = j ω(g + e) = ω(g).

More information

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

Week 4. (1) 0 f ij u ij. Week 4 1 Network Flow Chapter 7 of the book is about optimisation problems on networks. Section 7.1 gives a quick introduction to the definitions of graph theory. In fact I hope these are already known

More information

Bounds on the Traveling Salesman Problem

Bounds on the Traveling Salesman Problem Bounds on the Traveling Salesman Problem Sean Zachary Roberson Texas A&M University MATH 613, Graph Theory A common routing problem is as follows: given a collection of stops (for example, towns, stations,

More information

Permutations and Combinations

Permutations and Combinations Permutations and Combinations Permutations Definition: Let S be a set with n elements A permutation of S is an ordered list (arrangement) of its elements For r = 1,..., n an r-permutation of S is an ordered

More information

Theory of Computation Chapter 1: Introduction

Theory of Computation Chapter 1: Introduction Theory of Computation Chapter 1: Introduction Guan-Shieng Huang Sep. 20, 2006 Feb. 9, 2009 0-0 Text Book Computational Complexity, by C. H. Papadimitriou, Addison-Wesley, 1994. 1 References Garey, M.R.

More information

Acyclic Digraphs arising from Complete Intersections

Acyclic Digraphs arising from Complete Intersections Acyclic Digraphs arising from Complete Intersections Walter D. Morris, Jr. George Mason University wmorris@gmu.edu July 8, 2016 Abstract We call a directed acyclic graph a CI-digraph if a certain affine

More information

CS/COE

CS/COE CS/COE 1501 www.cs.pitt.edu/~nlf4/cs1501/ P vs NP But first, something completely different... Some computational problems are unsolvable No algorithm can be written that will always produce the correct

More information

Branch-and-Bound for the Travelling Salesman Problem

Branch-and-Bound for the Travelling Salesman Problem Branch-and-Bound for the Travelling Salesman Problem Leo Liberti LIX, École Polytechnique, F-91128 Palaiseau, France Email:liberti@lix.polytechnique.fr March 15, 2011 Contents 1 The setting 1 1.1 Graphs...............................................

More information

2. A vertex in G is central if its greatest distance from any other vertex is as small as possible. This distance is the radius of G.

2. A vertex in G is central if its greatest distance from any other vertex is as small as possible. This distance is the radius of G. CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh (rezab@stanford.edu) HW#1 Due at the beginning of class Thursday 01/21/16 1. Prove that at least one of G and G is connected. Here, G

More information

Core Mathematics C1 (AS) Unit C1

Core Mathematics C1 (AS) Unit C1 Core Mathematics C1 (AS) Unit C1 Algebraic manipulation of polynomials, including expanding brackets and collecting like terms, factorisation. Graphs of functions; sketching curves defined by simple equations.

More information

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

Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems Rani M. R, Mohith Jagalmohanan, R. Subashini Binary matrices having simultaneous consecutive

More information

Matching Residents to Hospitals

Matching Residents to Hospitals Midterm Review Matching Residents to Hospitals Goal. Given a set of preferences among hospitals and medical school students, design a self-reinforcing admissions process. Unstable pair: applicant x and

More information

Algorithms and Theory of Computation. Lecture 2: Big-O Notation Graph Algorithms

Algorithms and Theory of Computation. Lecture 2: Big-O Notation Graph Algorithms Algorithms and Theory of Computation Lecture 2: Big-O Notation Graph Algorithms Xiaohui Bei MAS 714 August 14, 2018 Nanyang Technological University MAS 714 August 14, 2018 1 / 20 O, Ω, and Θ Nanyang Technological

More information

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours. UNIVERSITY OF YORK MSc Examinations 2004 MATHEMATICS Networks Time Allowed: 3 hours. Answer 4 questions. Standard calculators will be provided but should be unnecessary. 1 Turn over 2 continued on next

More information

ALG 5.4. Lexicographical Search: Applied to Scheduling Theory. Professor John Reif

ALG 5.4. Lexicographical Search: Applied to Scheduling Theory. Professor John Reif Algorithms Professor John Reif ALG 54 input assume problem Scheduling Problems Set of n tasks in precidence relation on tasks Also, given m processors Unit time cost to process task using single processor

More information

Supporting hyperplanes

Supporting hyperplanes Supporting hyperplanes General approach when using Lagrangian methods Lecture 1 homework Shadow prices A linear programming problem The simplex tableau Simple example with cycling The pivot rule being

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

Friday, September 21, Flows

Friday, September 21, Flows Flows Building evacuation plan people to evacuate from the offices corridors and stairways capacity 10 10 5 50 15 15 15 60 60 50 15 10 60 10 60 15 15 50 For each person determine the path to follow to

More information

ACYCLIC DIGRAPHS GIVING RISE TO COMPLETE INTERSECTIONS

ACYCLIC DIGRAPHS GIVING RISE TO COMPLETE INTERSECTIONS ACYCLIC DIGRAPHS GIVING RISE TO COMPLETE INTERSECTIONS WALTER D. MORRIS, JR. ABSTRACT. We call a directed acyclic graph a CIdigraph if a certain affine semigroup ring defined by it is a complete intersection.

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

Optimization Exercise Set n.5 :

Optimization Exercise Set n.5 : Optimization Exercise Set n.5 : Prepared by S. Coniglio translated by O. Jabali 2016/2017 1 5.1 Airport location In air transportation, usually there is not a direct connection between every pair of airports.

More information

Graph G = (V, E). V ={vertices}, E={edges}. V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Graph G = (V, E). V ={vertices}, E={edges}. V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)} Graph Theory Graph G = (V, E). V ={vertices}, E={edges}. a b c h k d g f e V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)} E =16. Digraph D = (V, A). V ={vertices}, E={edges}.

More information

Reverse mathematics of some topics from algorithmic graph theory

Reverse mathematics of some topics from algorithmic graph theory F U N D A M E N T A MATHEMATICAE 157 (1998) Reverse mathematics of some topics from algorithmic graph theory by Peter G. C l o t e (Chestnut Hill, Mass.) and Jeffry L. H i r s t (Boone, N.C.) Abstract.

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

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: 2017 2018 Time Allowed 2 Hours INSTRUCTIONS TO STUDENTS 1. This assessment consists of Eight (8) questions and comprises

More information

More on NP and Reductions

More on NP and Reductions Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems

More information

Homework Assignment 1 Solutions

Homework Assignment 1 Solutions MTAT.03.286: Advanced Methods in Algorithms Homework Assignment 1 Solutions University of Tartu 1 Big-O notation For each of the following, indicate whether f(n) = O(g(n)), f(n) = Ω(g(n)), or f(n) = Θ(g(n)).

More information

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time Network Flow 1 The Maximum-Flow Problem directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time 2 Maximum Flows and Minimum Cuts flows and cuts max flow equals

More information

Breadth First Search, Dijkstra s Algorithm for Shortest Paths

Breadth First Search, Dijkstra s Algorithm for Shortest Paths CS 374: Algorithms & Models of Computation, Spring 2017 Breadth First Search, Dijkstra s Algorithm for Shortest Paths Lecture 17 March 1, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 42 Part I Breadth

More information

Exact Algorithms for Dominating Induced Matching Based on Graph Partition

Exact Algorithms for Dominating Induced Matching Based on Graph Partition Exact Algorithms for Dominating Induced Matching Based on Graph Partition Mingyu Xiao School of Computer Science and Engineering University of Electronic Science and Technology of China Chengdu 611731,

More information

Non-cyclic Train Timetabling and Comparability Graphs

Non-cyclic Train Timetabling and Comparability Graphs Non-cyclic Train Timetabling and Comparability Graphs Valentina Cacchiani, Alberto Caprara, Paolo Toth DEIS, Università di Bologna, Viale Risorgimento 2, I-40136 Bologna, Italy {valentina.cacchiani,alberto.caprara,paolo.toth}@unibo.it

More information

Breadth-First Search of Graphs

Breadth-First Search of Graphs Breadth-First Search of Graphs Analysis of Algorithms Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Applications of Breadth-First Search of Graphs a) Single Source

More information

Introduction. An Introduction to Algorithms and Data Structures

Introduction. An Introduction to Algorithms and Data Structures Introduction An Introduction to Algorithms and Data Structures Overview Aims This course is an introduction to the design, analysis and wide variety of algorithms (a topic often called Algorithmics ).

More information

A Characterization of Partial Directed Line Graphs

A Characterization of Partial Directed Line Graphs A Characterization of Partial Directed Line Graphs Nicola Apollonio Paolo G. Franciosa Abstract Can a directed graph be completed to a directed line graph? If possible, how many arcs must be added? In

More information

MA015: Graph Algorithms

MA015: Graph Algorithms MA015 3. Minimum cuts 1 MA015: Graph Algorithms 3. Minimum cuts (in undirected graphs) Jan Obdržálek obdrzalek@fi.muni.cz Faculty of Informatics, Masaryk University, Brno All pairs flows/cuts MA015 3.

More information

PATH PROBLEMS IN SKEW-SYMMETRIC GRAPHS ANDREW V. GOLDBERG COMPUTER SCIENCE DEPARTMENT STANFORD UNIVERSITY STANFORD, CA

PATH PROBLEMS IN SKEW-SYMMETRIC GRAPHS ANDREW V. GOLDBERG COMPUTER SCIENCE DEPARTMENT STANFORD UNIVERSITY STANFORD, CA PATH PROBLEMS IN SKEW-SYMMETRIC GRAPHS ANDREW V. GOLDBERG COMPUTER SCIENCE DEPARTMENT STANFORD UNIVERSITY STANFORD, CA 94305 GOLDBERG@CS.STANFORD.EDU AND ALEXANDER V. KARZANOV INSTITUTE FOR SYSTEMS ANALYSIS

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

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

Binary Decision Diagrams

Binary Decision Diagrams Binary Decision Diagrams Literature Some pointers: H.R. Andersen, An Introduction to Binary Decision Diagrams, Lecture notes, Department of Information Technology, IT University of Copenhagen Tools: URL:

More information

INF421, Lecture 2 Queues

INF421, Lecture 2 Queues INF421, Lecture 2 Queues Leo Liberti LIX, École Polytechnique, France INF421, Lecture 2 p. 1 Course Objective: to teach you some data structures and associated algorithms Evaluation: TP noté en salle info

More information

Mathematics for Decision Making: An Introduction. Lecture 8

Mathematics for Decision Making: An Introduction. Lecture 8 Mathematics for Decision Making: An Introduction Lecture 8 Matthias Köppe UC Davis, Mathematics January 29, 2009 8 1 Shortest Paths and Feasible Potentials Feasible Potentials Suppose for all v V, there

More information

CMPSCI611: The Matroid Theorem Lecture 5

CMPSCI611: The Matroid Theorem Lecture 5 CMPSCI611: The Matroid Theorem Lecture 5 We first review our definitions: A subset system is a set E together with a set of subsets of E, called I, such that I is closed under inclusion. This means that

More information

Data Structures and Algorithms (CSCI 340)

Data Structures and Algorithms (CSCI 340) University of Wisconsin Parkside Fall Semester 2008 Department of Computer Science Prof. Dr. F. Seutter Data Structures and Algorithms (CSCI 340) Homework Assignments The numbering of the problems refers

More information

Optimization Exercise Set n. 4 :

Optimization Exercise Set n. 4 : Optimization Exercise Set n. 4 : Prepared by S. Coniglio and E. Amaldi translated by O. Jabali 2018/2019 1 4.1 Airport location In air transportation, usually there is not a direct connection between every

More information

AC64/AT64/ AC115/AT115 DESIGN & ANALYSIS OF ALGORITHMS

AC64/AT64/ AC115/AT115 DESIGN & ANALYSIS OF ALGORITHMS Q.2 a. Solve the recurrence relation: T (n)=2t(n/2) + n; T(1) = 0 (6) Refer Complexity analysis of merge soft. b. Write the psuedocode for the Selection sort algorithm. What loop variant does it maintain?

More information

New Integer Programming Formulations of the Generalized Travelling Salesman Problem

New Integer Programming Formulations of the Generalized Travelling Salesman Problem American Journal of Applied Sciences 4 (11): 932-937, 2007 ISSN 1546-9239 2007 Science Publications New Integer Programming Formulations of the Generalized Travelling Salesman Problem Petrica C. Pop Department

More information

CS 4407 Algorithms Lecture: Shortest Path Algorithms

CS 4407 Algorithms Lecture: Shortest Path Algorithms CS 440 Algorithms Lecture: Shortest Path Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Outline Shortest Path Problem General Lemmas and Theorems. Algorithms Bellman-Ford

More information

Induced Graph Ramsey Theory

Induced Graph Ramsey Theory Induced Graph Ramsey Theory Marcus Schaefer School of CTI DePaul University 243 South Wabash Avenue Chicago, Illinois 60604, USA schaefer@cs.depaul.edu February 27, 2001 Pradyut Shah Department of Computer

More information

Strongly chordal and chordal bipartite graphs are sandwich monotone

Strongly chordal and chordal bipartite graphs are sandwich monotone Strongly chordal and chordal bipartite graphs are sandwich monotone Pinar Heggernes Federico Mancini Charis Papadopoulos R. Sritharan Abstract A graph class is sandwich monotone if, for every pair of its

More information

6.046 Recitation 11 Handout

6.046 Recitation 11 Handout 6.046 Recitation 11 Handout May 2, 2008 1 Max Flow as a Linear Program As a reminder, a linear program is a problem that can be written as that of fulfilling an objective function and a set of constraints

More information

Timetabling and Robustness Computing Good and Delay-Resistant Timetables

Timetabling and Robustness Computing Good and Delay-Resistant Timetables Timetabling and Robustness Computing Good and Delay-Resistant Timetables Rolf Möhring GK MDS, 24 Nov 2008 DFG Research Center MATHEON mathematics for key technologies Overview The Periodic Event Scheduling

More information

The Mixed Chinese Postman Problem Parameterized by Pathwidth and Treedepth

The Mixed Chinese Postman Problem Parameterized by Pathwidth and Treedepth The Mixed Chinese Postman Problem Parameterized by Pathwidth and Treedepth Gregory Gutin, Mark Jones, and Magnus Wahlström Royal Holloway, University of London Egham, Surrey TW20 0EX, UK Abstract In the

More information

Discrete mathematics , Fall Instructor: prof. János Pach

Discrete mathematics , Fall Instructor: prof. János Pach Discrete mathematics 016-017, Fall Instructor: prof. János Pach - covered material - Lecture 1. Counting problems To read: [Lov]: 1.. Sets, 1.3. Number of subsets, 1.5. Sequences, 1.6. Permutations, 1.7.

More information

Graph Transformations T1 and T2

Graph Transformations T1 and T2 Graph Transformations T1 and T2 We now introduce two graph transformations T1 and T2. Reducibility by successive application of these two transformations is equivalent to reducibility by intervals. The

More information

Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs

Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs Nathan Lindzey, Ross M. McConnell Colorado State University, Fort Collins CO 80521, USA Abstract. Tucker characterized

More information

1 Some loose ends from last time

1 Some loose ends from last time Cornell University, Fall 2010 CS 6820: Algorithms Lecture notes: Kruskal s and Borůvka s MST algorithms September 20, 2010 1 Some loose ends from last time 1.1 A lemma concerning greedy algorithms and

More information

Representations of All Solutions of Boolean Programming Problems

Representations of All Solutions of Boolean Programming Problems Representations of All Solutions of Boolean Programming Problems Utz-Uwe Haus and Carla Michini Institute for Operations Research Department of Mathematics ETH Zurich Rämistr. 101, 8092 Zürich, Switzerland

More information

Realization Plans for Extensive Form Games without Perfect Recall

Realization Plans for Extensive Form Games without Perfect Recall Realization Plans for Extensive Form Games without Perfect Recall Richard E. Stearns Department of Computer Science University at Albany - SUNY Albany, NY 12222 April 13, 2015 Abstract Given a game in

More information

Packing and decomposition of graphs with trees

Packing and decomposition of graphs with trees Packing and decomposition of graphs with trees Raphael Yuster Department of Mathematics University of Haifa-ORANIM Tivon 36006, Israel. e-mail: raphy@math.tau.ac.il Abstract Let H be a tree on h 2 vertices.

More information

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Matroids Shortest Paths Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Marc Uetz University of Twente m.uetz@utwente.nl Lecture 2: sheet 1 / 25 Marc Uetz Discrete Optimization Matroids

More information

1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)).

1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)). Code No: R05220502 Set No. 1 1. (a) Explain the asymptotic notations used in algorithm analysis. (b) Prove that f(n)=0(h(n)) where f(n)=0(g(n)) and g(n)=0(h(n)). 2. (a) List some of the relative advantages

More information

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005

CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 CSCE 750 Final Exam Answer Key Wednesday December 7, 2005 Do all problems. Put your answers on blank paper or in a test booklet. There are 00 points total in the exam. You have 80 minutes. Please note

More information

CS60007 Algorithm Design and Analysis 2018 Assignment 1

CS60007 Algorithm Design and Analysis 2018 Assignment 1 CS60007 Algorithm Design and Analysis 2018 Assignment 1 Palash Dey and Swagato Sanyal Indian Institute of Technology, Kharagpur Please submit the solutions of the problems 6, 11, 12 and 13 (written in

More information

4. How to prove a problem is NPC

4. How to prove a problem is NPC The reducibility relation T is transitive, i.e, A T B and B T C imply A T C Therefore, to prove that a problem A is NPC: (1) show that A NP (2) choose some known NPC problem B define a polynomial transformation

More information

University of Toronto Department of Electrical and Computer Engineering. Final Examination. ECE 345 Algorithms and Data Structures Fall 2016

University of Toronto Department of Electrical and Computer Engineering. Final Examination. ECE 345 Algorithms and Data Structures Fall 2016 University of Toronto Department of Electrical and Computer Engineering Final Examination ECE 345 Algorithms and Data Structures Fall 2016 Print your first name, last name, UTORid, and student number neatly

More information

NP-complete Problems

NP-complete Problems NP-complete Problems HP, TSP, 3COL, 0/1IP Dimitris Diamantis µπλ November 6, 2014 Dimitris Diamantis (µπλ ) NP-complete Problems November 6, 2014 1 / 34 HAMILTON PATH is NP-Complete Definition Given an

More information

Time-Dependent SHARC-Routing

Time-Dependent SHARC-Routing Time-Dependent SHARC-Routing Daniel Delling 1 1 Universität Karlsruhe (TH), 76128 Karlsruhe, Germany Email:delling@ira.uka.de Abstract In recent years, many speed-up techniques for Dijkstra s algorithm

More information