D1 Discrete Mathematics The Travelling Salesperson problem. The Nearest Neighbour Algorithm The Lower Bound Algorithm The Tour Improvement Algorithm

Size: px
Start display at page:

Download "D1 Discrete Mathematics The Travelling Salesperson problem. The Nearest Neighbour Algorithm The Lower Bound Algorithm The Tour Improvement Algorithm"

Transcription

1 1 iscrete Mathematics The Travelling Salesperson problem The Nearest Neighbour lgorithm The Lower ound lgorithm The Tour Improvement lgorithm

2 The Travelling Salesperson: Typically a travelling salesperson will want to cover all the towns in their area using the minimum driving distance. Travelling salesperson problems tackle this by first turning the towns and roads into a network. We have seen that finding a tour that visits every arc (route inspection) depended on earlier work by Euler. Similarly the problem of finding a tour that visits every node (travelling salesperson) was investigated in the 19 th entury by the Irish mathematician Sir William Hamilton. efinition: Hamiltonian cycle is a tour which contains every node once

3 with weight 1 There are just three essentially different Hamiltonian cycles: onsider the Hamiltonian cycles for this graph 2 with weight 17 with weight

4 However, not all graphs have Hamiltonian cycles. onsider this graph: salesperson living in town, say, may still want to find the shortest round trip visiting every town. To enable you to use the next three algorithms you can replace any network like this one by the complete network of shortest distances. The shortest distance between and is 33 (via : ) The shortest distance between and is 3 (via : ) dding direct arcs and does not change the problem but does produce a graph with Hamiltonian cycles. The rest of this module assumes the problem is always the classical one of finding a Hamiltonian cycle of minimum weight with no repetition of nodes. Our next algorithm is called the Nearest Neighbour it will find a solution to a travelling salesperson problem but not necessarily the best (optimum). So we will then look at finding limits between which the optimum solution must lie and how to improve any solution we find.

5 The Nearest Neighbour lgorithm To find a (reasonably good) Hamiltonian cycle i.e. a closed trail containing every node of a graph Step 1 hoose any starting node Step 2 onsider the arcs which join the node just chosen to nodes as yet unchosen. Pick the one with minimum weight and add it to the cycle Step 3 Repeat step 2 until all nodes have been chosen Step Then add the arc that joins the last-chosen node to the first-chosen node

6 To find a (reasonably good) Hamiltonian cycle i.e. a closed trail containing every node of this graph using the Nearest Neighbour lgorithm: 7 7 E E hoose any starting node let s say onsider the arcs which join the node just chosen to nodes as yet unchosen. Pick the one with minimum weight and add it to the cycle The first arc is as is the least of,, and From, E is chosen as is the least of 7, 7, and Then E,, and finally The cycle is E which has weight 2 ( ) The Nearest Neighbour lgorithm is greedy because at each stage the immediately best route is chosen, without a look ahead, or back, to possible future problems or better solutions. We do know that the optimum solution will have an equal or lower weight than it (by definition) and so the algorithm has produced an upper bound. This then begs the question: an we find a lower bound to see how much potential there is for improvement?

7 Step 1 Step 2 The Lower ound lgorithm To find a lower bound for a travelling salesperson problem Step 3 Pick any node and remove the two connecting arcs with least weight Find the minimum spanning tree for the other nodes using Prim s algorithm dd back in the two arcs removed previously Step The weight of the resulting graph (which may not be a cycle) is a lower bound i.e. any optimum solution must have at least this weight

8 To find a lower bound for a Hamiltonian cycle using the Lower ound lgorithm: 7 How do we know this? 7 E Pick any node and remove the two connecting arcs with least weight Let s pick and remove arcs and E Find the minimum spanning tree for E using Prim s algorithm Pick any starting node, say,. The shortest arc is, then E and finally E. Now we add in the two arcs we removed earlier This tree has weight 2 ( ) The optimum solution must have at least this weight Well, any Hamiltonian cycle must consist of arcs (because there are nodes): 2 arcs into and out of and the other three arcs connecting,, and E. The two arcs from must have weight of at least +, since these are the smallest available. y applying Prim s algorithm to,, and E we can see that the three arcs connecting,, and E must have at least weight + + (the minimum connector or spanning tree) Hence, it is impossible for any Hamiltonian cycle to have weight less than

