1. Trang chủ
  2. » Ngoại Ngữ

THE TRAVELING SALESMAN PROBLEM AND ITS APPLICATIONS

75 521 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 75
Dung lượng 2,78 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

VIETNAM NATIONAL UNIVERSITYUNIVERSITY OF SCIENCEFACULTY OF MATHEMATICS, MECHANICS, AND INFORMATICSDinh Thi Thu THE TRAVELING SALESMAN PROBLEM AND ITS APPLICATIONS Undergraduate ThesisAdv

Trang 1

VIETNAM NATIONAL UNIVERSITYUNIVERSITY OF SCIENCEFACULTY OF MATHEMATICS, MECHANICS, AND INFORMATICS

Dinh Thi Thu

THE TRAVELING SALESMAN PROBLEM

AND ITS APPLICATIONS

Undergraduate ThesisAdvanced Undergraduate Program in Mathematics

Hanoi - 2012

Trang 2

VIETNAM NATIONAL UNIVERSITYUNIVERSITY OF SCIENCEFACULTY OF MATHEMATICS, MECHANICS, AND INFORMATICS

Dinh Thi Thu

THE TRAVELING SALESMAN PROBLEM

AND ITS APPLICATIONS

Undergraduate ThesisAdvanced Undergraduate Program in Mathematics

Thesis advisor: Dr Hoang Nam Dung

Hanoi - 2012

Trang 3

Together with the dramatic development of science and technology, the optimizationproblem has been appearing more and more with highly complicated computation.Range and applicable ability of the optimization problem are more diverse and abun-dant

The traveling salesman problem (TSP for short) is representative for a large class

of problems known as NP-hard combinatorial optimization problems The travelingsalesman problem is stated as follows: There are n cities A salesman must visit allcities, each city exactly once, and return to the starting one The distance (cost)between each pair of the cities is given The traveling salesman problem is to find theshortest tour

The Ireland mathematician William Rowan Hamilton and the British matician Thomas Kirkman defined the traveling salesman problem in the 19 century.Mathematicians in Vienna and Harvard studied the first general instance of TSP inthe 1930s One of them was Karl Menger who defined the problem and considered themost obvious algorithm for TSP He also found that the nearest neighbour algorithm isnot optimal After that, the name ”traveling salesman problem” was named by HasslerWhitney at Princeton University This problem has been studied by many researchers

mathe-in the fields of mathematics, computer sciences, chemistry, physics, and other sectors

so far

The traveling salesman problem has many applications in real life The TSPnaturally arises as a sub-problem in many transportation and logistic applications,for example the problem of arranging school bus routes to pick up the children in

a school district A TSP application from the 1940s involved the transportation offarming equipment from one location to another to test soil More recent applicationsinvolve the delivery of meals to homebound persons, the scheduling of stacker cranes

