the neural network approach for the shortest path planning

6
The Neural Network Approach for the Shortest Path Planning Problem Valentin Dimakov Department of Computers and Mechanics, Brest polytechnic institute, Moscowskaja 267, 224017 Brest, BELARUS E-mail: [email protected], [email protected], Fax: +375 162 42 21 27, Phone: +375 162 42 10 81 Abstract This paper describes the neural network solving the shortest path planning problem. It consists of the layer set, where each layer forms a path-candidate for the fixed number of cities. During competition the layer-winner determining the sequence order of cities in the shortest path is selected. In this paper the ex- perimental results obtained by the neural network are described in comparison with some known methods solving the same problem. 1: Introduction The classical problem of combinatorial optimiza- tion is the problem about the shortest path [1]: let we have n cities, where two of them are fixed. The goal of this problem is to find the simple shortest path be- tween two these cities. Certainly, the problem solution is the chain of cities forming the shortest path. Thus it is necessary to define their sequence, i.e. a position of each city in the path. The classical approach of the path representation is the arrangement of cities on a matrix n·n as it is shown on a Figure 1, where each city of A..E can have different positions in the shortest path, i.e. 1..4. Thus this scheme allows uniquely de- fining the cities-participants and their places in the path. If two cities are fixed then they have the first and the last place in the path correspondingly. Hence we have three-dimensional nature of the problem: at first we have to define the place of each city in the shortest path, and secondly, the number of cities forming the shortest path can be in the range from 2 to n. There are very interesting and efficient ap- proaches solving this problem like famous Dijkstra's algorithm [2] and dynamic programming method [3]. But they are oriented only on solution of the problem on numerical computers. The development of neural network technique is oriented on different technologi- cal basis allowing creating efficient systems for differ- ent applications. A B C D E 1 2 3 4 Figure 1. The possible scheme of the arrangement of cities in the path between cities “C” and “A”. There is also a possibility to solve this problem using the neural network technique like the Hopfield's neural network [4]. The solution using the neural net- work like that is enough difficult and it is defined by a weight matrix as follows [5]:

Upload: others

Post on 07-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Neural Network Approach for the Shortest Path Planning

The Neural Network Approach for the Shortest Path Planning Problem

Valentin Dimakov

Department of Computers and Mechanics,Brest polytechnic institute, Moscowskaja 267,

224017 Brest, BELARUSE-mail: [email protected], [email protected],

Fax: +375 162 42 21 27, Phone: +375 162 42 10 81

Abstract

This paper describes the neural network solvingthe shortest path planning problem. It consists of thelayer set, where each layer forms a path-candidate forthe fixed number of cities. During competition thelayer-winner determining the sequence order of citiesin the shortest path is selected. In this paper the ex-perimental results obtained by the neural network aredescribed in comparison with some known methodssolving the same problem.

1: Introduction

The classical problem of combinatorial optimiza-tion is the problem about the shortest path [1]: let wehave n cities, where two of them are fixed. The goal ofthis problem is to find the simple shortest path be-tween two these cities. Certainly, the problem solutionis the chain of cities forming the shortest path. Thus itis necessary to define their sequence, i.e. a position ofeach city in the path. The classical approach of thepath representation is the arrangement of cities on amatrix n×n as it is shown on a Figure 1, where eachcity of A..E can have different positions in the shortestpath, i.e. 1..4. Thus this scheme allows uniquely de-fining the cities-participants and their places in thepath. If two cities are fixed then they have the first andthe last place in the path correspondingly. Hence wehave three-dimensional nature of the problem: at firstwe have to define the place of each city in the shortestpath, and secondly, the number of cities forming theshortest path can be in the range from 2 to n.

There are very interesting and efficient ap-proaches solving this problem like famous Dijkstra'salgorithm [2] and dynamic programming method [3].But they are oriented only on solution of the problemon numerical computers. The development of neuralnetwork technique is oriented on different technologi-cal basis allowing creating efficient systems for differ-ent applications.

A B C D E

1

2

3

4

Figure 1. The possible scheme of the arrangementof cities in the path between cities “C” and “A”.

There is also a possibility to solve this problemusing the neural network technique like the Hopfield'sneural network [4]. The solution using the neural net-work like that is enough difficult and it is defined by aweight matrix as follows [5]:

Page 2: The Neural Network Approach for the Shortest Path Planning

