ICS 353: Design and Analysis of Algorithms

Slides:



Advertisements
Similar presentations
1 Chapter 8 Approximation Algorithms (Part II). 2 Outline Scheduling Independent tasks Bin packing.
Advertisements

Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Approximation Algorithms
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Great Theoretical Ideas in Computer Science for Some.
Greedy Algorithms Spanning Trees Chapter 16, 23. What makes a greedy algorithm? Feasible –Has to satisfy the problem’s constraints Locally Optimal –The.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
NP-Complete Problems Polynomial time vs exponential time
Combinatorial Algorithms
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
The Theory of NP-Completeness
NP-Complete Problems (Fun part)
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Approximation Algorithms
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Traveling Salesperson Problem Algorithms and Networks.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
© 2010 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property. Case Studies: Bin Packing.
Chapter 15 Approximation Algorithm Introduction Basic Definition Difference Bounds Relative Performance Bounds Polynomial approximation Schemes Fully Polynomial.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Approximation Algorithms
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
ICS 353: Design and Analysis of Algorithms Backtracking King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Steiner Tree Problem Given: A set S of points in the plane = terminals
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Limitation of Computation Power – P, NP, and NP-complete
Greedy Technique.
Richard Anderson Lecture 26 NP-Completeness
Chart Packing Heuristic
Richard Anderson Lecture 26 NP-Completeness
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Great Theoretical Ideas in Computer Science
Heuristics Definition – a heuristic is an inexact algorithm that is based on intuitive and plausible arguments which are “likely” to lead to reasonable.
Approximation Algorithms for TSP
Discrete Mathematics for Computer Science
ICS 353: Design and Analysis of Algorithms
ICS 353: Design and Analysis of Algorithms
Graphs Chapter 13.
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
ICS 353: Design and Analysis of Algorithms
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
Chapter 12 Coping with the Limitations of Algorithm Power
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
ICS 353: Design and Analysis of Algorithms
Bin Packing Michael T. Goodrich Some slides adapted from slides from
Approximation Algorithm
Lecture 24 Vertex Cover and Hamiltonian Cycle
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

ICS 353: Design and Analysis of Algorithms King Fahd University of Petroleum & Minerals Information & Computer Science Department ICS 353: Design and Analysis of Algorithms Approximation Algorithms

Reading Assignment M. Alsuwaiyel, Introduction to Algorithms: Design Techniques and Analysis, World Scientific Publishing Co., Inc. 1999. Chapter 15, Sections 1, 2, 4.1- 4.2

Introduction Approximation algorithms attempt to find solutions that are “close enough” to the optimal solution, in polynomial time. Most approximation algorithms are based on greedy heuristics Will only see few examples

Terminology and Definitions A combinatorial optimization problem  is a minimization problem or a maximization problem consisting of three components: A set D of instances I  D,  a finite set S(I) of candidate solutions for I.   S(I)  a value f() called the solution value for  If  is a minimization problem, I  D, then an optimal solution *  S(I) satisfies……..

Terminology and Definitions (Cont.) An approximation algorithm A for an optimization problem  is a (polynomial time) algorithm such that given an instance I  D, it outputs some solution   S(I) Notation f ()  A(I) f (*)  OPT(I)

Example: Bin Packing Problem Problem Statement: Given a collection of items {u1, u2, …, un} with sizes {s1, s2, …, sn} where i, 1  i  n, 0 < si  1, these items must be packed into the minimum number of bins of unit capacity. D : S : f () : Possible Approximation Algorithm:

Relative Performance Bounds Let  be a minimization problem and I an instance of . Let A be an approximation algorithm to solve . The approximation ratio RA(I) is defined by If  is a maximization problem, …

Absolute and Asymptotic Performance Ratios The absolute performance ratio RA for the approximation algorithm A is defined by The asymptotic performance ratio RA for the approximation algorithm A is defined by

The Bin-Packing Problem Four Heuristics First Fit Best Fit First Fit Decreasing Best Fit Decreasing

The Bin-Packing Problem Example: Consider the following items u1, u2, u3, u4, u5, u6, u7 with sizes .2, .5, .4, .7, .1, .3, .8 What is the optimal packing strategy? .8 .2 .3 .7 .5 .4 .1

The Bin-Packing Problem First Fit (FF): Bins are indexed 1, 2, …, all initially empty Items are packed in the order u1, u2, …, un Packing Strategy: To pack item ui, find the least index j such that bin j contains at most 1 – si, and add item ui to the items packed in bin j.

The Bin-Packing Problem Best Fit (BF): Bins are indexed 1, 2, …, all initially empty Items are packed in the order u1, u2, …, un Packing Strategy: To pack item ui, find the index j such that bin j is filled to level l  1 – si, and l is as large as possible

The Bin-Packing Problem First Fit Decreasing (FFD): Bins are indexed 1, 2, …, all initially empty Items are first ordered by decreasing order of size ui1, ui2, …, uin Packing Strategy: same as FF method.

The Bin-Packing Problem Best Fit Decreasing (BFD): Bins are indexed 1, 2, …, all initially empty Items are first ordered by decreasing order of size ui1, ui2, …, uin Packing Strategy: same as BF method.

The Bin-Packing Problem (Cont.) Theorem: RFF < 2 Theorem: For all instances I of the bin packing problem, BF(I)  (17/10)OPT(I) Theorem: For all instances I of the bin packing problem, FFD(I)  (11/9)OPT(I) + 4

Euclidean Traveling Salesman Problem Problem Statement: Given a set S of n points in the plane, find a tour  on these points of shortest length. NP-Hard Problem Greedy Approach (Nearest Neighbor NN Heuristic): Let p1 be an arbitrary starting point Find p2 closest to p1 and visit it. Repeat step 2 until all vertices are visited. RNN =  RNN(I) = NN(I) / OPT(I) = O(log n)

Euclidean Traveling Salesman Problem Better Solution (MST Heuristic) Construct A minimum cost spanning tree T. Construct a multigraph T’ from T by making two copies of each edge in T. Find an Eulerian tour e An Eulerian tour is a cycle that visits every edge exactly once. Convert e into the desired Hamiltonian tour  by tracing e and deleting those vertices that have already been visited.

MST Heuristic Example: Theorem: RMST < 2