• Nenhum resultado encontrado

Recent Progress in Approximation Algorithms for the Traveling Salesman Problem

N/A
N/A
Protected

Academic year: 2022

Share "Recent Progress in Approximation Algorithms for the Traveling Salesman Problem"

Copied!
66
0
0

Texto

(1)

Recent Progress in Approximation Algorithms for the Traveling Salesman Problem

Lecture 1: Some basic algorithms

David P. Williamson Cornell University

July 18-22, 2016

São Paulo School of Advanced Science on Algorithms, Combinatorics, and Optimization

(2)

Winter in Ithaca

(3)

David P. Williamson Recent Progress for the TSP

Winter in Ithaca

(4)

Winter in Ithaca

(5)

David P. Williamson Recent Progress for the TSP

The traveling salesman problem

Traveling Salesman Problem (TSP) Input:

A complete, undirected graphG = (V,E);

Edge costs c(e)c(i,j)≥0 for alle = (i,j)∈E.

Goal: Find the min-cost tour that visits each city exactly once.

Costs aresymmetric(c(i,j) =c(j,i)) and obey the triangle inequality(c(i,k)≤c(i,j) +c(j,k)).

AsymmetricTSP (ATSP) input has complete directed graph, and c(i,j) may not equal c(j,i).

(6)

ATSP example

Example due to Ola Svensson (EPFL)

(7)

David P. Williamson Recent Progress for the TSP

The traveling salesman problem

From Bill Cook, tour of 647 US colleges (www.math.uwaterloo.ca/tsp/college)

(8)

The traveling salesman problem

From Bill Cook, tour of 647 US colleges (www.math.uwaterloo.ca/tsp/college)

(9)

David P. Williamson Recent Progress for the TSP

Approximation Algorithms

Definition

Anα-approximation algorithm is a polynomial-time algorithm that returns a solution of cost at mostα times the cost of an optimal solution.

(10)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(11)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(12)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(13)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(14)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(15)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(16)

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(17)

David P. Williamson Recent Progress for the TSP

A simple approximation algorithm for TSP

Compute a minimum spanning tree (MST) F on G.

Double every edge in F. The result is an Eulerian graph: it is connected, and every vertex has even degree.

An Eulerian graph has an traversalthat is easy to compute; it starts at any vertex v, visits everyedge, and returns tov.

Compute the traversal, and follow it; if the next edge goes back to a previously visited vertex, shortcut it, and go on to the next vertex in the traversal.

(18)

Theorem

Theorem

This algorithm is a 2-approximation algorithm for the TSP.

Letc(F) be the cost of the edges in the MST. Let OPT be the cost of the optimal tour.

Lemma

c(F)≤OPT. Proof.

(19)

David P. Williamson Recent Progress for the TSP

Proof of Theorem

Proof.

The cost of the tour given by the algorithm is at most 2c(F)≤2OPT.

Next: a better approximation algorithm due to Christofides (1976).

(20)

Proof of Theorem

Proof.

The cost of the tour given by the algorithm is at most 2c(F)≤2OPT.

Next: a better approximation algorithm due to Christofides (1976).

(21)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(22)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(23)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(24)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(25)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(26)

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(27)

David P. Williamson Recent Progress for the TSP

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(28)

Christofides’ algorithm

Compute minimum spanning tree (MST)F onG

Compute a minimum-cost perfect matching M on odd-degree vertices ofF

“Shortcut” Eulerian traversal in resulting Eulerian graph of FM

(29)

David P. Williamson Recent Progress for the TSP

Theorem

Theorem

Christofides’ algorithm is a 32-approximation algorithm for the TSP.

Letc(F) be the cost of the edges in the MST,c(M) the cost of the edges in the matching LetOPT be the cost of the optimal tour.

Lemma

c(F)≤OPT. Lemma

c(M)≤ 1 2OPT. Then the cost of the algorithm’s tour is at most

c(F) +c(M)≤OPT +1

2OPT = 3 2OPT.

(30)

Proof of Lemma

(31)

David P. Williamson Recent Progress for the TSP

Proof of Lemma

(32)

Proof of Lemma

(33)

David P. Williamson Recent Progress for the TSP

Linear programs

A tool we’ll start using frequently: integerandlinear programming.

We want to devise an integer program for the traveling salesman problem.

For each edgeeE, we introduce a decision variable x(e), in which we want

x(e) =

