Lecture 35 Aproximation Algorithms
Lecture 35 Aproximation Algorithms
Branch - CSE
Design & Analysis of Algorithms
Lecture – 35
Approximation Algorithms
By
VC = {b, c, d, e, f, g}
Travelling Salesman: Approximation Algorithm
Travelling Salesman: In the traveling salesman Problem, a salesman must visits n
cities.
We can say that salesman wishes to make a tour or Hamiltonian cycle, visiting each
city exactly once and finishing at the city he starts from.
There is a non-negative cost c (i, j) to travel from the city i to city j.
The goal is to find a tour of minimum cost.
We assume that every two cities are connected.
Such problems are called Traveling-salesman problem (TSP).
We can model the cities as a complete graph of n vertices, where each vertex
represents a city.
It can be shown that TSP is NPC.
If we assume the cost function c satisfies the triangle inequality,
then we can use the following approximate algorithm.
Travelling Salesman: Approximation Algorithm
Triangle inequality:
If we assume the cost function c satisfies the triangle inequality,
then we can use the following approximate algorithm.
Let u, v, w be any three vertices, we have
4. Return the Hamiltonian cycle H that visits the vertices in the order L;
Travelling Salesman: Approximation Algorithm
Travelling Salesman: Approximation Algorithm
Intuitively, Approx TSP first makes a full walk of MST T, which visits each edge exactly two
times. To create a Hamiltonian cycle from the full walk, it bypasses some vertices (which
corresponds to making a shortcut)
THANK YOU