( ) ( ) ( )( )( ) ( ) ( )( ) ( )( )( )( ) ( ) ( )

AaiAaAi

jijiABABBaAb

jiiBaijABAB

AaAbABijABBb

AbijijABABij

ijAbBbAbjiBaAaAiBj

U

C

T

βδδαδ

δδδχδδ

θδδδθδδδ

δδδθδδδ

δθδδηδδγδ

δβδδβδδδδαδ

−−=

+−−−−

−−−+−

∗−−−−−−∗

∗−−−−−−

−+−−=

−+

+

1

11

11

11

,111*

*211]1*

12[111

1211

2

(1)

where

=

=otherwise

jiif,0

,1δ (2)

The difficult here is to define constant parametersα,β,γ,η,θ and χ. In this paper the simpler neural net-work approach solving efficient this problem is con-sidered. On basis of the problem condition the generalarchitecture of the proposed neural network is defined(Figure 2).

1 layerst

2 layernd

3 layerrd

4 layerth

5 layerth

Figure 2. The architecture of the neuralnetwork for the problem solution of 5 cities.

2: The neural network architecture

Generally the neural network consists of n layers,where n is a total number of cities. The first layer se-lects the best variant of paths-candidates, which areoffered by the remaining layers. The second layerforms the path-candidate consisting of two cities; thethird one forms the path-candidate consisting of threecities etc.; and, at last, the nth layer forms the path-candidate consisting of n cities, where two of them are

fixed. At least one path-candidate of n-1 offered mustexist for successful solution.

The structure of the first layer is shown on a Fig-ure 3.

Shortest path selection indicators

Tij

DLAYER1 DLAYER2 DLAYER3 DLAYER4

PL1 PL2 PL3 PL4

Figure 3. The structure of the first layer.

It is the single-layer relaxation competing neuralnetwork determining the neuron-winner having theoutput value equal to "1", and the all-remaining neu-rons have output value equal to "0". As input value foreach neuron the value describing length of each of-fered path is used. The braking and self-exciting con-nections Tij interconnect the neurons among them-selves. Their weight values are follows:

( )

+−

== otherwisem

jiifTij ,1

1 , 1

(3)

where m is a network dimension. The iterative processof such neural network is described as:

iLAYERi DPl )0( = (4)

( ) ( )

∗=+ ∑

=

m

jjiji tPlTfntPl

1

1 , (5)

where

≥≤

=otherwisex

xifxif

xfn,

1 , 10 , 0

)( (6)

Here DLAYERi is a parameter describing a length of pathformed by other layer.

During an iterative process one of neurons be-comes the winner determining the best path.

The important components of the neural networkare the layers forming the paths-candidates consistingof different number of cities, i.e. 2,3,..,n (Figures 4 and7). Hence the neural network has a pyramidal form.

The schema of such layer is similar to the schemeof the city arrangement in the path (Figure 1). Hereeach neuron has a set of braking Tij and exiting Wij

connections. The braking connections determine state

Page 3: The Neural Network Approach for the Shortest Path Planning

when only one neuron can remain active in the eachcolumn and in the each row. Their weight factors aredetermined as:

( )

+−

== otherwisen

kiifT ik ,1

2 , 0

1 (7)

( )

+−

== otherwisep

jiifT ij ,1

2 , 0

2 (8)

where n is a number of neurons in the row, and p is anumber of neurons in the column.

Tij

Xup2/2

Wij

Xup2/1

Figure 4. The structure of the layer forming thepath-candidate: a connecting schema of neuronsby the braking and by the exiting connections.

The formation of the shortest path in each layer iscarried out according to the weight factors of exitingconnections Wij defined a priori:

=

== otherwised

jiifWW

ij

ijij ,1 , 0

1/21/1 , (9)

12/22/1 == ijij WW (10)

where dij is a distance between ith and jth cities, W1ij is aconnection weight factor between a neuron of kth rowand a neuron of (k-1)th row, W2ij is a connection weightfactor between a neuron of kth row and a neuron of(k+1)th row correspondingly. The weight factors W1ij

and W2ij are the same for all rows of the layer. Thus thefirst and the last row of the layer does not have theexiting connections between themselves.

Each layer has two sorts of neurons: intermediateneurons are placed on intermediate rows of the layer(Figure 5) and final neurons are placed on the first and

on the last row of the layer (Figure 6). Both sorts ofneurons have a complex structure allowing formingthe path-candidate in appropriate conditions for eachlayer.

Y

Yup Ydn

Xup1/1

Xup1/2

Xup2/1

Xup2/2

XupN/1

XupN/2

Xdn1/1

Xdn1/2

Xdn2/1dn2/2X

XdnN/1

XdnN/2

T1

T(N -1)*(P -1)

Q1

Q2

QN

Q1

Q2

QN

up

up

up

dn

dn

dn

PL

Figure 5. The scheme of the intermediate neuralelement.

The intermediate neuron (Figure 5) has two low-connected subsystems. Each of them obtains the in-formation through exiting connections from neurons ofthe previous row and propagates it on the next row.Thus, the information propagates through each neuronboth "top-down" and "down-top". The intermediateneuron contains two competing neural networksworking similar to the neural network of the first layer(Figure 3). Their input values Xi are formed by productof output values of neurons of the previous row Yup(dn)

on appropriate weight factor W1(2)ij.

Y

Ydn(up)

Xdn(up)1/1

Xdn (up)1/2

Xdn(up)2/1dn(up)2/2X

Xdn (up)N/1

Xdn(up)N/2

I

B

R Q1

Q2

QN

PL

Page 4: The Neural Network Approach for the Shortest Path Planning

Figure 6. The scheme of the final neural element.

Thus, the dynamical process of the work of thecompeting neural network of a left part of the neuron(Figure 5) can be described as follows:

( )upi

upi

upi

i

XXX

Y

2/1/

2/ 1

10

+= (11)

( )

∗=+ ∑ tYTfntY

jjiji )1( (12)

It is continued till the stable state when only one neu-ron remains active. After that we can obtain weight ofpath consisting of neurons of the previous rows of thelayer:

=+=

otherwise

Yif

XXXQ

i

upi

upi

upiup

i

, 0

1 ,1

1

2/1/

2/ (13)

The dynamical process for the right part of theneuron is the same.

The information for the subsequent rows of thelayer is formed as follows:

∑=n

i

dniup QY (14)

∑=n

i

upidn QY (15)

After definition of activity of each neuron in thelayer it is necessary to define in fact the path-candidatefor the layer. For this purpose the rules are definedwhen only one neuron remains active in each row andin each column. Such state is defined by the relaxationneural network higher level. Equations (7) and (8)describe the weight factors of braking connections.The dynamical process of work is described for theneuron of ith row and jth column as follows:

( )

+=

dnup

ij

YYfnY

111

0 (16)

( ) ( )( )

( ) ( )

+

+=+

tYtYT

tYT

fntYfntY

ij

p

sissj

n

kkjik

ijij

,

21

2

1(17)

where

=otherwise

yifxyxfn

,05.0 ,

),(2 (18)

The output value YΩ of each neuron is a part ofthe final solution of the neural network. It specifiesactivity of a neuron of the selected layer and it is de-termined as follows:

=

=Ω otherwisePifY

Y L

,01 ,

(19)

where PL is signal acting from the first layer. It deter-mines the layer-winner.

In comparison with the intermediate neuron thefinite neuron (Figure 6) contains only one relaxationnetwork and an element forming a value B describingthe length of the generated path. The work of the finiteneural element can be described as:

∑=n

iiQR (20)

IYY dnup == )( (21)

=

=othewise

YifRB

,01 ,

(22)

Here I is an initialization value defined as:

=

otherwiselayerrow of the

last thest and in in the firctivefixed as aa city is if

I

,0

,1

(23)

At the end of the process forming the path in eachlayer the special elements form the value DLAYER char-acterizing the length of the generated path (Figure 7).

Y Y Y Y BYΩ

DLAYER

M

S SS S

Page 5: The Neural Network Approach for the Shortest Path Planning

Figure 7. The schema of formation of the LAYER

value.

It is determined as follows:

∑=i

kik YS (24)

∏=k

kSM (25)

== ∑otherwise

MifBD

n

ii

LAYER

, 0

1 ,(26)

where k is a row index in the layer and M indicates thesuccessful formation of the path-candidate in the layer.

The total number of neural elements of the neuralnetwork is:

122

123

1

−+=−

∗= ∑ nn

niTn

(27)

However the n layers is too much for the shortestpath problem solution because ratio between the num-ber of cities forming the shortest path and the totalnumber of cities is quite little. Therefore we can re-duce a number of layers by the following way:

[ ] nnE ,12min +×= (28)

3: Simulation and results

It was carried out the simulation of this neuralnetwork solving the shortest path problem on the se-quential personal computer with processor IntelPentium II-350 under control of the Windows NT v4.0operating system. The modeling algorithm has beenoptimized for sequential computer to reduce the com-putation time. The model of the neural network wastested on solution of 4 sorts of tasks: 5, 15, 50 and 100cities. The solution average time presented in secondsis shown in the Table 1 in comparison with other twofamous methods for each sort of tasks.

ÒTable 1.

Size of the problem(a number of cities)Simulation method

5 15 50 100

Dynamicprogramming method

0 0 0 0

Dijkstra's algorithm 0 0 0 0The neural network 0 0,02 1,58 22,03

As obvious from the Table 1 the model of theneural network works slower than pure numerical al-gorithms because it simulates analogue processes.Nevertheless it has formed good solutions for all 4sorts of tasks (for example, see results in the Table 2for the map presented on a Figure 8).

4: Conclusion

The neural network solving the shortest pathproblem is presented. It is used in the system formingthe global route map during the motion in the un-known environment. The neural system has difficultpyramidal structure allowing forming simple shortestpath to control efficiently by a mobile robot motion.This paper describes the architecture of such neuralnetwork. The experimental results have shown effec-tiveness of the proposed model.

Figure 8. An example of the map of 50 cities.

Table 2.Dynamic programming method Dijkstra's algorithm Neural networkTask

num. Solution Pathlength

Solution Pathlength

Solution Pathlength

1 23-28-29-33-37-49-47-46 213 23-27-26-32-34-37-49-47-46 209 23-27-26-32-34-37-49-47-46 2092 30-31-25-16-15-8-4 158 30-31-25-16-15-8-4 158 30-31-25-16-15-8-4 1583 35-24-40-41-14-9-3 125 35-24-40-41-14-9-3 125 35-24-40-41-14-9-3 1254 23-28-29-33-37-49-48-44 195 23-22-21-19-17-16-15-14-43-44 190 23-22-21-19-17-16-15-14-43-44 190

Page 6: The Neural Network Approach for the Shortest Path Planning

5 45-12-43-42-50-37-30 179 45-12-43-42-50-37-30 179 45-12-43-42-50-37-30 1796 17-16-40-41-42-49 119 17-16-40-41-42-49 119 17-16-40-41-42-49 1197 2-9-14-43-42-50-37 132 2-9-14-43-42-50-37 132 2-9-14-43-42-50-37 1328 11-10-13-8-15-16-25-31 177 11-10-13-8-15-16-25-31 177 11-10-13-8-15-16-25-31 1779 28-29-33-37 102 28-29-33-37 102 28-29-33-37 102

5: Acknowledgements

The given work is carried out within the frame-work of the project INTAS-BELARUS-97-2098 "In-telligent neural system for autonomous control of amobile robot". The author thanks European Union forthe informational and financial support.

References

1. Michael R. Garey and David S. Johnson. Comput-ers and intractability// San Francisco, Bell Tele-phone Laboratories, Inc., 1979.

2. Dijkstra E.W. "A note on two problems inconnexion woth graphs", NumerischeMathematik, 1:269-271, 1959.

3. Bellman R. "On a routing problem", Quarterly ofAp-plied Mathematics, 16(1):87-90, 1958.

4. Lestor R., Ford, Jr., and D.R. Fulkerson. Flows inNetworks, Princeton University Press, 1962.

5. Ahuja R.K., Mehlhorn K., Orlin J.B., and R.E.Tarjan. "Faster algorithms for the shortest pathproblem". Technical report 193, MIT OperationsResearch Cen-ter, 1988.

6. Gabow H.N., and R.E. Tarjan. "Faster scalingalgo-rithms for network problems", SIAM Journalon Com-puting, 18(5): 1013-1036, 1989.

7. Zhan F.B. "Three Fastest Shortest PathAlgorithms on Real Road Networks: DataStructures and Proce-dures", Journal ofGeographic Information and Deci-sion Analysis,1(1), 69-82, 1997.

8. J.J. Hopfield and D.W. Tank. Collective compu-tation with continuos variable// Disordered sys-tems and Biological organization, Springer-Verlag, 1986, pp. 155-170.

9. I.I. Melamed. Neural network and combinatorialoptimization// In Proceedings of the 16th IFIPConf. Syst. Model Optim., Compieqne, France,1993, pp. 537-542.