9 The Tour Improvement lgorithm To look for possible improvement in a tour found by the nearest neighbour algorithm: 1 2 Step 1 Number the nodes in the order of the tour; start at node 1 Step 2 onsider just the part of the tour Step 3 Swap the middle nodes to change the order to Step ompare the two and keep the order with the lower weight 3 Step Move on to node 2 and repeat until each node has been the start node once

10 To look for possible improvement in a tour using the tour improvement algorithm: Here is a network: 7 7 nd here is a tour: E It has weight 3 Let s see if we can improve on that: We have now had each node at the front and so we stop. The final tour is E. E Pick as node 1 and consider the tour from --E- This has weight + + = 21 Now swap the middle two nodes nd you get -E-- This has weight = 20 So swap E and and the tour becomes E Now look at E E = = 22 E = = 17 So swap and and the tour becomes E Now look at = = 1 = = 20 So leave the tour as E Now look at E E = + + = 1 E = + + = 20 So leave the tour as E Now look at E E = + + = 1 E = + + = 1 So swap and E and the tour becomes E

11

12 1 2 3

VIII. NP-completeness

VIII. NP-completeness VIII. NP-completeness 1 / 15 NP-Completeness Overview 1. Introduction 2. P and NP 3. NP-complete (NPC): formal definition 4. How to prove a problem is NPC 5. How to solve a NPC problem: approximate algorithms

More information

REVISION SHEET DECISION MATHS 2 DECISION ANALYSIS

REVISION SHEET DECISION MATHS 2 DECISION ANALYSIS REVISION SHEET DECISION MATHS 2 DECISION ANALYSIS The main ideas are covered in AQA Edexcel MEI OCR D2 Before the exam you should know The meaning of the different kinds of node. Be able to construct a

More information

Curriculum Area: Mathematics A Level - 2 year course (AQA) Year: 12. Aspire Learn Achieve

Curriculum Area: Mathematics A Level - 2 year course (AQA) Year: 12. Aspire Learn Achieve Topics Core 1 - Algebra Core 1 - Coordinate Geometry Core 1 - Differentiation Core 1 - Integration Year Curriculum - Use and manipulate surds - Quadratic functions and their graphs - The discriminant of

More information

Warm-up Find the shortest trip (total distance) starting and ending in Chicago and visiting each other city once.

Warm-up Find the shortest trip (total distance) starting and ending in Chicago and visiting each other city once. Warm-up Find the shortest trip (total distance) starting and ending in Chicago and visiting each other city once. Minimum-cost Hamiltonian Circuits Practice Homework time Minneapolis Cleveland 779 354

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

Circuits. CSE 373 Data Structures

