Solution methods for Discrete Optimization Problems.

Slides:



Advertisements
Similar presentations
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
Advertisements

Approximation Algorithms for TSP
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
1 Chapter 15.3 Hamilton Paths and Hamilton Circuits Objectives 1.Understand the definitions of Hamilton paths & Hamilton circuits. 2.Find the number of.
Lecture 8 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Fall 2006CENG 7071 Algorithm Analysis. Fall 2006CENG 7072 Algorithmic Performance There are two aspects of algorithmic performance: Time Instructions.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Introduction to Analysis of Algorithms
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
Complexity Analysis (Part I)
Math443/543 Mathematical Modeling and Optimization
CS107 Introduction to Computer Science
Complexity Analysis (Part I)
CSE 830: Design and Theory of Algorithms
CSE 830: Design and Theory of Algorithms Dr. Eric Torng.
Lecture 7 CSE 331 Sep 16, Feedback forms VOLUNTARY Last 5 mins of the lecture.
Minimum Spanning Network: Brute Force Solution
Asymptotic Analysis Motivation Definitions Common complexity functions
1 Efficiency of Algorithms. 2  Two main issues related to the efficiency of algorithms:  Speed of algorithm  Efficient memory allocation  We will.
TTIT33 Algorithms and Optimization – Lecture 1 Jan Maluszynski - HT Analysis of Algorithms Introductory Example Principles of Analysis Big-Oh notation.
Data Structure Algorithm Analysis TA: Abbas Sarraf
Network Optimization Problems: Models and Algorithms
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Algorithm Analysis and Big Oh Notation Courtesy of Prof. Ajay Gupta (with updates by Dr. Leszek T. Lilien) CS 1120 – Fall 2006 Department of Computer Science.
Lecture 2: Algorithm Complexity. Recursion A subroutine which calls itself, with different parameters. Need to evaluate factorial(n) factorial(n) = n.
Analysis of Algorithms COMP171 Fall Analysis of Algorithms / Slide 2 Introduction * What is Algorithm? n a clearly specified set of simple instructions.
Ch. 11: Optimization and Search Stephen Marsland, Machine Learning: An Algorithmic Perspective. CRC 2009 some slides from Stephen Marsland, some images.
CS-2852 Data Structures LECTURE 3A Andrew J. Wozniewicz Image copyright © 2010 andyjphoto.com.
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
Programming & Data Structures
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Applications of discrete mathematics: Formal Languages (computer languages) Compiler Design Data Structures Computability Automata Theory Algorithm Design.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
The Growth of Functions Rosen 2.2 Basic Rules of Logarithms log z (xy) log z (x/y) log z (x y ) If x = y If x < y log z (-|x|) is undefined = log z (x)
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Analysis of Algorithms
Chapter 3 Sec 3.3 With Question/Answer Animations 1.
Combinatorial Optimization Chapter 1. Problems and Algorithms  1.1 Two Problems (representative problems)  The Traveling Salesman Problem 47 drilling.
© 2011 Pearson Addison-Wesley. All rights reserved 10 A-1 Chapter 10 Algorithm Efficiency and Sorting.
Chapter 10 A Algorithm Efficiency. © 2004 Pearson Addison-Wesley. All rights reserved 10 A-2 Determining the Efficiency of Algorithms Analysis of algorithms.
Télécom 2A – Algo Complexity (1) Time Complexity and the divide and conquer strategy Or : how to measure algorithm run-time And : design efficient algorithms.
CSS342: Algorithm Analysis1 Professor: Munehiro Fukuda.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
Introduction to Analysis of Algorithms COMP171 Fall 2005.
Program Efficiency & Complexity Analysis. Algorithm Review An algorithm is a definite procedure for solving a problem in finite number of steps Algorithm.
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall.
Algorithmic Analysis Charl du Plessis and Robert Ketteringham.
Chapter 9 Efficiency of Algorithms. 9.3 Efficiency of Algorithms.
Algorithm Analysis Part of slides are borrowed from UST.
Computer Science Background for Biologists CSC 487/687 Computing for Bioinformatics Fall 2005.
Computer Science/Ch. Algorithmic Foundation of CS 4-1 Chapter 4 Chapter 4 Algorithmic Foundation of Computer Science.
DS.A.1 Algorithm Analysis Chapter 2 Overview Definitions of Big-Oh and Other Notations Common Functions and Growth Rates Simple Model of Computation Worst.
Optimization/Decision Problems Optimization Problems – An optimization problem is one which asks, “What is the optimal solution to problem X?” – Examples:
Copyright © 2014 Curt Hill Algorithm Analysis How Do We Determine the Complexity of Algorithms.
Algorithm Complexity By: Ashish Patel and Alex Golebiewski.
1 Algorithms Searching and Sorting Algorithm Efficiency.
Mathematical modeling To describe or represent a real-world situation quantitatively, in mathematical language.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
EMIS 8373: Integer Programming Combinatorial Optimization Problems updated 27 January 2005.
Data Structures Lab Algorithm Animation.
Analysis of Algorithms
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
Time Complexity Lecture 15 Mon, Feb 27, 2006.
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

