Homework Topic 5.pdf

Embed Size (px)

Citation preview

  • 8/14/2019 Homework Topic 5.pdf

    1/7

  • 8/14/2019 Homework Topic 5.pdf

    2/7

    Research:

    1.1 Traveling Salesman Problem:

    The travelling salesman problem (TSP) or travelling salesperson problem asks the following question:

    Given a list of cities and the distances between each pair of cities, what is the shortest possible routethat visits each city exactly once and returns to the origin city? It is an NP-hardp roblem in combinatorialoptimization, important in operations research and theoretical computer science.

    The problem was first formulated in 1930 and is one of the most intensively studied problems inoptimization. It is used as a benchmark for many optimization methods. Even though the problem iscomputationally difficult, a large number of heuristics and exact methods are known, so that someinstances with tens of thousands of cities can be solved.

    The TSP has several applications even in its purest formulation, such as planning, logistics, and themanufacture of microchips. Slightly modified, it appears as a sub-problem in many areas, such as DNAsequencing. In these applications, the concept city represents, for example, customers, soldering points,or DNA fragments, and the concept distance represents travelling times or cost, or a similarity measurebetween DNA fragments. In many applications, additional constraints such as limited resources or timewindows make the problem considerably harder. TSP is a special case of the travelling purchaserproblem.

    In the theory of computational complexity, the decision version of the TSP (where, given a length L,the task is to decide whether the graph has any tour shorter than L) belongs to the class of NP-complete problems. Thus, it is likely that the worst-case running time for any algorithm for the TSPincreases superpolynomially (or perhaps exponentially) with the number of cities.

    1.2 Euclidean TSP:

    The Euclidean TSP, or planar TSP, is the TSP with the distance being the ordinary Euclidean distance.

    The Euclidean TSP is a particular case of the metric TSP, since distances in a plane obey the triangleinequality.

    Like the general TSP, the Euclidean TSP is NP-hard. With discretized metric (distances rounded up toan integer), the problem is NP-complete. However, in some respects it seems to be easier than thegeneral metric TSP. For example, the minimum spanning tree of the graph associated with an instance ofthe Euclidean TSP is a Euclidean minimum spanning tree, and so can be computed in expected O(n log n)

    time for n points (considerably less than the number of edges). This enables the simple 2-approximationalgorithm for TSP with triangle inequality above to operate more quickly.

    In general, for any c > 0, where d is the number of dimensions in the Euclidean space, there is apolynomial-time algorithm that finds a tour of length at most (1 + 1/c) times the optimal for geometric

    instances of TSP in time; this is called a polynomial-time approximationscheme (PTAS). Sanjeev Arora and Joseph S. B. Mitchell were awarded the Gdel Prize in 2010 for theirconcurrent discovery of a PTAS for the Euclidean TSP.

    http://en.wikipedia.org/wiki/NP-hardhttp://en.wikipedia.org/wiki/Combinatorial_optimizationhttp://en.wikipedia.org/wiki/Combinatorial_optimizationhttp://en.wikipedia.org/wiki/Operations_researchhttp://en.wikipedia.org/wiki/Theoretical_computer_sciencehttp://en.wikipedia.org/wiki/Heuristichttp://en.wikipedia.org/wiki/Planninghttp://en.wikipedia.org/wiki/Logisticshttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/DNA_sequencinghttp://en.wikipedia.org/wiki/DNA_sequencinghttp://en.wikipedia.org/wiki/Traveling_purchaser_problemhttp://en.wikipedia.org/wiki/Traveling_purchaser_problemhttp://en.wikipedia.org/wiki/Computational_complexity_theoryhttp://en.wikipedia.org/wiki/NP-completehttp://en.wikipedia.org/wiki/NP-completehttp://en.wikipedia.org/wiki/Best,_worst_and_average_casehttp://en.wikipedia.org/wiki/Running_timehttp://en.wikipedia.org/wiki/Exponential_time_hypothesishttp://en.wikipedia.org/wiki/Exponential_time_hypothesishttp://en.wikipedia.org/wiki/Running_timehttp://en.wikipedia.org/wiki/Best,_worst_and_average_casehttp://en.wikipedia.org/wiki/NP-completehttp://en.wikipedia.org/wiki/NP-completehttp://en.wikipedia.org/wiki/Computational_complexity_theoryhttp://en.wikipedia.org/wiki/Traveling_purchaser_problemhttp://en.wikipedia.org/wiki/Traveling_purchaser_problemhttp://en.wikipedia.org/wiki/DNA_sequencinghttp://en.wikipedia.org/wiki/DNA_sequencinghttp://en.wikipedia.org/wiki/Integrated_circuithttp://en.wikipedia.org/wiki/Logisticshttp://en.wikipedia.org/wiki/Planninghttp://en.wikipedia.org/wiki/Heuristichttp://en.wikipedia.org/wiki/Theoretical_computer_sciencehttp://en.wikipedia.org/wiki/Operations_researchhttp://en.wikipedia.org/wiki/Combinatorial_optimizationhttp://en.wikipedia.org/wiki/Combinatorial_optimizationhttp://en.wikipedia.org/wiki/NP-hard
  • 8/14/2019 Homework Topic 5.pdf

    3/7

    In practice, heuristics with weaker guarantees continue to be used.

    1.3 Christofides algorithm:

    The goal of the Christofides approximation algorithm (named after Nicos Christofides) is to find a

    solution to the instances of the traveling salesman problem where the edge weights satisfy the triangleinequality. Let be an instance of TSP, i.e. is a complete graph on the set of vertices withweight function assigning a nonnegative real weight to every edge of .

    Algorithm:

    In pseudo-code:

    1. Create the minimum spanning tree MST of .2. Let be the set of vertices with odd degree in and find a perfect matching with minimum

    weight in the complete graph over the vertices from .3. Combine the edges of and to form a multigraph .4. Form an Eulerian circuit in (H is Eulerian because it is connected, with only even-degree

    vertices) .5. Make the circuit found in previous step Hamiltonian by skipping visited nodes (shortcutting).

    http://en.wikipedia.org/wiki/Approximation_algorithmhttp://en.wikipedia.org/wiki/Traveling_salesman_problemhttp://en.wikipedia.org/wiki/Triangle_inequalityhttp://en.wikipedia.org/wiki/Triangle_inequalityhttp://en.wikipedia.org/wiki/Pseudo-codehttp://en.wikipedia.org/wiki/Minimum_spanning_treehttp://en.wikipedia.org/wiki/Degree_(graph_theory)http://en.wikipedia.org/wiki/Perfect_matchinghttp://en.wikipedia.org/wiki/Complete_graphhttp://en.wikipedia.org/wiki/Multigraphhttp://en.wikipedia.org/wiki/Eulerian_circuithttp://en.wikipedia.org/wiki/Eulerian_path#Propertieshttp://en.wikipedia.org/wiki/Eulerian_path#Propertieshttp://en.wikipedia.org/wiki/Hamiltonian_circuithttp://en.wikipedia.org/wiki/Hamiltonian_circuithttp://en.wikipedia.org/wiki/Eulerian_path#Propertieshttp://en.wikipedia.org/wiki/Eulerian_path#Propertieshttp://en.wikipedia.org/wiki/Eulerian_circuithttp://en.wikipedia.org/wiki/Multigraphhttp://en.wikipedia.org/wiki/Complete_graphhttp://en.wikipedia.org/wiki/Perfect_matchinghttp://en.wikipedia.org/wiki/Degree_(graph_theory)http://en.wikipedia.org/wiki/Minimum_spanning_treehttp://en.wikipedia.org/wiki/Pseudo-codehttp://en.wikipedia.org/wiki/Triangle_inequalityhttp://en.wikipedia.org/wiki/Triangle_inequalityhttp://en.wikipedia.org/wiki/Traveling_salesman_problemhttp://en.wikipedia.org/wiki/Approximation_algorithm
  • 8/14/2019 Homework Topic 5.pdf

    4/7

  • 8/14/2019 Homework Topic 5.pdf

    5/7

    Resolution:

    First Step: find the minimum spanning tree.

    Starting from node one and adding to the patch the closest node, we have:

    Selected Nodes Node Closest Connect to Distance Total Length1 2 1 5 5

    1, 2 5 2 3 81, 2, 5 3 2 4 12

    1, 2, 5, 3 8 3 3 151, 2, 5, 3, 8 7 2 4 19

    1, 2, 5, 3, 8, 7 6 1 7 261, 2, 5, 3, 8, 7, 6 4 6 8 34

    Graphical representation:

    Second Step: Creating the matching pairs.

    Analyzing the patch above, we have the following odd and even nodes:

    Odd nodes: 4, 5, 7, 8

    Even Nodes: 1, 2, 3, 6

    Matching pairs:

    (4-5)(7-8) = 13 + 10 = 23

    (4-7)(5-8) = 18 + 17 = 35

  • 8/14/2019 Homework Topic 5.pdf

    6/7

    (4-8)(5-7) = 16 + 11 = 27

    Where the best matching pairs is 4-5, 7-8

    Adding the matching pairs above to the minimum spanning tree, we have the following Euler tour:

    Where the patch is:

    1 => 2 => 3 => 8 => 7 => 2 => 5 => 4 => 6 => 1, with a total length of 23 + 34 = 57.

    Removing the second 2 from the patch, we have:

    1 => 2 => 3 => 8 => 7 => 5 => 4 => 6 => 1

    Total length = 57 (7 => 2 => 5) + (7 => 5)

    Total length = 57 (4 + 3) + (11)

    Total length = 61

  • 8/14/2019 Homework Topic 5.pdf

    7/7