13
Operations Research THE TRAVELING SALESMAN PROBLEM Frédéric Meunier Master Math-Info, Marne-la-Vallée, 2019-2020 École des Ponts, France

Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Operations ResearchTHE TRAVELING SALESMAN PROBLEM

Frédéric Meunier

Master Math-Info, Marne-la-Vallée, 2019-2020

École des Ponts, France

Page 2: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Traveling salesman

Input. Customers to visit:

Task. Find the shortest tour visiting all customers.

Page 3: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Scientific achievementsPerformance evolution for the traveling salesman problem:

1954 Dantzig, Fulkerson, Johnson 49 cities1971 Held, Karp 64 cities1975 Camerini, Fratta, Maffioli 67 cities1977 Grötschel 120 cities1980 Crowder, Padberg 318 cities1987 Padberg, Rinaldi 532 cities1987 Grötschel, Holland 666 cities1987 Padberg, Rinaldi 2,392 cities1994 Applegate, Bixby, Chvátal, Cook 7,397 cities1998 Applegate, Bixby, Chvátal, Cook 13,509 cities2001 Applegate, Bixby, Chvátal, Cook 15,112 cities2004 Applegate, Bixby, Chvátal, Cook, Helsgaun 24,978 cities2016 Cook, Espinoza, Goycoolea, Helsgaun, 49,603 cities

And the main reason of this progress is not computer improvement.

Page 4: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Combinatorial explosion

Solving the TSP on n cities: number of possible tours is(n − 1)!.

With a computer testing 1010 tours per second:

Number of cities Number of tours Solving time6 120 12 ns

10 362,880 36 µs20 1.22 × 1017 141 days50 6.08 × 1062 1.93 × 1045 years

100 9.33 × 10155 2.96 × 1096 years

Page 5: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Visiting all cities in the world

1,904,711 cities; proposed solution: 7,516,353,779 km; provedto be within 0.076% of the optimal solution in 2003!

Page 6: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Visiting 24,727 pubs in the United Kingdom

Optimal solution: 45,495,239 m !

Page 7: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

First modeling

Input. Graph G = (V ,E) endowed witha “length” ` : E → R+, a subset S ⊆ Vof vertices (to visit).

Task. Find the walk C of G, visiting allvertices in S, of minimal length.

: S

Page 8: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Better modeling

Input. Graph H = (S, F ), endowed witha “distance” d : F → R+.

Task. Find the hamiltonian cycle C of Hwith minimal total distance.

If we require that d satisfy triangular inequality, the two modelings areequivalent:

d(uv) := length of the shortest u-v path in G.

Page 9: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Two IP modelingsMin

∑u,v∈S : u 6=v

d(uv)zu,v

s.c.∑u 6=v

zu,v = 1 ∀v ∈ S

∑u 6=v

zv,u = 1 ∀v ∈ S

yu + (1 + n)zu,v 6 yv + n ∀u, v ∈ Su 6= v, v 6= o

zu,v ∈ {0, 1} ∀u, v ∈ S, u 6= vyv ∈ R+ ∀v ∈ S

Can be directly solved with a free or commercialsolver.

Can be adapted to other situations (with a timedelay on the edges for instance).

Cannot solve large instances (very bad linear

relaxation).

Min∑e∈F

d(e)xe

s.c.∑

e∈δ(v)

xe = 2 ∀v ∈ S

∑e∈δ(X)

xe > 2 ∀X ⊆ S tq X /∈ {∅, S}

xe ∈ {0, 1} ∀e ∈ F

Cannot be directly solved with a free orcommercial solver.

Does not adapt easily to other situations.

Can solve huge instances (good linear relaxation).

Page 10: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Efficient formulation

Min∑e∈F

d(e)xe

s.c.∑

e∈δ(v)

xe = 2 ∀v ∈ S

∑e∈δ(X)

xe > 2 ∀X ⊆ S tq X /∈ {∅,S}

xe ∈ {0, 1} ∀e ∈ F

Page 11: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Constraint separation

Main idea: we suppose given an algorithm A that solves

CONSTRAINT SEPARATION FOR TSP

Input. Vector x ∈ RE .

Task. Return ‘yes’ if x satisfies all the constraints∑e∈δ(X) xe > 2 for X ∈ C. If not, return X ′ ∈ C such that∑e∈δ(X ′) xe < 2.

Page 12: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Branch-and-cutWe perform a branch-and-bound. We choose C′ ⊆ C.

In each node of the branch-and-bound tree:1. We solve

Min∑e∈E

c(e)xe

s.c. 0 6 xe 6 1 ∀e ∈ E,∑e∈δ(v)

xe = 2 ∀v ∈ V ,∑e∈δ(X)

xe > 2 ∀X ∈ C′.

This provides a solution x̄ .2. We apply A on x̄ .

• If ‘yes’, then we resume the branch-and-bound (the linearrelaxation of (P) is solved).

• Otherwise, we go back to 1. and add the X ′ obtained by Ato C′.

Page 13: Operations Research @let@token The traveling salesman problemmeuniefr/TSP_Marne.pdf · Scientific achievements Performance evolution for the traveling salesman problem: 1954 Dantzig,

Constraint separation for TSP

There is an algorithm A separating the TSP constraints:

Put x̄e as a capacity on e, for all e ∈ E .

Fix s in V ; for each t in V \ {s}, compute an s-t cut of minimalcapacity.

If none of the cuts δ(X ′) has capacity < 2, then return ‘yes’.Else, return ‘no’ and X ′.