• Nem Talált Eredményt

New Approach for Travelling Salesman Problem (TSP)

5. OPTIMAL PATH

5.4 New Approach for Travelling Salesman Problem (TSP)

The proposed approach for TSP is based on minimizing the cost of passing through each node, which means minimize the cost of arrival to the node and the cost of departure from it. Connecting these minimum traveling costs for each node should theoretically lead to the required least cost tour (Eleiche and Markus 2010).

A full graph of N nodes (with number of edges equals (N *(N-1)/2) (Gries and Schneider 1993) with edges of equal cost C, the tour cost is (N * C) and there are ((N-1)!) tours satisfying this cost (Bonaydi et al. 2008).

For asymmetric graphs, where Cij ≠Cji, the TSP states that there are ((N-1)!) tours visiting all nodes (each node once) and returning to the origin, but the required is the tour of least cost. This can be achieved by visiting each node with by its least travel cost.

The least travel cost for each node is the sum of the cost of incident edge with minimum cost and cost of outgoing edge with minimum cost.

Ci=min Cincident + min Coutgoing (2) where

Ci is the least travel cost of node i,

Cincident is the edge cost from node k to node i, and Coutgoingis the edge cost from node i to node j.

56 In ideal situations, which is very rare, the aggregation of the sequence of minimum travel cost (nodes: k, i, j) for each node will be the tour with least cost. Consider the following full asymmetric graph with 5 nodes in Table (5.1),

Table (5.1) Cost of edges (Origin-Destination Matrix)

1 2 3 4 5

1 9999 5 10 10 4

2 8 9999 9 15 22

3 14 17 9999 11 1

4 6 28 14 9999 9

5 7 13 14 16 9999

Minimum Cincident for node 1 will be C4,1of edge (4,1) which has the least cost to arrive to node 1, while the minimum Coutgoing of node 1 is C1,5 which has the least cost to move from node 1.

By other words, node 4 is the closet node to arrive to node 1, and node 5 is the closet node to depart from node 1. In order to visit node 1 with minimum cost, we have to start from node 4, then visit node 1, and finally exit to node 5 as shown in Table (5.2).

Table (5.2) Minimum travel cost of each node

Cincident From Node To Coutgoing Ci

6 4 1 5 4 10

5 1 2 1 8 13

9 2 3 5 1 10

10 1 4 1 6 16

1 3 5 1 7 8

31 26 57

From Table (5.2) the sum of Cincident is 31 and the sum of Coutgoing is 26, this means that the least cost tour will exceed 31, and some nodes (node number 2 and 4) have same

57 node as origin and destination which does not conform with TSP definition and it will be adjusted using the second minimum cost as shown in Table (5.3).

Table (5.3) Adjusting minimum travel cost for node 2

Cincident From Node To Coutgoing Ci

5 1 2 1 8 13

13 5 2 3 9 22

5 1 2 3 9 14

13 5 2 1 8 21

The first row is the minimum travel cost for node 2, it is from node 1 to node 2 then exit to node 1 again. As this is not allowed by TSP definition, the second row displays the next lower cost value to incident to node 2 and the second value to exit from node 2, which are from node 5 to node 2 then exit to node 3. The minimum travel cost between combination of the first and second rows in Table (5.3) are compared to compute the minimum which is to start from node 1 to node 2 then exit to node 3. Same procedure will be applied on node 4 also.

Table (5.4) Adjusted minimum travel cost of each node

Cincident From Node To Coutgoing Sum

6 4 1 5 4 10

5 1 2 3 9 14

9 2 3 5 1 10

11 3 4 1 6 17

1 3 5 1 7 8

32 27 59

From the analysis of Table (5.4), the sum of Cincident is 32 and the sum of Coutgoing is 27, this means that the least cost tour will exceed 32.

The solution from incident side is closer to the least cost tour because it has higher cost.

In our case, the “From” column misses node (number 5) and repeated twice incidence from node 3. In this case, node 3 is a source node, which has more than one incidence in

58 the adjusted minimum cost table. Same thing for “To” column where nodes 2 and 4 are missing and nodes 1 and 5 are repeated twice, which means that nodes 1 and 5 are sink nodes. It is also obvious that the solution of incident nodes is closer to required tour since it has only one missing node while the outgoing solution has two missed nodes.

The source node is cheaper to move away from it and sink nodes are cheaper to arrive into it.

The least cost tour is closer to the higher value of the sum of Cincident and Coutgoing, and it can be achieved by substituting the repeated nodes in the “from” column (or in “To”

column in case ( Coutgoing> Cincident) by the missed nodes. From Table (5.4), the following are concluded:

1. Coutgoing = 27

2. Cincident= 32

3. Cincident > Coutgoing 4. Cost of least tour > 32

5. By substituting the repeated nodes (node 3) in “From” by the missed node (node 5), the least solution is achieved.

The required tour will be achieved by connecting the solution from incident side with minimum cost.

Table (5.5) Initial start

Cincident From Node

6 4 1

5 1 2

9 2 3

11 3 4

1 3 5

32

From Table (5.5), the path (4, 1, 2, 3) includes the least travel cost to move from node 4 to node 3. Node 3 has two options: first to return back to node 4 which is not allowed by

59 TSP definition (it was visited before) and the second to move to node 5 which is allowed as shown in Table (5.6).

Table (5.6) First Convergence

Cincident From Node

6 4 1

5 1 2

9 2 3

1 3 5

11 3 4

32

Current solution has least path from node 4 to node 5 and it needs to return back to start node 4, then we have to change last edge to be from node 5 to node 4 as shown in Table (5.7).

Table (5.7) Second Convergence

Cincident From Node

6 4 1

5 1 2

9 2 3

1 3 5

16 5 4

37

The current example has small size N = 5, and by applying the direct solution to calculate the least cost of all tours (total number of tours = (N-1)! = (5-1)! = 24 tours), it was found that the least cost is 37, and the tour is (1,2,3,5,4,1).

The Asymmetric Travelling Salesman problem (ASTP) is the general case for the TSP.

However, the general case with large size sets is hard for exact algorithms (Gutin and Punen 2002). There are varieties heuristic algorithms, and they can be roughly partitioned into two classes: construction heuristics, and improvement heuristics.

Construction heuristics build a tour from scratch and stop when one is produced, while

60 improvement heuristics start from a tour normally obtained using a construction heuristic and iteratively improve it by changing some parts of it at each iteration (Gutin 2003).

The minimum travel cost for each node is a new approach for solving the general case of TSP for the real problem itself (not for an easier problem like cutting-plane), and it does not search for edges with minimum cost like other approaches. This approach focuses on the minimum cost to go through the node (the least incident cost and least outgoing cost) and then determines a level below the lower bound and starts to unify the directions of paths for the minimum travel cost of each node minimizing the TSP total cost.