Circuits. CSE 373 Data Structures Circuits CSE 373 Data Structures Readings Reading Alas not in your book. So it won t be on the final! Circuits 2 Euler Euler (1707-1783): might be the most prolific mathematician of all times (analysis,

More information

Optimization Prof. A. Goswami Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 20 Travelling Salesman Problem

Optimization Prof. A. Goswami Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 20 Travelling Salesman Problem Optimization Prof. A. Goswami Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 20 Travelling Salesman Problem Today we are going to discuss the travelling salesman problem.

More information

LECTURE 1: INTRODUCTION

LECTURE 1: INTRODUCTION LECTURE 1: INTRODUCTION What is a Network? What is a Network? What is the meaning of Network Flows? In our course, a network G=(N,A) consists of a finite number of nodes (in N) which are connected by arcs

More information

Check off these skills when you feel that you have mastered them. Write in your own words the definition of a Hamiltonian circuit.

Check off these skills when you feel that you have mastered them. Write in your own words the definition of a Hamiltonian circuit. Chapter Objectives Check off these skills when you feel that you have mastered them. Write in your own words the definition of a Hamiltonian circuit. Explain the difference between an Euler circuit and

More information

Algorithm Design Strategies V

Algorithm Design Strategies V Algorithm Design Strategies V Joaquim Madeira Version 0.0 October 2016 U. Aveiro, October 2016 1 Overview The 0-1 Knapsack Problem Revisited The Fractional Knapsack Problem Greedy Algorithms Example Coin

More information

1 Heuristics for the Traveling Salesman Problem

1 Heuristics for the Traveling Salesman Problem Praktikum Algorithmen-Entwurf (Teil 9) 09.12.2013 1 1 Heuristics for the Traveling Salesman Problem We consider the following problem. We want to visit all the nodes of a graph as fast as possible, visiting

More information

Chapter 2. Business Efficiency. Chapter Outline. Chapter Summary

Chapter 2. Business Efficiency. Chapter Outline. Chapter Summary Chapter 2 Business Efficiency Chapter Outline Introduction Section 2.1 Hamiltonian Circuits Section 2.2 Traveling Salesman Problem Section 2.3 Helping Traveling Salesmen Section 2.4 Critical-Path 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

(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 )

(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 ) Algorithms Chapter 5: The Tree Searching Strategy - Examples 1 / 11 Chapter 5: The Tree Searching Strategy 1. Ex 5.1Determine the satisfiability of the following Boolean formulas by depth-first search

More information

Greedy Algorithms. Kleinberg and Tardos, Chapter 4

Greedy Algorithms. Kleinberg and Tardos, Chapter 4 Greedy Algorithms Kleinberg and Tardos, Chapter 4 1 Selecting breakpoints Road trip from Fort Collins to Durango on a given route. Fuel capacity = C. Goal: makes as few refueling stops as possible. Greedy

More information

Optimisation and Operations Research

Optimisation and Operations Research Optimisation and Operations Research Lecture 11: Integer Programming Matthew Roughan http://www.maths.adelaide.edu.au/matthew.roughan/ Lecture_notes/OORII/ School of Mathematical

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

Intro to Contemporary Math

Intro to Contemporary Math Intro to Contemporary Math Hamiltonian Circuits and Nearest Neighbor Algorithm Nicholas Nguyen nicholas.nguyen@uky.edu Department of Mathematics UK Agenda Hamiltonian Circuits and the Traveling Salesman

More information

Decision Problems TSP. Instance: A complete graph G with non-negative edge costs, and an integer

Decision Problems TSP. Instance: A complete graph G with non-negative edge costs, and an integer Decision Problems The theory of NP-completeness deals only with decision problems. Why? Because if a decision problem is hard, then the corresponding optimization problem must be hard too. For example,

More information

Single Machine Models

Single Machine Models Outline DM87 SCHEDULING, TIMETABLING AND ROUTING Lecture 8 Single Machine Models 1. Dispatching Rules 2. Single Machine Models Marco Chiarandini DM87 Scheduling, Timetabling and Routing 2 Outline Dispatching

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

Do not turn this page until you have received the signal to start. Please fill out the identification section above. Good Luck!

Do not turn this page until you have received the signal to start. Please fill out the identification section above. Good Luck! CSC 373H5 F 2017 Midterm Duration 1 hour and 50 minutes Last Name: Lecture Section: 1 Student Number: First Name: Instructor: Vincent Maccio Do not turn this page until you have received the signal to

More information

2 Notation and Preliminaries

2 Notation and Preliminaries On Asymmetric TSP: Transformation to Symmetric TSP and Performance Bound Ratnesh Kumar Haomin Li epartment of Electrical Engineering University of Kentucky Lexington, KY 40506-0046 Abstract We show that

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

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

3.4 Relaxations and bounds

3.4 Relaxations and bounds 3.4 Relaxations and bounds Consider a generic Discrete Optimization problem z = min{c(x) : x X} with an optimal solution x X. In general, the algorithms generate not only a decreasing sequence of upper

More information

from notes written mostly by Dr. Matt Stallmann: All Rights Reserved

from notes written mostly by Dr. Matt Stallmann: All Rights Reserved CSC 505, Fall 000: Week 0 Objectives: understand problem complexity and classes defined by it understand relationships among decision, witness, evaluation, and optimization problems understand what it

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

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

History, Analysis, and Implementation of Traveling Salesman Problem (TSP) and Related Problems

History, Analysis, and Implementation of Traveling Salesman Problem (TSP) and Related Problems History, Analysis, and Implementation of Traveling Salesman Problem (TSP) and Related Problems By Anne Maredia Spring 2010 In Partial Fulfillment of Math 4395-Senior Project Department of Computer and

More information

How hard is it to find a good solution?

How hard is it to find a good solution? How hard is it to find a good solution? Simons Institute Open Lecture November 4, 2013 Research Area: Complexity Theory Given a computational problem, find an efficient algorithm that solves it. Goal of

More information

8.3 Hamiltonian Paths and Circuits

8.3 Hamiltonian Paths and Circuits 8.3 Hamiltonian Paths and Circuits 8.3 Hamiltonian Paths and Circuits A Hamiltonian path is a path that contains each vertex exactly once A Hamiltonian circuit is a Hamiltonian path that is also a circuit

More information

ABHELSINKI UNIVERSITY OF TECHNOLOGY

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

More information

Mathematics (JUN10MD0101) General Certificate of Education Advanced Subsidiary Examination June Unit Decision TOTAL

Mathematics (JUN10MD0101) General Certificate of Education Advanced Subsidiary Examination June Unit Decision TOTAL Centre Number Candidate Number For Examiner s Use Surname Other Names Candidate Signature Examiner s Initials Mathematics Unit Decision 1 Wednesday 9 June 2010 General Certificate of Education Advanced

More information

Swarm Intelligence Traveling Salesman Problem and Ant System

Swarm Intelligence Traveling Salesman Problem and Ant System Swarm Intelligence Leslie Pérez áceres leslie.perez.caceres@ulb.ac.be Hayfa Hammami haifa.hammami@ulb.ac.be IRIIA Université Libre de ruxelles (UL) ruxelles, elgium Outline 1.oncept review 2.Travelling

More information

Decision Mathematics Module D1

Decision Mathematics Module D1 GCE Examinations Decision Mathematics Module D1 Advanced Subsidiary / Advanced Level Paper B Time: 1 hour 30 minutes Instructions and Information Candidates may use any calculator except those with a facility

More information

Traveling Salesman Problem (TSP) - Visit every city and then go home.

Traveling Salesman Problem (TSP) - Visit every city and then go home. Traveling Salesman Problem (TSP) - Visit every city and then go home. Seattle Detroit Boston Toledo Cleveland L. A. Columbus New Orleans Atlanta Orlando A Hamiltonian Path is a path that goes through each

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Session 21. April 13, 2009 Instructor: Bert Huang http://www.cs.columbia.edu/~bert/courses/3137 Announcements Homework 5 due next Monday I m out of town Wed to Sun for conference

More information

Algorithms and Complexity theory

Algorithms and Complexity theory Algorithms and Complexity theory Thibaut Barthelemy Some slides kindly provided by Fabien Tricoire University of Vienna WS 2014 Outline 1 Algorithms Overview How to write an algorithm 2 Complexity theory

More information

Connection MATH Connection. Benjamin V.C. Collins, James A. Swenson MATH 2730

Connection MATH Connection. Benjamin V.C. Collins, James A. Swenson MATH 2730 MATH 2730 Benjamin V.C. Collins James A. Swenson Traveling Salesman Problem Image: Padberg-Rinaldi, 1987: 532 cities http://www.tsp.gatech.edu/data/usa/tours.html Walks in a graph Let G = (V, E) be a graph.

More information

Practice Final Solutions. 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) { 2 j = 0 3 if (n = 0) { 4 return j

Practice Final Solutions. 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) { 2 j = 0 3 if (n = 0) { 4 return j Practice Final Solutions 1. Consider the following algorithm. Assume that n 1. line code 1 alg(n) 2 j = 0 3 if (n = 0) 4 return j } 5 else 6 j = 2n+ alg(n 1) 7 return j } } Set up a recurrence relation

