WINSEM2015-16_CP0739_25-Jan-2016_RM02_Lecture-5.pdf - 1 TSP and SubSet Sum Don.S [email protected] 2 Traveling-salesman problem is NPC \u2022

WINSEM2015-16_CP0739_25-Jan-2016_RM02_Lecture-5.pdf - 1 TSP...

This preview shows page 1 - 5 out of 8 pages.

1 TSP and SubSet Sum Don.S [email protected]
Image of page 1
2 Traveling-salesman problem is NPC TSP={<G, c , k >: G=(V,E) is a complete graph, c is a function from V V Z, k Z, and G has a traveling salesman tour with cost at most k .} Theorem 34.14 : (page 1012) TSP is NP-complete. Material from Internet x u v w 4 3 2 5 1 1
Image of page 2
3 TSP TSP belongs to NP: Given a certificate of a sequence of vertices in the tour, the verifying algorithm checks whether each vertex appears once, sums up the cost and checks whether at most k . in poly time. TSP is NP-hard (show HAM-CYCLE p TSP) Given an instance G=(V,E) of HAM-CYCLE, construct a TSP instance <G',c,0) as follows (in poly time): G'=(V,E'), where E'={< i , j >: i , j V and i j } and Cost function c is defined as c ( i , j )=0 if ( i , j ) E, 1, otherwise. If G has a hamiltonian cycle h , then h is also a tour in G' with cost at most 0. If G' has a tour h ' of cost at most 0, then each edge in h ' is 0, so each edge belong to E, so h ' is also a hilmitonian cycle in G.
Image of page 3
4 Subset Sum is NPC SUBSET-SUM={<S, t
Image of page 4
Image of page 5

You've reached the end of your free preview.

Want to read all 8 pages?

  • Spring '19
  • Addition, Travelling salesman problem, NP-complete, sj

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture