School of Computing Clemson University Fall, 2012

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Great Theoretical Ideas in Computer Science for Some.
Approximation Algorithms for TSP
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
9.2 The Traveling Salesman Problem. Let us return to the question of finding a cheapest possible cycle through all the given towns: We have n towns (points)
Combinatorial Algorithms
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Approximation Algorithms: Concepts Approximation algorithm: An algorithm that returns near-optimal solutions (i.e. is "provably good“) is called an approximation.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
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.
Great Theoretical Ideas in Computer Science.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Approximation Algorithms for the Traveling Salesperson Problem.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Management Science 461 Lecture 9 – Arc Routing November 18, 2008.
Programming & Data Structures
NP-Complete Problems CSC 331: Algorithm Analysis NP-Complete Problems.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
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.
The Traveling Salesperson Problem Algorithms and Networks.
The Traveling Salesman Problem Approximation
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
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
Great Theoretical Ideas in Computer Science.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Projects Network Theory VLSI PSM 1. Network 1. Steiner trees
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
Approximation Algorithms Guo QI, Chen Zhenghai, Wang Guanhua, Shen Shiqi, Himeshi De Silva.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Approximation Algorithms
More NP-Complete and NP-hard Problems
Steiner trees: Approximation Algorithms
Optimization problems such as
Lecture 2-2 NP Class.
Routing Through Networks - 1
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Graph theory Definitions Trees, cycles, directed graphs.
Week 11 - Monday CS221.
EECS 203 Lecture 20 More Graphs.
Great Theoretical Ideas in Computer Science
CS4234 Optimiz(s)ation Algorithms
Autumn 2016 Lecture 11 Minimum Spanning Trees (Part II)
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
Euler Circuits and Paths
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
Genome Assembly.
Heuristic Algorithms via VBA
Minimum Spanning Trees
Euler Circuits and Paths
Heuristic Algorithms via VBA
Heuristic Algorithms via VBA
Approximation Algorithms
Graph Theory Proof In Class Exercise.
Minimum Spanning Trees
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

School of Computing Clemson University Fall, 2012 Lecture 15. Approximation Algorithms CpSc 212: Algorithms and Data Structures Brian C. Dean School of Computing Clemson University Fall, 2012

College Life: Pick Any Two of the Following… Good grades Sleep Social Life

Hard Problems: Pick Any Two of the Following… An optimal solution To every possible input In polynomial time

Hard Problems: Pick Any Two of the Following… An optimal solution To every possible input In polynomial time This gives us several possible approaches: (1+2). Study heuristics that tend to give us fast algorithms that work well “in practice” but don’t have any theoretical performance guarantees. (1+3). Study special cases that can be solved in polytime. (2+3). Devise approximation algorithms that run fast, but might produce suboptimal solutions (hopefully within some provably close distance of an optimal solutions).

Special Cases Special cases of many NP-hard or worse problems can be solved in polynomial time. Example: Bitonic TSP (a.k.a. “Touring Canada”) We often want to find the minimal instances of a problem that are NP-hard and the maximal special cases that can be solved in polytime. Example: the rank aggregation problem can be solved in polytime for k = 2, and it’s NP-hard for k ≥ 4.

Approximation Algorithms An α-approximation algorithm is an algorithm (typically that runs in polytime) whose solution never differs from an optimal solution by more than a factor of α. The factor α is called the performance guarantee of the algorithm. The smaller, the better. The difficulty with approximation algorithms, of course, is proving that your solution is not far away from an optimal solution you don’t know!

The Minimum Spanning Tree Problem Goal: Find a min-cost subnetwork that connects together all nodes. Very well-studied problem; can be solved very efficiently. And the cost of an MST is a lower bound on an optimal TSP tour! 7 19 8 10 9 12 15 11 2 14 4 16 3

A 2-Approximation Algorithm for “Metric” TSP Suppose we have a graph whose edge costs satisfy the triangle inequality (a fairly common occurrence): c(i, j) + c(j, k) ≥ c(i, k) for all (i, j, k). (note that this implies that all edges are present in the graph) Let T* be an optimal TSP tour. Recall that cost(MST) ≤ cost(T*). We’ll show how to construct a tour T of cost at most 2cost(MST) ≤ 2cost(T*)…

Walking Around a Tree and Introducing Shortcut Edges Start by walking “around” the tree. New cost: 2cost(MST) ≤ 2cost(T*). Now add “shortcut” edges to convert into a proper tour; note this doesn’t increase cost, due to the triangle inequality!

Tracing Can you trace the following figure without lifting your pen from the paper? (no silly tricks like folding the paper over, etc…!)

The Bridges of Königsberg Perhaps the earliest occurrence of this type of problem dates back to early 18th century... Residents of Königsberg (a city in East Prussia with 4 distinct “regions” separated by rivers) supposedly wanted to know if there was a way to walk around so that each bridge is crossed exactly once…

Eulerian Tours Leonard Euler gave an elegant proof that no path exists! He started by modeling the city abstractly as a graph: Now we want to find a path through the graph that follows every edge exactly once. Such a path is now called an Euler (or Eulerian) path.

It’s All About Parity! 3 We can find an Euler path only if at most two nodes have odd degree. Note that it’s impossible for only one node to have odd degree… why? If all nodes have even degree, then we can find an Eulerian cycle (an Eulerian path that ends where it started). Easy construction: start at any node, and walk around arbitrarily (erasing the edges we take) until we get back to where we started. This traces out a cycle. Repeat until all edges are gone, then “splice” together all the cycles we found. If we start with two nodes having odd degree, temporarily join them with an edge e, find an Eulerian cycle, and then remove e to get an Eulerian path. 5 3 3

Eulerian Cycles : Further Notes We can also easily find an Eulerian cycle on a directed graph, as long as each node has equal indegree and outdegree. By contrast, a Hamiltonian cycle (visiting every node exactly once, rather than every edge) is NP-hard to find! As a consequence, it is NP-hard to approximate the non-metric TSP to within any factor!

A 3/2-Approximation Algorithm for Metric TSP Start with a MST Super-impose a min-cost matching on its odd-degree nodes. Resulting graph now has all even degrees, so we can find an Eulerian tour and shortcut it down to a valid TSP tour. Analysis: Cost(MST) ≤ Cost(T*) Cost(Matching) ≤ ½ Cost(T*) Shortcutting doesn’t increase cost.