More information

The P = NP Problem Bristol Teachers Circle, June P.D.Welch, University of Bristol

The P = NP Problem Bristol Teachers Circle, June P.D.Welch, University of Bristol The P = NP Problem Bristol Teachers Circle, June 26 2013 P.D.Welch, University of Bristol The Königsberg Bridge Problem - Euler = A graph version = As Euler observed: there can be no path crossing each

More information

Unit 7 Day 4 Section 4.5 & Practice Hamiltonian Circuits and Paths

Unit 7 Day 4 Section 4.5 & Practice Hamiltonian Circuits and Paths Unit 7 Day 4 Section 4.5 & Practice 4.1-4.5 Hamiltonian Circuits and Paths Warm Up ~ Day 4 D B Is the following graph E 1) Connected? 2) Complete? F G 3) An Euler Circuit? If so, write the circuit. If

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

MATHEMATICS Unit Decision 1

MATHEMATICS Unit Decision 1 General Certificate of Education January 200 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Wednesday 18 January 200 1.30 pm to 3.00 pm For this paper you must have: an 8-page answer

More information

Decision Mathematics D1

Decision Mathematics D1 Pearson Edexcel International Advanced Level Decision Mathematics D1 Advanced/Advanced Subsidiary Thursday 19 January 2017 Afternoon Time: 1 hour 30 minutes Paper Reference WDM01/01 You must have: D1 Answer

