# How does Christofides algorithm work?

## How does Christofides algorithm work?

Christofides algorithm is an approximative algorithm for finding solution for travelling salesman problem. Beware, this algorithm works only on instances, where the distances form a metric space. Therefore, it works only if the instance obeys the trinagle inequality and the distance matrix are symmetric.

## What is 2 approximation algorithm?

The approximation ratio (or approximation factor) of an algorithm is the ratio between the result obtained by the algorithm and the optimal cost or profit. An algorithm with approximation ratio k is called a k-approximation algorithm; both algorithms above would be called 2-approximation algorithms.

What is metric TSP?

Metric TSP is a subcase of TSP where the Triangle Inequality holds. (This is always true when the weights on the edges are actual distances. Both TSP and Metric TSP are NP-hard problems, that is, there is no known polynomial-time algorithm for solving these problems, unless P=NP.

Which algorithm is best for TSP?

The Greedy Heuristic is again the winner of the shortest path, with a length of 72801 km. The nearest neighbor solution route is longer by 11,137 km but has less computation time. On the other hand, the Genetic algorithm has no guarantee of finding the optimal solution and hence its route is the longest (282866).

### Why do you need approximation algorithms?

Approximation algorithms are typically used when finding an optimal solution is intractable, but can also be used in some situations where a near-optimal solution can be found quickly and an exact solution is not needed. Many problems that are NP-hard are also non-approximable assuming P≠NP.

### Why do we need approximation algorithm?

Introduction: An Approximate Algorithm is a way of approach NP-COMPLETENESS for the optimization problem. This technique does not guarantee the best solution. The goal of an approximation algorithm is to come as close as possible to the optimum value in a reasonable amount of time which is at the most polynomial time.

How can I solve my TSP problem?

To solve the TSP using the Brute-Force approach, you must calculate the total number of routes and then draw and list all the possible routes. Calculate the distance of each route and then choose the shortest one—this is the optimal solution. This method breaks a problem to be solved into several sub-problems.

What is the time complexity of Kruskal’s algorithm?

Time Complexity: In Kruskal’s algorithm, most time consuming operation is sorting because the total complexity of the Disjoint-Set operations will be O ( E l o g V ) , which is the overall Time Complexity of the algorithm.

#### Why is Travelling salesman problem so hard?

It is a well-known algorithmic problem in the fields of computer science and operations research. This means that TSP is classified as NP-hard because it has no “quick” solution and the complexity of calculating the best route will increase when you add more destinations to the problem.

#### Is Travelling salesman problem NP-complete?

Traveling Salesman Optimization(TSP-OPT) is a NP-hard problem and Traveling Salesman Search(TSP) is NP-complete. However, TSP-OPT can be reduced to TSP since if TSP can be solved in polynomial time, then so can TSP-OPT(1).