( 1 if tour uses edgee 0 otherwise

Then ourobjective function is to Minimize X

e∈E

c(e)x(e).

(34)

David P. Williamson Recent Progress for the TSP

Linear programs

A tool we’ll start using frequently: integerandlinear programming.

We want to devise an integer program for the traveling salesman problem.

For each edgeeE, we introduce a decision variable x(e), in which we want

x(e) =

( 1 if tour uses edgee 0 otherwise

Then ourobjective function is to Minimize X

e∈E

c(e)x(e).

(35)

David P. Williamson Recent Progress for the TSP

Linear programs

A tool we’ll start using frequently: integerandlinear programming.

We want to devise an integer program for the traveling salesman problem.

For each edgeeE, we introduce a decision variable x(e), in which we want

x(e) =

( 1 if tour uses edgee 0 otherwise

Then ourobjective function is to Minimize X

e∈E

c(e)x(e).

(36)

David P. Williamson Recent Progress for the TSP

Initial constraint

Letδ(i) represent the set of all edgese that haveiV as one endpoint. Then we want

X

e∈δ(i)

x(e) = 2 for alliV.

An initial integer programming formulation of the problem is then: Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i∈V, x(e)∈ {0,1} ∀e∈E. What might be a problem with this formulation?

(37)

David P. Williamson Recent Progress for the TSP

Initial constraint

Letδ(i) represent the set of all edgese that haveiV as one endpoint. Then we want

X

e∈δ(i)

x(e) = 2 for alliV.

An initial integer programming formulation of the problem is then:

Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V, x(e)∈ {0,1} ∀e ∈E.

What might be a problem with this formulation?

(38)

Initial constraint

Letδ(i) represent the set of all edgese that haveiV as one endpoint. Then we want

X

e∈δ(i)

x(e) = 2 for alliV.

An initial integer programming formulation of the problem is then:

Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V, x(e)∈ {0,1} ∀e ∈E.

What might be a problem with this formulation?

(39)

David P. Williamson Recent Progress for the TSP

Initial IP

Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V x(e)∈ {0,1} ∀e ∈E.

The following solution is feasible:

(40)

Subtour elimination constraints

ForSV, letδ(S) be the set of edges with one endpoint inS.

S

Then we want that

X

e∈δ(S)

x(e)≥2 for any setS.

(41)

David P. Williamson Recent Progress for the TSP

LP relaxation

(42)

LP relaxation

(43)

David P. Williamson Recent Progress for the TSP

LP relaxation

(44)

LP relaxation

(45)

David P. Williamson Recent Progress for the TSP

Subtour LP

Thus an initial integer programming formulation is Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V X

e∈δ(S)

x(e)≥2 ∀S ⊂V,S 6=∅ x(e)∈ {0,1} ∀e∈E.

Replacex(e)∈ {0,1}by 0≤x(e)≤1 to obtain a linear programming relaxationcalled theSubtour LP.

IfOPTIP is value of IP optimal,OPTLP value of LP optimal, how do they compare?

OPTLPOPTIP.

(46)

David P. Williamson Recent Progress for the TSP

Subtour LP

Thus an initial integer programming formulation is Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V X

e∈δ(S)

x(e)≥2 ∀S ⊂V,S 6=∅ x(e)∈ {0,1} ∀e∈E. Replacex(e)∈ {0,1}by 0≤x(e)≤1 to obtain a linear programming relaxationcalled theSubtour LP.

IfOPTIP is value of IP optimal,OPTLP value of LP optimal, how do they compare?

OPTLPOPTIP.

(47)

David P. Williamson Recent Progress for the TSP

Subtour LP

Thus an initial integer programming formulation is Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V X

e∈δ(S)

x(e)≥2 ∀S ⊂V,S 6=∅ x(e)∈ {0,1} ∀e∈E. Replacex(e)∈ {0,1}by 0≤x(e)≤1 to obtain a linear programming relaxationcalled theSubtour LP.

IfOPTIP is value of IP optimal,OPTLP value of LP optimal, how do they compare?

OPTLPOPTIP.

(48)

Subtour LP

Thus an initial integer programming formulation is Minimize X

e∈E

c(e)x(e) subject to:

X

e∈δ(i)

x(e) = 2 ∀i ∈V X

e∈δ(S)

x(e)≥2 ∀S ⊂V,S 6=∅ x(e)∈ {0,1} ∀e∈E. Replacex(e)∈ {0,1}by 0≤x(e)≤1 to obtain a linear programming relaxationcalled theSubtour LP.

IfOPTIP is value of IP optimal,OPTLP value of LP optimal, how do they compare?

OPTLPOPTIP.

(49)

David P. Williamson Recent Progress for the TSP

Subtour LP

We’ll sometimes use the shorthandx(F) =Pe∈Fx(e), or c(F) =Pe∈Fc(e). For example, rewrite LP as

Minimize X

e∈E

c(e)x(e) subject to:

x(δ(i)) = 2 ∀i ∈V

x(δ(S))≥2 ∀S ⊂V,S 6=∅ 0≤x(e)≤1 ∀e ∈E.

(50)

Equivalent constraints

An equivalent way to write the subtour elimination constraints is via a constraint that says no cycles in any strict subset. LetE(S) be the set of edges with both endpoints inS; then

x(E(S))≤ |S| −1 for allSV,|S| ≥2.

S

(51)

David P. Williamson Recent Progress for the TSP

Equivalent LP

So an LP that’s equivalent to the subtour LP is the following:

Minimize X

e∈E

c(e)x(e) subject to:

x(δ(i)) = 2 ∀i ∈V

x(E(S))≤ |S| −1 ∀S ⊂V,|S| ≥2 0≤x(e)≤1 ∀e ∈E.

(52)

David P. Williamson Recent Progress for the TSP

Christofides’ again

LetOPTLP be the optimal value of the linear programming. We can now (almost) prove the following.

Theorem (Wolsey (1980), Shmoys, W (1990))

Christofides’ algorithm returns a tour of cost at most 32OPTLP.

To prove this, we need to show that for MSTF and matching M on odd-degree vertices,

Lemma

c(F)≤OPTLP Lemma

c(M)≤ 1

2OPTLP

(53)

David P. Williamson Recent Progress for the TSP

Christofides’ again

LetOPTLP be the optimal value of the linear programming. We can now (almost) prove the following.

Theorem (Wolsey (1980), Shmoys, W (1990))

Christofides’ algorithm returns a tour of cost at most 32OPTLP. To prove this, we need to show that for MSTF and matching M on odd-degree vertices,

Lemma

c(F)≤OPTLP Lemma

c(M)≤ 1

2OPTLP

(54)

Proof of first lemma

The minimum spanning tree can be found as the solution to the following LP (Edmonds 1971):

Minimize X

e∈E

c(e)z(e) subject to:

z(E) =|V| −1

z(E(S))≤ |S| −1 ∀S ⊂V,|S| ≥2 z(e)≥0 ∀e∈E.

S

(55)

David P. Williamson Recent Progress for the TSP

Proof of first lemma

c(F)≤OPTLP

Min X

e∈E

c(e)x(e)

x(δ(i)) = 2 ∀iV

x(E(S))≤ |S| −1 ∀SV,|S| ≥2 0x(e)1 ∀eE.

Min X

e∈E

c(e)z(e)

z(E) =|V| −1

z(E(S))≤ |S| −1 ∀SV,|S| ≥2 z(e)0 ∀eE.

(56)

Proof of second lemma

The minimum-cost perfect matching can be found as the solution to the following LP (Edmonds 1965):

Minimize X

e∈E

c(e)z(e) subject to:

z(δ(i)) = 1 ∀i ∈V

z(δ(S))≥1 ∀S ⊂V,|S|odd.

S

(57)

David P. Williamson Recent Progress for the TSP

Proof of second lemma

c(M)≤ 1

2OPTLP

Min X

e∈E

c(e)x(e)

x(δ(i)) = 2 ∀iV x(δ(S))2 ∀SV,S6= 0x(e)1 ∀eE.

Min X

e∈E

c(e)z(e)

z(δ(i)) = 1 ∀iV

z(δ(S))1 ∀SV,|S|odd z(e)0 ∀eE.

(58)

David P. Williamson Recent Progress for the TSP

Missing part

We also need that the value of the subtour LP can only go down as we remove vertices from the instance (Shmoys, W 1990), so that we can consider a matching only on the odd-degree vertices.

Theorem

c(F) +c(M)≤ 3

2OPTLP,

so that Christofides’ algorithm returns a solution of cost at most this much.

(59)

David P. Williamson Recent Progress for the TSP

Missing part

We also need that the value of the subtour LP can only go down as we remove vertices from the instance (Shmoys, W 1990), so that we can consider a matching only on the odd-degree vertices.

Theorem

c(F) +c(M)≤ 3

2OPTLP,

so that Christofides’ algorithm returns a solution of cost at most this much.

(60)

David P. Williamson Recent Progress for the TSP

Update

“But I thought you were going to talk aboutrecent approximation algorithms for the traveling salesman problem...”

For TSP, no better approximation algorithm known that Christofides’ algorithm.

(61)

David P. Williamson Recent Progress for the TSP

Update

“But I thought you were going to talk aboutrecent approximation algorithms for the traveling salesman problem...”

For TSP, no better approximation algorithm known that Christofides’ algorithm.

(62)

David P. Williamson Recent Progress for the TSP

Graph TSP

Progress made for two different special cases: graph TSPand the s-t path TSP.

Graph TSP: Input is connected graphG = (V,E) and costc(i,j) is number of edges in shortest path fromi toj inG.

Oveis Gharan, Saberi, Singh 2010 3/2−

Mömke, Svensson 2011 1.461

Mömke, Svensson 2011 4/3 if graph subcubic

Mucha 2011 13/9

Sebő and Vygen 2012 1.4

(63)

David P. Williamson Recent Progress for the TSP

Graph TSP

Progress made for two different special cases: graph TSPand the s-t path TSP.

Graph TSP: Input is connected graphG = (V,E) and costc(i,j) is number of edges in shortest path fromi toj in G.

Oveis Gharan, Saberi, Singh 2010 3/2−

Mömke, Svensson 2011 1.461

Mömke, Svensson 2011 4/3 if graphsubcubic

Mucha 2011 13/9

Sebő and Vygen 2012 1.4

(64)

David P. Williamson Recent Progress for the TSP

s-t path TSP

Thes-t path TSP:

Usual TSP input pluss,tV, find a min-cost path froms to t visiting all other nodes in between (ans-t Hamiltonian path).

Hoogeveen (1991) shows that the natural variant of Christofides’

algorithm gives a 53-approximation algorithm.

An, Kleinberg, Shmoys 2012 1.618

Sebő 2013 1.6

Vygen 2015 1.599

Gottschalk and Vygen 2015 1.56 Sebő and Van Zuylen 2016 1.52

(65)

David P. Williamson Recent Progress for the TSP

s-t path TSP

Thes-t path TSP:

Usual TSP input pluss,tV, find a min-cost path froms to t visiting all other nodes in between (ans-t Hamiltonian path).

Hoogeveen (1991) shows that the natural variant of Christofides’

algorithm gives a 53-approximation algorithm.

An, Kleinberg, Shmoys 2012 1.618

Sebő 2013 1.6

Vygen 2015 1.599

Gottschalk and Vygen 2015 1.56 Sebő and Van Zuylen 2016 1.52

(66)

Agenda

For the rest of the week:

Wednesday: Graph TSP (4/3 for cubic, 2-vertex-connected graphs) Thursday: s-t path TSP

Friday: s-t path TSP for graph TSP, open questions

Referências

Documentos relacionados

Revista Científica de Comunicação Social do Centro Universitário de Belo Horizonte (UniBH) e-Com, Belo Horizonte, v.10, nº 1, 1º semestre de 20177. DIVULGAÇÃO CIENTÍFICA NO

Eu, Mayra Fernanda de Sousa Campos, aluna de mestrado do Programa de Pós- graduação em Educação Agrícola da Universidade Federal Rural do Rio de Janeiro,

As modalidades mais simples de cooperação entre redações adotam a forma de promoção cruzada (cross-promotion), isto é, o uso de palavras ou elementos visuais

Nesse tópico, abordamos, dentro da perspectiva Bakhtiniana, o dialogismo e a polifonia em suas vertentes acerca da escrita da autora. O dialogismo remete ao diálogo, mas não se trata

A Cultura Organizacional tradições, 22,5% 27,5% 30% práticas e costumes adotados no TJPB – Comarca de Campina Grande, favorece a execução das minhas atividades na instituição O

De acordo com ARBIX (2007), o processo de inovação resulta de interações entre indivíduos, firmas e outras instituições produtoras de conhecimento, nos níveis

This project explore the possibility of revising the dominant definition of modernism, based on the following hypothesis: the modernisms of Southern Europe have affirmed

Abdução horizontal – a abdução horizontal ocorre no plano transverso, esse movimento é realizado pelos músculos deltóide (parte espinhal), infra-espinhoso e