More information

Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 9 June 2015 Morning Time: 1 hour 30 minutes

Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 9 June 2015 Morning Time: 1 hour 30 minutes Paper Reference(s) 6689/01 Edexcel GCE Decision Mathematics D1 Advanced/Advanced Subsidiary Tuesday 9 June 2015 Morning Time: 1 hour 30 minutes Materials required for examination Nil Items included with

More information

Hamiltonian Cycle. Zero Knowledge Proof

Hamiltonian Cycle. Zero Knowledge Proof Hamiltonian Cycle Zero Knowledge Proof Hamiltonian cycle Hamiltonian cycle - A path that visits each vertex exactly once, and ends at the same point it started Example Hamiltonian cycle - A path that visits

More information

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

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

More information

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

P, NP, NP-Complete. Ruth Anderson

P, NP, NP-Complete. Ruth Anderson P, NP, NP-Complete Ruth Anderson A Few Problems: Euler Circuits Hamiltonian Circuits Intractability: P and NP NP-Complete What now? Today s Agenda 2 Try it! Which of these can you draw (trace all edges)

More information

Interventionist Routing Algorithm for single-block warehouse: Application and Complexity

Interventionist Routing Algorithm for single-block warehouse: Application and Complexity Interventionist Routing Algorithm for single-block warehouse: Application and Complexity Wenrong Lu, Duncan McFarlane, Vaggelis Giannikas May 19, 2015 CUED/E-MANUF/TR.35 ISSN: 0951-9338 1 Introduction

More information

Part III: Traveling salesman problems

Part III: Traveling salesman problems Transportation Logistics Part III: Traveling salesman problems c R.F. Hartl, S.N. Parragh 1/282 Motivation Motivation Why do we study the TSP? c R.F. Hartl, S.N. Parragh 2/282 Motivation Motivation Why

More information

Decision Mathematics D1 Advanced/Advanced Subsidiary. Friday 17 May 2013 Morning Time: 1 hour 30 minutes

Decision Mathematics D1 Advanced/Advanced Subsidiary. Friday 17 May 2013 Morning Time: 1 hour 30 minutes Paper Reference(s) 6689/01 Edexcel GCE Decision Mathematics D1 Advanced/Advanced Subsidiary Friday 17 May 2013 Morning Time: 1 hour 30 minutes Materials required for examination Nil Items included with

More information

A Survey on Travelling Salesman Problem

A Survey on Travelling Salesman Problem A Survey on Travelling Salesman Problem Sanchit Goyal Department of Computer Science University of North Dakota Grand Forks, North Dakota 58203 sanchitgoyal01@gmail.com Abstract The Travelling Salesman