Solution methods for Discrete Optimization Problems

Computational complexity of discrete optimization problems In terms of complexity of solution methods, discrete optimization problems can be divided into two classes: 1) Problems that have efficient algorithms for finding optimal solutions. 2) Problems that don’t have such efficient algorithms. The first class problems (Minimum Spanning Tree Problem, Maximum Flow Problem, etc.) will be considered in the second half of this class. Most discrete optimization problems are in the second class.

Efficiency of Algorithms  Two main issues related to the efficiency of algorithms:  Speed of algorithm  Efficient memory allocation  We will focus on the speed of algorithms. The speed of an algorithm (running time) is determined by the number of elementary operations: addition, subtraction, multiplication, division, comparison. The number of elementary operations depends on  problem size  nature of input data

Analysis of Running Time  Running time of an algorithm is a function of input size.  Two kind of analyses of running time:  Worst-case running time analysis  Average-case running time analysis Most results in the analysis of algorithms concern the worst-case running time.

Efficiency of Algorithms: Example Traveling Salesman Problem (TSP)  Recall the Traveling Salesman Problem (TSP) : There are n cities. The salesman  starts his tour from City 1,  visits each of the cities exactly once,  and returns to City 1. For each pair of cities i, j there is a cost c ij associated with traveling from City i to City j. Goal: Find a minimum-cost tour.

“Exhaustive enumeration” algorithm  One way of solving the problem is by an algorithm which is based on exhaustive enumeration (brute force): 1) Compute the costs of all possible tours; 2) Choose the tour with minimum cost.  What is the running time of this algorithm? 1)  The number of possible tours is (n-1)!  The cost of each tour is the sum of n individual costs  requires n-1 additions.  Thus, computing the costs of all possible tours requires (n-1)∙(n-1)! elementary operations. 2) Choosing the tour with minimum cost requires (n-1)!-1 comparisons. Summarizing, (n-1)∙(n-1)! + (n-1)! -1 = n! -1 elementary operations are needed for implementing the algorithm.

Efficiency of the “Exhaustive enumeration” algorithm Is the “exhaustive enumeration” algorithm efficient? Assume that each elementary operation can be done in 1 nanosecond = seconds. Then the running time: n=10n=20n= sec77 years 8.4  centuries

“Nearest neighbor” algorithm  Consider another method for solving the TSP, the “Nearest neighbor” algorithm: In every iteration (except the last one) go to the closest city not visited yet.  What is the running time of this algorithm?  In each iteration we choose one of the n cities; so there are n iterations.  In each iteration, we need at most n comparisons to choose the next city. Thus, the total number of elementary operations is at most n 2.

Efficiency of the “Nearest Neighbor” algorithm Compare the running times of “Nearest neighbor” and “Exhaustive enumeration” algorithms: Note: The “Nearest Neighbor” algorithm might not return an optimal solution. n=10n=30n=100n=1000 n2n sec sec sec sec. n!0.004 sec 8.4  cent.

Order of an Algorithm  Definition: Let A be an algorithm. Let w(n) be the maximum number of elementary operations required to execute A for all possible input sets of size n. If w(n) is O(f(n)), we say that A has a (worst case) order of f(n).  Ex.: Suppose the maximum number of operations needed to execute algorithm A is 5n 2 +3n+7. Then A has an order of n 2.

Time comparisons of the most common algorithm orders f(n)n=10n=1000n=10 5 n=10 7 log 2 n 3.3  sec sec. 1.7  sec.2.3  sec. n sec sec sec.0.01 sec. n∙ log 2 n 3.3  sec sec sec.0.23 sec. n2n sec sec.10 sec.27.8 min. n3n sec.1 sec.11.6 min.317 cent. 2n2n sec. 3.4  years 3.2  years 3.1  years

Polynomial-time algorithms and NP-hard problems  Definition: An algorithm is called polynomial-time if it has an order of f(n)=n k for some constant k.  Polynomial-time algorithms are considered efficient. (In practice, k>3 is not so good; but most known polynomial- time algorithms are for smaller k’s).  For Class 1 discrete optimization problems, there are polynomial-time algorithms for solving the problems optimally.  For Class 2 discrete optimization problems No polynomial-time algorithm is known; And more likely there is no one.  Class 2 problems are known as NP-hard problems.  How to solve NP-hard problems? (Next handout)