in warehouses, the routing of trucks for parcel post pickup, and a host of others Aclassic example is the scheduling of a machine to drill holes in a circuit board or otherobject (seehttp://www.tsp.gatech.edu/apps/index.html)

The purpose of this thesis is to understand the basic of TSP problem and itsapplications in real life The thesis is mainly written based on the existing knowledge

in [3], [16], [17], [18], [21], and other documents in bibliography The thesis consists offour main chapters:

Chapter I deals with the history of traveling salesman problem In this chapter, wegive an overview of the historical development of this problem

Trang 4

Chapter II refers to the basic issues of the traveling salesman problem, from the formalmathematical definitions to approximation methods in order to find an approximation

to the optimal solution More precisely, this chapter deals with definition, complexity,heuristics, cutting plane, and branch and bound methods

Chapter III deals with applications of the traveling salesman problem This chapterrefers to the practical applications of this problem in real life Within the framework ofthis thesis, we only mention four applications closed to real life They are applications

in Hanoi tourism, vehicle routing, computer wiring, and job-shop scheduling

Chapter IV shows out a very interesting application which is called TSP-Face ing with an image, we will transform it into many discrete points and then create thatimage again by finding a tour passing all the points, each one exactly once The image

Start-we obtain is actually an imitative picture of the given one

Trang 5

I would like to express my sincere thank to my thesis advisor Dr Hoang Nam Dungfor his precious comments, invaluable assistance, and insights leading to the writing ofthis thesis

I also want to thank to my friends, especially Hoang Anh Duc for their supportsand encouragement

And last but not least, I especially thank to my family for their care, agement, and supports

encour-Dinh Thi ThuHanoi, October 2012

Trang 6

1 History of The Traveling Salesman Problem 6

2.1 Definitions of The Traveling Salesman Problem 9

2.1.1 Formal Mathematical Definition 9

2.1.2 Integer Programming Formulation 10

2.2 Complexity 12

2.2.1 Definition 12

2.2.2 TSP is NP-hard 15

2.3 Heuristics 17

2.3.1 Nearest Neighbour Search 19

2.3.2 Twice Around The Tree Heuristic 20

2.3.3 Christofides Heuristic 23

2.3.4 Improvement Heuristics 27

2.4 Cutting Planes 28

2.4.1 Introduction 28

2.4.2 Example 31

2.5 Branch and Bound Methods 36

2.5.1 Introduction 37

2.5.2 Examples 41

3 Applications of The Traveling Salesman Problem 47 3.1 Hanoi Tourism 47

3.2 The Basic Vehicle Routing Problem 51

3.3 Computer Wiring 56

3.4 Job-shop Scheduling 57

Trang 7

4.1 Introduction 60

4.2 Result 65

Trang 8

The knowledge presented here is based on the given one in [15].

The origin of the traveling salesman problem is unknown A handbook for the saleswas published in 1832 mentioned this problem and gave examples of cycles in Germanyand Switzerland, but did not contain any mathematical content

The traveling salesman problem was defined in the 19th century by the Irelandmathematician William Rowan Hamilton and the British mathematician Thomas Kirk-man General instance of TSP was firstly studied by mathematicians in Vienna andHarvard in the 1930s, especially Karl Menger, who defined the problem, consideredthe most obvious algorithm for TSP, and found that the nearest neighbor algorithm isnot optimal Hassler Whitney at Princeton University named the traveling salesmanproblem after that

TSP problem has been studied by many researchers in the fields of ics, computer sciences, chemistry, physics, and other sectors so far In the 1950s and1960s, the problem became popular in scientific research in Europe and United States

mathemat-of America George Dantzig, Delbert Ray Fulkerson, and Selmer M Johnson at theRAND Corporation in Santa Monica made important contributions to this problem,performed TSP problem as a whole, and offered cutting plane method to find a solu-tion With this new method, they solved an instance of 49 cities by building a cycleand proved that there is no shorter cycle In 1972, Richard M Karp proved thatthe Hamiltonian cycle problem is NP-complete It implies that TSP problem is NP-complete This is a mathematical explanation for the difficulty in finding the shortest

Trang 9

cycle A big step was made in the late 1970s and 1980s when Gr¨otschel, Padberg,Rinaldi, and their colleagues solved the instances up to 2392 cities, using cutting planemethods and branching In the 1990s, Applegate, Bixby, Chvatal, and Cook devel-oped a program called Concorde It has solved many instances with large number ofcities In 1991, Gerhard Reinelt published a set of data of different levels of difficultycalled TSPLIB which contains 110 examples with sizes from 14 cities up to 85, 900cities It has been used by several research groups to compare results The largestsolved instance of TSP consists of a tour through 85, 900 cities in a VLSI applicationthat arose in Bell Laboratories in the late 1980s The computation with Concordewas carried out in June 2005 and reported in the book [17] The instance is calledpla85900 in Gerd Reinelt’s TSPLIB; the shortest possible tour for the problem haslength 142,382,641 units With the solution of pla85900, the complete TSPLIB collec-tion of challenge problems has now been successfully solved with the Concorde code(seehttp://www.tsp.gatech.edu/pla85900/index.html) In many other cases withmillions of cities, people have found the solution with a gap of not more than 1% fromoptimal solution.

A very nice challenge was given by Robert Bosch in February 2009 He created

a 100,000-city instance of TSP that provides a representation of Leonardo da Vinci’sMona Lisa as a continuous-line drawing Techniques for developing such point setshave evolved over the past several years through work of Bosch and Craig Kaplan Anoptimal solution to the this problem would set a new world record for the TSP Thecurrent best- known result for the Mona Lisa TSP, whose length of tour is 5, 757, 191units with gap of 0.0019%, was found on March 17, 2009 by Yuichi Nagata

Figure 1.1: Mona Lisa TSP

Trang 10

The prize of 1000 dollars has been offering since 2009 to the first person who finds

a tour shorter than the best-known one (see http://www.tsp.gatech.edu/data/ml/monalisa.html)

Trang 11

Chapter 2

The Traveling Salesman Problem

2.1 Definitions of The Traveling Salesman Problem

In this part, we consider the formula of the traveling salesman problem in two wayswhich are the formal mathematical formula and the integer programming formula

The knowledge presented here is based on the given one in [17] and [20].The traveling salesman problem is stated as follows: There are n cities A salesmanmust visit all cities, each exactly once, and return to the starting one The distance(cost) between each pair of the cities is given The traveling salesman problem is tofind the smallest (cheapest) tour

The mathematical structure is a graph where each city is denoted by a point(a node) and a direct connection between two nodes is represented by an edge withcost on it If the salesman can go from every city to every other cities directly thenthe graph is said to be complete A round-trip of cities corresponds to some subset ofedges and it is called a tour (or Hamilton cycle) in graph theory The cost of tour isthe sum of the costs of edges in round-trip

2.1.1 Formal Mathematical Definition

Let G = (V, E) be a graph (directed or undirected) and F be a family of all Hamiltoncycles (tours) in G For each edge e ∈E, let ce be the cost of that edge The TSP is tofind a tour or a Hamilton cycle in G such that the total cost of the tour is minimal.Without loss of generality, assume G is a complete graph (a digraph), otherwise we canreplace the missing edge with edge of very large cost Let V = {1, 2, , n} be the set

of city, (cij)n×n is the cost matrix where cij is cost of the edge joining node i to node

j in graph G The TSP can also be considered as a permutation problem In general,

Trang 12

two variations of permutation representation of TSP are quadratic representation andlinear representation.

Definition 2.1 (Quadratic permutation representation)[17]

Let Pn be the collection of all permutations of the set {1, 2, , n} The problem is tofind a Π = {Π(1), Π(2), , Π(n)} in Pn such that

CΠ(n)Π(1)+ Σn−1i=1CΠ(i)Π(i+1)

is minimal

Remark 2.2 Π = {Π(1), Π(2), , Π(n)} gives us the order in which cities are visitedstarting with Π(1) There are n different permutations which represent the same tours.This representation of TSP is generally used in the context of some sequencing problemsand gives rise to a binary quadratic programming formulation of TSP That’s why werefer to this the quadratic permutation representation of TSP

Definition 2.3 (Linear permutation representation)[17]

Let Cn be the collection of all cyclic permutations {1, 2, , n} The problem becomes

to find a σ = (σ(1), σ(2), , σ(n)) ∈ Cn such that

n

X

i=1

Ciσ i

is minimal, where σ(i) is the successor of city i in the resulting tour, for i = {1, 2, , n}

Given a graph G = (V, A) of n vertices, in which V is a vertex set, V = {1, 2, 3, · · · , n},

A is an edge set, A ={(i, j)|i, j = 1, , n}, and (cij)n×n is a non-negative cost matrixassociated with the edges The fact that G is complete involves no restriction, sinceedges that we wish to ignore can be assigned the cost cij = ∞ Here we note that

cii = ∞ for all i ∈ V

The symmetric TSP (STSP for short) and the asymmetric TSP (ATSP for short)are two kinds of TSP The TSP is called symmetric if for every pair of cities i and j,the cost between them is the same as the one between j and i, or cij = cji Otherwise,the problem is called asymmetric

Trang 13

In the STSP

• Input: a given complete (undirected graph) with costs on edges

• Output: a Hamilton cycle (or a tour) of minimum cost

In the ATSP

• Input: a given complete directed graph with costs on edges

• Output: a Hamilton cycle (or a tour) of minimum cost

Definition 2.4 (Asymmetric traveling salesman problem)[20]

The ATSP can be formulated as follows

Definition 2.5 (Symmetric traveling salesman problem)[20]

In the STSP, the direction does not matter because cij = cji One can consider STSP

as a complete undirected graph G = (V, E) with n vertices, where V is the set ofvertices, E is the set of edges, and (cij)n×n is the cost matrix The formula of STSP iswritten as follows

Trang 14

i∈V j>i

cijxijsubject to

The knowledge presented here is based on the given one in [3], [9], [13], [19],and [20]

2.2.1 Definition

We first mention about Turing machine In order to understand its definition, we need

to define some following sets Let Γ be a finite alphabet including the blank symbol

b, Σ is a finite alphabet not including the blank symbol b, Q is a finite set of possiblestates q, and δ is a transition function

We can describe Turing machine as follows: a Turing machine consists of a finite statecontrol attached to read/write head moving on an infinite tape The tape is dividedinto squares, each capable of storing one symbol from a finite alphabet Σ At each

Trang 15

step in a computation M is in some state q Initially a finite input string over Σ iswritten on adjacent squares of the tape, all other squares are blank, the head scans theleft-most symbol of the input string, and M is in the initial state q0 At each step M is

in some state q and the head is scanning a tape square containing some tape symbol

s, and the action depends on the pair (q,s) and is specified by Γ The action has threemissions including printing a symbol on the scanned squared, moving the head left orright one square, and assuming a new state If δ(q, s) = (q0, s0, h) the interpretation isthat if M is in state q scanning the symbol s then q0 is the new state, s0 is the symbolprinted, and the tape head moves left to right one square depending on whether h is

Now, let Σ be a finite alphabet with at least two elements, Σ? be the set offinite strings over Σ, Σn be the set of all strings over Σ of length n, L ⊂ Σ? is a set

of language over Σ For each string w ∈ Σ? there is a computation associated with

M with input w M accepts w if this computation terminates in the accepting state

M does not accept w either if this computation ends in the rejecting state or if thecomputation fails to terminate

Let L(M) be the language accepted by M, defined by

Trang 16

Definition 2.8 We define class P by language L over Σ by

P = {L|L = L(M ) for some Turing machine M which runs in polynomial time}.Definition 2.9 A checking relation is a binary relation R ⊂ Σ?× Σ?

1 for some finitealphabets Σ and Σ? With each such relation R, define a language LRover Σ∪Σ1∪{#}

as follows

LR= {w#y|R(x, y)}

where the symbol # is not in Σ We say that R is polynomial time iff LR∈ P

Definition 2.10 We define the class NP of languages by the condition that a language

L over Σ is in NP iff there is k ∈ N and a polynomial time checking relation R suchthat for all w ∈ Σ?,

w ∈ L ⇐⇒ ∃(|y| ≤ |w|k and R(w, y))where |w| and |y| denote the lengths of w and y, respectively

One important notion in computability theory is reducibility which is defined

1.Definition 2.12 Suppose that Li is a language over Σi, i = 1, 2 L1 is called p-reducible to L2 (L1 ≤p L2 for short) iff there is a polynomial time computable function

f : Σ?

1 −→ Σ?

2 such that x ∈ L1 ⇐⇒ f (x) ∈ L2 for all x ∈ Σ?

1.Definition 2.13 A language L is NP-hard iff L0 ≤p L for every language L0 in NP.Definition 2.14 A language L is NP-complete iff L is in NP, and L0 ≤p L for everylanguage L0 in NP

Definition 2.15

• A literal is a variable, x, or its negation, ¯x

• A clause is a disjunction (”or”) of variables

• A formula is in conjunctive normal form (CNF for short) if it can be written as

a conjunction (and) of clauses

• A formula is in 3-CNF if it is a CNF formula where each clause consists of threevariables

Trang 17

Definition 2.16 A truth assignment is a choice of true or false for each variable.Definition 2.17 A truth assignment is a satisfying assignment for such a formula if

it makes every clause be true

Definition 2.18 (SAT)

Given a set of clauses C1, C2, · · · , Ckover variables X = {x1, x2, · · · , xn}, if there exists

a satisfying assignment, we call it SAT

Definition 2.19 (3-SAT)

3-SAT is a restricted version of SAT where the formula is in 3-CNF Given a set

of clauses C1, C2, , Ck, each of length 3, over variables X = {x1, x2, · · · , xn} Theproblem is whether or not there is a satisfying assignment If yes, we call it 3-SAT.For example, the formula

(P ∨ Q ∨ R) ∧ ( ¯P ∨ Q ∨ ¯R) ∧ (P ∨ ¯Q ∨ S) ∧ ( ¯P ∨ ¯R ∨ ¯S)

is a YES instance to 3-SAT since the truth assignment τ satisfies the formula, where

τ (P ) = τ (Q) = True and τ (R) = τ (S) = False

Definition 2.20 The XOR (exclusive-or) gate is a digital logic gate in which theoutput is ”true” if only one of the inputs is ”true” The output is ”false” if both inputsare ”false” or if both inputs are ”true”

Definition 2.21 (Hamilton cycle)

Given a directed graph, a cycle that visits every vertex exactly once is called Hamiltoncycle

Trang 18

• Given an arbitrary instance of SAT, we show how to transform it into an instance

of 3-SAT Look in turn at each clause of the instance of SAT:

+ If it has fewer than three variables, repeat a variable as necessary For example,(a or ¯b) ⇒ (a or a or ¯b)

+ If it has more than three variables, introduce a new variable, and use it to splitthe clause into one with three variables and another with one fewer variables(which can be reduced the same way) For example, (a or ¯b or c or ¯d or ¯e) ⇒ (a

or ¯b or z) and (¯z or c or ¯d or ¯e)

• The resulting formula can be clearly produced in time proportional to the size ofthe instance, and is clearly satisfiable if and only if the original formula was SoSAT ≤p 3-SAT Since SAT is NP-complete, so must be 3-SAT

Second, in order to see that it is NP-complete, we will reduce from 3-SAT Let

F = ∧i(li1∨ li2∨ li3) be an instance of 3-SAT over variables {x1, x2, , xn} Now wewish to create a graph G such that G has a Hamilton cycle if and only if F is satisfiable.The idea here is to construct an exclusive-or gadget

The reduction is as follows

• Enter and leave through a and b, or

• Enter and leave through c and d

Trang 19

To strip the nodes of the gadget, a Hamilton cycle must do exactly one of the following

• For each variable xk there are two nodes as shown in the middle diagram Callthese two nodes supernodes to distinguish them from the nodes in the exclusive-orgadgets

• Similarly, each clause has three supernodes with three paths as in the right gram All of the supernodes are connected in all possible ways by edges (theseedges are not shown)

dia-• For the xor gadgets:

+ If the ith clause has literal lij = xk (or ¯xk) then attach an exclusive-or gadget.Nodes a and b are attached to the two variable supernodes, and nodes c and dare attached to the two clause supernodes for lij

+ Lastly, if a literal xk (or ¯xk) occurs in more than one clause, the xor-gadgetsare attached in series, b of one gadget is tied to a of the next

The reduction is clearly polynomial time

2.3 Heuristics

Most of TSP run in exponential time, since its complexity is NP-hard In order toget a good solution, we use approximation algorithms or heuristics The heuristics dis-cussed here mainly concern the symmetric traveling salesman problem To get the goodunderstanding about this method we study two main features which are construction ofheuristic and improvement heuristic, by considering small examples

The knowledge presented here is based on the given one in [3], [10], [14], [19],and [21]

As we presented in the previous section 2.1, the mathematical structure of TSP is

a complete graph where each city is denoted by a node and connection between two

Trang 20

nodes is represented by an edge with cost on it If a salesman can go from every city

to every other cities directly then the graph is said to be complete A round-trip of thecities corresponds to some subset of edges and it is called a tour (or Hamilton cycle) ingraph theory The distance (cost) of tour is the sum of the distances (costs) of edges inround-trip We first remark some necessary definitions related to graph theory beforestudying heuristic methods

Definition 2.25 A finite graph is a pair (V, E) where V is a finite set called vertices,

E is a family of pairs (x, y) such that x, y ∈ V called edges

Definition 2.26 An Eulerian tour is a tour that traverses all edges of a graph exactlyonce

Definition 2.27 A matching on graph G(V, E) is a set of edges of G such that notwo edges share a vertex of common The largest possible matching consists of a half

of the edges, and such a matching is called a perfect matching

Definition 2.28 A walk in a graph is a sequence v0, E1, v1, E2, · · · , vk−1, Ek, vk suchthat Ei = (vi−1, vi)

Definition 2.29 A walk in G(V, E) in which all vertices are distinct is called a path.Definition 2.30 A walk v0, E1, v1, E2, · · · , vk−1, Ek, vk in which v1 = vk is called aclosed walk

Definition 2.31 Given a walk v1 → v2 → · · · → vk in a (weighted) graph Replacingthat walk by the edge v1 → vk is called a shortcut

Definition 2.32 A graph H(V1, E1) is a subgraph of G(V, E) if V1 ⊂ V and E1 ⊂ E.Definition 2.33 A subgraph H(V1, E1) of G(V, E) is a spanning subgraph of G if

V1 = V

Definition 2.34 A graph G(V, E) is connected if between any pair of vertices there

is a path

Definition 2.35 A connected graph without cycles is called a tree

Definition 2.36 A subgraph T of a given graph G(V, E) is a spanning tree of G if it

is a tree and contains every vertex of G

Definition 2.37 A minimum cost spanning tree (MCST for short) which is an rected connected weighted graph is a spanning tree of minimum weight among allspanning trees

Trang 21

undi-2.3.1 Nearest Neighbour Search

This method contains three steps as follows

• Select a random city, called A1, then choose the nearest neighbour of A1, called

A2

• Find the nearest neighbour of A2 such that no sub-tour appears

• Repeat the process above until we come back A1

We will study this method via a specific example

Question Find the tour which has the smallest distance?

Step by step, we will find the smallest distance from a starting node Suppose that wetake node 1 to start the tour From node 1, observe that the smallest distance fromnode 1 to others is 7 denoted by

Trang 22

The route now is 1 − 5 − 2 − 4 From node 4

This heuristic contains four following steps

• Find the MCST from the given complete weighted graph

• Duplicate all edges of that MCST

Trang 23

• Construct an Eulerian cycle in duplicated MCST.

• Use shortcuts to eliminate repeated nodes and produce a Hamilton tour

In order to understand this method deeply, we come to see the following example

a Example

Let’s come back the given example in the previous part Suppose the distance matrix

of a complete graph is given by

A MCST of the given graph is 1 − 5 − 2 − 4 − 3 with length LM CST = 26

Figure 2.1: The minimum cost spanning tree

Let L0 be the length of the optimal tour, Lh be the length of heuristic tour, and LST

be the length of a spanning tree, then we have

Trang 24

From (2.8) we get some heuristic solutions by eliminating repeated nodes as follows

Figure 2.2: The duplicated minimum spanning tree

L0

≤ 2

Trang 25

Hence the length of the best tour found by this heuristic is at most twice of the one ofthe optimal tour.

2.3.3 Christofides Heuristic

Christofides heuristic is the best known approximation algorithm for the Euclidean TSP

It contains four following steps

• Find the MCST from the given complete weighted graph

• Create a minimum weighted matching on the set of nodes which have odd degree.Add the MCST together with that minimum weighted matching

• Create an Eulerian cycle from the combined graph

• Use shortcuts to eliminate repeated nodes and produce a Hamilton tour

This method seems to be very similar to the previous one The difference is that instead of duplicating all edges of the MCST, we need to figure out the nodes that haveodd degree Observe that the sum of degree is an even number, so the number of verticeswith odd degree must be even Consider two cases: the number of odd degree is eitherequal to 2 or greater than 2 We now study this method via specific examples

a Example

Assume that we obtained the MCST from the given distance matrix

• If there are only 2 vertices with odd degree

Consider a complete graph with the given distance matrix as follows

Trang 26

Figure 2.3: The minimum cost spanning tree

Figure 2.4: The minimum cost spanning tree after adding the matching (1,3)

• If there are more than 2 vertices with odd degree

We need to create a sub-matrix of odd degree vertices Let’s consider another example.Given a complete graph with the given distance matrix as follows

The MCST of this graph is illustrated in the figure 2.5 It is easy to pick out the set

of vertices with odd degree, which is {1, 3, 4, 5} From the given matrix, we obtain thesub-matrix of vertices {1, 3, 4, 5} as follows

Trang 27

Figure 2.5: The minimum cost spanning tree

m1 : {(1, 3), (4, 5)} = 11

m2 : {(1, 4), (3, 5)} = 11

m3 : {(1, 5), (3, 4)} = 12

The smallest value is 11, so we can choose m1 or m2 Suppose take the set of matching

m2 {(1, 4), (3, 5)}, add it to the MCST (see figure 2.6), we obtain the Eulerian cycle

Trang 28

Figure 2.6: The MCST after adding matchings (1,4) and (3,5)

b Goodness

Let L0 be the length of optimal tour, Lh be the length of tour found by using heuristic,

LM CST be the length of the MCST, and LM be the length of minimum weightedmatching

Question Lh

L0

= ?Assume that the triangle inequality holds

• M1: (v1, v2), (v3, v4), · · · , (vm−1, vm)

• M2: (v2, v3), (v4, v5), · · · , (vm, v1)

Trang 30

The smallest cost is 34, so we choose Lh = 34 Observe that we start at Lh = 40and finally get Lh = 34 Hence we have made an improvement It is called adjacentpairwise exchanges.

Step 2 Repeat step 1 with Lh = 34

• If L decrease to L1, then we will accept L1 and we again made an improvement

• If L does not change, then we stop at Lh = 34, and the optimal length is Lh = 34

2.4 Cutting Planes

Assume that we have a polyhedron P, we wish to minimize, among the integer points

of P, a linear objective function Consider a relaxation P0 Since P0 is a relaxation of

P in the sense that every feasible solution of P is a feasible solution of P0, the optimalvalue of P0 provides a lower bound on the optimal value of P If the optimal solution

to P0 is integral, then it is also an optimal solution to P In order to obtain that weuse cutting plane method The main idea of this method is adding inequalities to P ,which does not change the solution An inequality is valid if it does not change the set

of integer feasible solutions to P A valid inequality is a cutting plane if it removes the(non-integer) optimal solution to the relaxation P0 Since solving TSP can be reduced

to solve the integer linear program, we just work with cutting plane method for integerlinear program problem

The knowledge presented in this section is based on the given one in the givenone in [1], [5], [7], [18], [20], and [21]

Trang 31

begins with a linear programming (LP) relaxation (2.14), which is of the form

minimize cTx

such that the polyhedron P defined as {x : Ax ≤ b} contains Ω and is bounded Since

P is bounded, we can find an optimal solution x? of (2.15) such that x? is an extremepoint of P If x? is in Ω then it creates an optimal solution of (2.14), otherwise somelinear inequality is satisfied by the points in Ω and violated by c? Such an inequality

is called a cutting plane or simply a cut In the latter case, we find a non-empty family

of cuts, add them to the system Ax < b, use the resulting tighter relaxation (2.14) inthe next iteration of the procedure

The cutting plane algorithm creates only one new LP, so we just work with onesingle LP at all time This algorithm adds new linear constraints to the LP to cutaway the current non-integer optimal solution An inequality is valid if it does notchange the set of integer feasible solutions to P A valid inequality is a cutting plane

if it cuts off the (non-integer) optimal solution to the relaxation P0 For TSP, we usethe integer linear programming formulation of TSP (see (2.1)) and specially suitablecutting planes Cutting plane method can be summarized as follows

Algorithm 1 Cutting plane algorithm

Given problem P: max {cTx : Ax = b, x ≥ 0, x ∈ Zn}

Let P0 be the relaxation of P: max {cTx : Ax = b, x ≥ 0}

while Optimal solution to P0 is not integral do

Add valid cutting plane to P Let P0 be the relaxation of P

end while

return Optimal solution to P0

In the framework of this thesis, we just focus on finding a valid cutting planes

by using Gomory’s cut which is very efficiently generated from a simplex tableau Let’sconsider the following LP

maximize cTxsubject to Ax = b

x ≥ 0, xi ∈ Z

Trang 32

The method proceeds by first dropping the requirement that the xi are integers andsolving the associated linear programming problem to obtain a basic feasible solution.Geometrically, this solution will be a vertex of the convex polytope consisting of allfeasible points If this vertex is not an integer point then the method finds a hyperplanewith the vertex on one side and all feasible integer points on the other This is thenadded as an additional linear constraint to exclude the vertex found, creating a modifiedlinear programming program The new program is then solved and the process isrepeated until an integer solution is found.

In this method, we use the simplex method to solve a linear program produces a set ofequations of the form

xk+X(b¯aijc − ¯aij)xj = b¯bic − ¯bi, xk ≥ 0, xk∈ Z

Trang 33

Gomory’s cutting plane method can be summarized as follows

Algorithm 2 Gomory’s cutting plane algorithm

Input: An integer program max {cTx : Ax = b, x ≥ 0, x ∈ Zn}

Trang 34

This problem is illustrated in the following figure

7

Trang 35

From the table above the optimal basic for LP-relaxation is B = {1, 2, 5} The solutionfor LP-relaxation is x?B = 20

7 , 3, 0, 0,

237

Trang 36

This cut is used to cut away the non-integer solution as below

We will add one more new slack variable x6 into (2.20) to get the new constraint

12

2From this tableau, the optimal basic the optimal solution for its LP-relaxation are

Ngày đăng: 07/04/2015, 13:13

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w