More information

Analysis of Uninformed Search Methods

Analysis of Uninformed Search Methods nalysis of Uninformed earch Methods rian. Williams 16.410-13 ep 21 st, 2004 lides adapted from: 6.034 Tomas Lozano Perez, Russell and Norvig IM rian Williams, Fall 04 1 ssignments Remember: Problem et

More information

Question Paper Code :

Question Paper Code : www.vidyarthiplus.com Reg. No. : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2011. Time : Three hours Fourth Semester Computer Science and Engineering CS 2251 DESIGN AND ANALYSIS OF ALGORITHMS (Regulation

More information

Node Edge Arc Routing Problems (NEARP)

Node Edge Arc Routing Problems (NEARP) Node Edge Arc Routing Problems (NEARP) Nicolas Briot Coconut-LIRMM janvier 0 Nicolas Briot (Coconut-LIRMM) Node Edge Arc Routing Problems (NEARP) janvier 0 / What is NEARP? Arc and node routing problem

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

GTOC 7 Team 12 Solution

GTOC 7 Team 12 Solution GTOC 7 Team 12 Solution Telespazio Vega Deutschland GmbH (Germany) Holger Becker, Gianni Casonato, Bernard Godard, Olympia Kyriopoulos, Ganesh Lalgudi, Matteo Renesto Contact: bernard godard

More information

Decision Mathematics D1

Decision Mathematics D1 Pearson Edexcel GCE Decision Mathematics D1 Advanced/Advanced Subsidiary Friday 16 June 2017 Afternoon Time: 1 hour 30 minutes Paper Reference 6689/01 You must have: D1 Answer Book Candidates may use any

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

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

Proof methods and greedy algorithms

Proof methods and greedy algorithms Proof methods and greedy algorithms Magnus Lie Hetland Lecture notes, May 5th 2008 1 Introduction This lecture in some ways covers two separate topics: (1) how to prove algorithms correct, in general,

More information

A path that visits each vertex exactly once is a path

A path that visits each vertex exactly once is a path ( c ) p s t e i n, a r t e r, & o l l i n g e r 2016 h a p t e r 2 : u s i n e s s f f i c i e n c y P a g e 1 HPTR 2: USINSS FFIINY 2.1 Hamiltonian ircuits path that visits each vertex exactly once is

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

July 18, Approximation Algorithms (Travelling Salesman Problem)

July 18, Approximation Algorithms (Travelling Salesman Problem) Approximation Algorithms (Travelling Salesman Problem) July 18, 2014 The travelling-salesman problem Problem: given complete, undirected graph G = (V, E) with non-negative integer cost c(u, v) for each

More information

Euler and Hamilton Paths

Euler and Hamilton Paths Euler an Hamilton Paths The town of Königserg, Prussia (now know as Kaliningra an part of the Russian repuli), was ivie into four setion y ranhes of the Pregel River. These four setions C A D B Figure:

More information

Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology. Practice Final Exam. Problem Title Points Parts Grade Initials

Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology. Practice Final Exam. Problem Title Points Parts Grade Initials Design and Analysis of Algorithms May 12, 2011 Massachusetts Institute of Technology 6.046J/18.410J Profs. Dana Moshkovitz and Bruce Tidor Practice Final Exam Practice Final Exam Do not open this quiz

More information

AS Further Mathematics

AS Further Mathematics AS Further Mathematics Discrete Mark scheme Specimen Version 1.1 Mark schemes are prepared by the Lead Assessment Writer and considered, together with the relevant questions, by a panel of subject teachers.

More information

Mathematical Thinking Exam 2 20 November 2017

Mathematical Thinking Exam 2 20 November 2017 Mathematical Thinking Exam 2 20 November 2017 Name: Instructions: Be sure to read each problem s directions. Write clearly during the exam and fully erase or mark out anything you do not want graded. You

More information

Tractable & Intractable Problems

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

More information

Informatique Fondamentale IMA S8

Informatique Fondamentale IMA S8 Informatique Fondamentale IMA S8 Cours 4 : graphs, problems and algorithms on graphs, (notions of) NP completeness Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytech-lille.fr Université

More information

AM 121: Intro to Optimization Models and Methods Fall 2018

AM 121: Intro to Optimization Models and Methods Fall 2018 AM 121: Intro to Optimization Models and Methods Fall 2018 Lecture 11: Integer programming Yiling Chen SEAS Lesson Plan Integer programs Examples: Packing, Covering, TSP problems Modeling approaches fixed

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

MATH 22 HAMILTONIAN GRAPHS. Lecture V: 11/18/2003

MATH 22 HAMILTONIAN GRAPHS. Lecture V: 11/18/2003 MATH 22 Lecture V: 11/18/2003 HAMILTONIAN GRAPHS All communities [graphs] divide themselves into the few and the many [i.e., are bipartite]. Alexander Hamilton, Debates of the Federal Convention Before

More information

Problem Set 3 Due: Wednesday, October 22nd, 2014

Problem Set 3 Due: Wednesday, October 22nd, 2014 6.89: Algorithmic Lower Bounds Fall 24 Prof. Erik Demaine TAs: Sarah Eisenstat, Jayson Lynch Problem Set 3 Due: Wednesday, October 22nd, 24 Problem. A Tour of Hamiltonicity Variants For each of the following

More information

Part III: Traveling salesman problems

Part III: Traveling salesman problems Transportation Logistics Part III: Traveling salesman problems c R.F. Hartl, S.N. Parragh 1/74 Motivation Motivation Why do we study the TSP? it easy to formulate it is a difficult problem many significant

More information

September 14, 1999 Name The first 16 problems count 5 points each and the final 3 count 15 points each.

September 14, 1999 Name The first 16 problems count 5 points each and the final 3 count 15 points each. September 14, 1999 Name The first 16 problems count 5 points each and the final 3 count 15 points each. 1. Fill in the three character code you received via email in the box Multiple choice section. Circle

More information

Theoretical computer science: Turing machines

Theoretical computer science: Turing machines Theoretical computer science: Turing machines Matthias Springer Hasso-Plattner-Institut January 5, 2011 Overview 1. Turing machines 2. Universal Turing machines 3. Church-Turing thesis 4. Sorting: Insertion

More information

Maximum Flow Problem (Ford and Fulkerson, 1956)

Maximum Flow Problem (Ford and Fulkerson, 1956) Maximum Flow Problem (Ford and Fulkerson, 196) In this problem we find the maximum flow possible in a directed connected network with arc capacities. There is unlimited quantity available in the given

More information

A path that visits each vertex exactly once is a Hamiltonian path. A circuit that visits each vertex exactly once is a Hamiltonian circuit.

A path that visits each vertex exactly once is a Hamiltonian path. A circuit that visits each vertex exactly once is a Hamiltonian circuit. (c) Epstein 2013 Chapter 2: usiness Efficiency Page 1 CHAPTER 2: USINESS EFFICIENCY 2.1 Hamiltonian Circuits A path that visits each vertex exactly once is a Hamiltonian path. A circuit that visits each

More information

Optimization (2MMD10/2DME20), lecture 1b. Gerhard Woeginger. Technische Universiteit Eindhoven

Optimization (2MMD10/2DME20), lecture 1b. Gerhard Woeginger. Technische Universiteit Eindhoven Optimization (2MMD10/2DME20), lecture 1b Gerhard Woeginger Technische Universiteit Eindhoven Fall 2015, Q1 GJ Woeginger Optimization (2MMD10/2DME20), lecture 1b 1/26 Our program for week 1 Tuesday: lots

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Polynomial-Time Reduction Desiderata'. Suppose we could solve X in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Reduction.

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Chapter 10 NP Completeness and Approximation Algorithms Let C() be a class of problems defined by some property. We are interested in characterizing the hardest problems in the class, so that if we can

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

Finding optimal configurations ( combinatorial optimization)

Finding optimal configurations ( combinatorial optimization) CS 1571 Introduction to AI Lecture 10 Finding optimal configurations ( combinatorial optimization) Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Constraint satisfaction problem (CSP) Constraint

More information

Lecture 6 January 21, 2013

Lecture 6 January 21, 2013 UBC CPSC 536N: Sparse Approximations Winter 03 Prof. Nick Harvey Lecture 6 January, 03 Scribe: Zachary Drudi In the previous lecture, we discussed max flow problems. Today, we consider the Travelling Salesman

More information

Pearson Edexcel GCE Decision Mathematics D2. Advanced/Advanced Subsidiary

Pearson Edexcel GCE Decision Mathematics D2. Advanced/Advanced Subsidiary Pearson Edexcel GCE Decision Mathematics D2 Advanced/Advanced Subsidiary Friday 23 June 2017 Morning Time: 1 hour 30 minutes Paper Reference 6690/01 You must have: D2 Answer Book Candidates may use any

More information

Decision Mathematics D1

Decision Mathematics D1 Pearson Edexcel International Advanced Level Decision Mathematics D1 Advanced/Advanced Subsidiary Monday 1 February 2016 Afternoon Time: 1 hour 30 minutes Paper Reference WDM01/01 You must have: D1 Answer

More information

Algorithms: COMP3121/3821/9101/9801

Algorithms: COMP3121/3821/9101/9801 NEW SOUTH WALES Algorithms: COMP3121/3821/9101/9801 Aleks Ignjatović School of Computer Science and Engineering University of New South Wales LECTURE 9: INTRACTABILITY COMP3121/3821/9101/9801 1 / 29 Feasibility

More information

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

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

More information

LATITUDES AND LONGITUDES

LATITUDES AND LONGITUDES NAME SCHOOL INDEX NUMBER DATE LATITUDES AND LONGITUDES KCSE 1989 2012 Form 4 Mathematics Answer all the questions 1. 1989 Q18 P1 A globe representing the earth has a radius 0.5m. Points A(10 0 W), B (0

More information

P vs. NP. Data Structures and Algorithms CSE AU 1

P vs. NP. Data Structures and Algorithms CSE AU 1 P vs. NP Data Structures and Algorithms CSE 373-18AU 1 Goals for today Define P, NP, and NP-complete Explain the P vs. NP problem -why it s the biggest open problem in CS. -And what to do when a problem

More information

The algorithm of adaptive random search for discrete-continuous optimization 1

The algorithm of adaptive random search for discrete-continuous optimization 1 Abstract The algorithm of adaptive random search for discrete-continuous optimization 1 A. Sh. Abakarov, 2 Yu. A. Sushkov 3 St. Petersburg State University Some optimization approach for solving the mixed

More information

PhysicsAndMathsTutor.com

PhysicsAndMathsTutor.com 1. The figure above shows a network of roads. The number on each arc represents the length of that road in km. (a) Use Dijkstra s algorithm to find the shortest route from A to J. State your shortest route

More information

Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2

Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2 Design and Analysis of Algorithms April 16, 2015 Massachusetts Institute of Technology 6.046J/18.410J Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Quiz 2 Quiz 2 Do not open this quiz booklet until

More information

Contents Lecture 4. Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression

Contents Lecture 4. Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression Contents Lecture 4 Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression Jonas Skeppstedt (jonasskeppstedt.net) Lecture 4 2018

More information

Trees/Intro to counting

Trees/Intro to counting Trees/Intro to counting Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck http://cseweb.ucsd.edu/classes/sp16/cse21-bd/ April 29, 2016 Equivalence between rooted and unrooted trees Goal

More information

Vehicle Routing and Scheduling. Martin Savelsbergh The Logistics Institute Georgia Institute of Technology

Vehicle Routing and Scheduling. Martin Savelsbergh The Logistics Institute Georgia Institute of Technology Vehicle Routing and Scheduling Martin Savelsbergh The Logistics Institute Georgia Institute of Technology Vehicle Routing and Scheduling Part II: Algorithmic Enhancements Handling Practical Complexities

More information