Tải bản đầy đủ (.pdf) (5 trang)

DSpace at VNU: A novel particle swarm optimization - Based algorithm for the optimal communication spanning tree problem

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (374.35 KB, 5 trang )

2010 Second International Conference on Communication Software and Networks

A Novel Particle Swarm Optimization – based Algorithm for
the Optimal Communication Spanning Tree Problem
Anh Tuan Hoang, Vinh Trong Le

Nhu Gia Nguyen

Department of Mathematics – Mechanics - Informatics
Hanoi University of Science, Vietnam
{hoangtuananh, letrongvinh}@hus.edu.vn

Faculty of Information Technology
Duy Tan University, Vietnam


Abstract — In this paper, we propose a novel approach for the
optimal communication spanning tree (OCST) problem. Our
algorithm is based on the Particle Swarm Optimization (PSO)
technique and take account into node biased encoding (NBE)
scheme to find nearly optimal solution. The new algorithm can
achieve a result that is better than known heuristic algorithms
do, as verified by a set of public benchmark problem instances.
Figure 1. The distant matrix of Palmer’s 6-nodes instance

Keywords — Optimal Communication Spanning Tree, Node
Biased Encoding, Particle Swarm Optimization.

I.
INTRODUCTION
The problem of finding optimal communication spanning


tree was introduced by Hu in 1974 [1]. Its NP- hard property
was shown by Johnson et al [2]. The formal definition of this
problem is below.
Figure 2. The requirement matrix of Palmer’s 6-nodes instance

Let G = (V, E) is an undirected weighted graph, in which V
is set of n vertices; E is set of m edges. Moreover, let D =
(dij)nxn and R= (rij)nxn be the distant matrix and requirement
matrix of the graph G, respectively. For any pair of nodes i and
j in V, dij is the weight of the edge (i,j) and is infinite if not; rij
is the communication requirement between them. Both R and
D are all symmetric and their elements are nonnegative. In this
context, each spanning tree T of G has a cost w(T) which is
total of the weighted of paths over all pairs of vertices in T. In
general, w(T) is computed by following equation:

Z 7




The cost of the tree T in Fig3.a is compute as below:
w(T) = r12.d12 + r13(d12+ d23) + r14(d12+ d24) +
+ r15(d12+ d25+ d45) + r16(d12 + d24 + d46) +
+ … + r56(d54+d46)

(5)

= 817626


(1)

T

where pij denotes the distant between node i and node j on the
tree T. Let {i=v1, v2, …, vk=j} be the path between node i and j
in the tree T, then pijT is calculated by the following equation:

pijT =

(2)

(a)

The function f is defined as the product of two variables:
f(rij,pijT) = rij.pijT

Figure 3. Two communication spanning tree (a) of Palmer’s 6-nodes

(3)

For this instance, the optimal solution is given in Fig3.b
with the minimum cost is 693180.

The objective function is then:
minimizeT‚ w(T)

It is important to note that the OCST problem is far more
different from the minimum spanning tree problem, which is
already solved by several polynomial algorithms (such as Prim

[5] and Kruskal). Moreover, there are several variations of this
problem when the form of the distant matrix D or the
requirement matrix R changes. More information can be found
in [6].

(4)

where ‚ is the set of nn-2 labeled spanning tree of G [3]. We
take the Palmer’s 6-nodes instance from [4] as an example to
clear out the definition.
Example 1: The Palmer’s 6-nodes instance.
The distant matrix and requirement matrix are given below:
978-0-7695-3961-4/10 $26.00 © 2010 IEEE
DOI 10.1109/ICCSN.2010.111

(b)

232


A. Previous work
Due to its large application, there are lots of research on
OCST problem, from both exact and heuristic approaches.
Authors in [1] defined the problem and discussed two simplest
cases. The NP- hard property of the problem was showed [2]
and Reshef showed that the problem is even a MAX SNP –
hard one, which cannot be solved by a polynomial
approximation algorithm unless P = NP [6]. Therefore,
heuristic optimization methods have been chosen by
researchers to find optimal or nearly optimal solutions for the

OCST problems. One of the first heuristic approaches was
presented by Ahuja and Murty, which is closes to local search
methods. Palmer, in his PhD thesis [8], proposed a genetic
algorithm (GA) using the node and link biased encoding that
will be clearly descript in section II. From the same approach,
Li and Bouchebaba proposed another GA which works on a
tree chromosome without intermediate encoding and decoding
[9]. This GA uses a Prim – based algorithm to randomly
generate the initial population and performs better than the
former one. Some other GAs using variants of Prufer numbers
were proposed, such as Picciotto [10], Julstrom [11, 12]...
However, Jens Gottlieb stated that Prufer numbers based
chromosome presentations are not good for constrained
spanning tree optimization problems [13]. After all, from
statistical view, Rothlauf argued that good solution for the
OCST are biased towards minimum spanning trees [14].

to move away from its neighbors if they are too close. Second,
each particle steers towards the average heading of its
neighbors. And the third, each particle tries to go towards the
average position of its neighbors. Kennedy and Eberhart
generalized these properties to be an optimization technique as
below.
Consider the optimization problem P. First, we randomly
initiate a set of feasible solutions; each of single solution is a
“bird” in search space and called “particle”. All of particles
have fitness values which are evaluated by the fitness function
to be optimized, and have velocities which direct the flying of
the particles. The particles fly through the problem space by
following the current optimum particles. The better solutions

are found by updating particle’s position. In every iteration,
each particle is updated by following two "best" values. The
first one is the best solution (fitness) it has achieved so far.
(The fitness value is also stored.) This value is called pbest.
Another "best" value that is tracked by the particle swarm
optimizer is the best value, obtained so far by any particle in
the population. This best value is a global best and called gbest.
When a particle takes part of the population as its topological
neighbors, the best value is a local best and is called lbest
After finding the two best values, the particle updates its
velocity and positions with following equation: (6.a) (which
use global best gbest) or (6.b) (which use local best lbest) and
(7).

B. This work
Our main contributions are as follows: We present a new
method of finding optimal solution for OCST problem. In our
methods, PSO technique [15] is employed to reduce search
space mentioned above but still converge to a global good
solution; the NBE schema is used to represent candidate
solutions. Our approach outperforms Palmer’s and Li and
Bouchebaba’s GAs in not only final solution but also
computation time.

v[ ] = v[ ] + c1* rand() * (pbest[ ] - present[ ]) +
+ c2 * rand() * (gbest[ ] - present[ ])
v[ ] = v[ ] + c1* rand() * (pbest[ ] - present[ ]) +
+ c2 * rand() * (lbest[ ] - present[ ])
present[ ] = persent[ ] + v[ ]


The rest of the paper is organized as follows. The main
concepts of PSO are presented in section II.A. The NBE
schema is described in section II.B. We present our method in
section II.C. Section III presents some experimental results. We
make conclusion and recommend some future works in section
IV.

(6.a)

(6.b)

(7)

In those above equation, rand() is a random number
between 0 and 1; c1 and c2 are cognitive parameter and social
parameter restectively.
PSO Algorithm
{For each particle
Initialize particle
EndFor
Do
For each particle
Calculate fitness value
If the fitness value is better than the best fitness value
(pBest) in history
Set current value as the new pBest
EndIf
EndFor
Choose the particle with the best fitness value of all the
particles as the gBest (or Choose the particle with the best

fitness value of all the neighbors particles as the lBest)
For each particle
Calculate particle velocity according to (6.a) (or (6.b))

II. PARTICLE SWARM OPTIMIZATION FOR
SOLVING GRAPH COLORING PROBLEM
A. Particle swarm optimization
Particle swarm optimization is a stochastic optimization
technique developed by Dr. Eberhart and Dr. Kennedy [15],
inspired by social behavior of bird flocking or fish schooling. It
shares many similarities with other evolutionary computation
techniques such as genetic algorithms (GA). The algorithm is
initialized with a population of random solutions and searches
for optima by updating generations. However, unlike the GA,
the PSO algorithm has no evolution operators such as the
crossover and the mutation operator. In the PSO algorithm, the
potential solutions, called particles, fly through the problem
space by following the current optimum particle. By observing
bird flocking or fish schooling, we found that their searching
progress has three important properties. First, each particle tries

233


Update particle position according to (7)
EndFor
While (stop condition is true)}
The stop condition mentioned in the above algorithm can
be the maximum number of interaction is not reached or the
minimum error criteria are not attained.


Figure 5. The modified distant matrix of temple graph in example 2

B. Node Biased Encoding
The node biased encodings is among the class of weighted
linear chromosome representation for spanning tree
optimization problems. Its original version was developed by
Palmer [8]. In this scheme, each spanning tree is encoded by
assigning every nodes and link on graph to a corresponding
weight. The details of encode and decode phases are given
below.

Figure 6.

Spanning tree computed in example 2

1) Represent and decode a particle: We use NBE scheme
to represent particles. Each particle is a vector with n
components; every component is a real number corresponds to
one in n vertices. To decode a particle we do exactly steps
described in previous section.
2) Initiate population: As mentioned in section I.A, good
solution for the OCST problem are biased towards minimum
spanning trees, we initiate a particle corespond to the
mininmum spanning tree one. This particle is the vector whose
components are all zero. Others n specially initiated particles
are of the form {1, 1, ...,1, 0, 1, 1, ...,1}. Those particle
corespond to star – shaped trees. This is motivated by the fact
that a star –shaped tree is the optimal solution for a special
case [1]. All others P-(n+1) are vectors whose components are

real numbers between 0 and 1 which are randomly generated
(P is a designed parameter).
3) Fitness function: If the jth particle results a solution cost
cj, then the fitness value of this paritcle is computed with
following equation:
(9)
Fj = 1/cj

1) Encode phase: Each spanning tree T of graph G = (V,
E) is represented by a n – components real vector b = (b1, b2,
…,bn). Remind that n is the cardinant of V. b is now called the
weighted vector.
2) Decode phase: Take two following steps to calculate
spanning tree T correspond to the weighted vector b.
a) Step 1: Construct the temple graph G’ = (V, E) with
modified distant matrix D’ = (dij)nxn computed as below
equation:
d’ij = dij + P2(bi+bj) dmax
(8)
where dmax = maxij(dij) and P2 is the node biased parameter
which controls the node weights on the tree construction
b) Step 2: Calculate T as the minimum spanning tree of
temple graph G’ by using Prim algorithm.
Note that, by running Prim algorithm, nodes i with low bi will
probably be interior nodes, and on the otherhands, nodes j
with high bj will probably be leaf nodes. Therefore, the higher
the weight bi, the higher is the probability that node i will be a
leaf node. We take the example below to illustrate the
functionality of the NBE scheme.
Example 2: NBE scheme

Let G is a 5-nodes complete graph with distant matrix D
given in Fig.4

4) Stop condition: The stop condition we used in this
paper is defined as the maximum number of interaction Ngen
(Ngen is also a designed parameter).
D. The complexity
In this section, we compute the complexity of the above
algorithm. To initiate the population size P, we have to
randomly generate a matrix with P rows and n columns. So, the
complexity of initiate phase is O(P.n). It’s clear that the
population updating has also the complexity of O(P.n). In
particle decoding, the complexity of Step 1 is O(n2), and in Step
2, we use Prim algorithm, so the complexity of this step is also
O(n.log(m)) since we use min heap and adjacent list in
implementation. Therefore, the total complexity of our
algorithm with P particles and Ngen generations is
O(Ngen.P.max{n2, nlog(m)}) = O(n2).

Figure 4. The distant matrix of graph in example 2

Then the modified distant D’ correspond to vector b = (0.7,
0.5, 0.8, 0, 1) and parameter P2 = 1 is given in Fig.5 and by
running the Prim algorithm we get the tree in Fig.6
C. Solving the OCST problem base on PSO
In this section, we present application of PSO technique for the
OCST problem. Without loss of generality, we can assume that
G is undirected complete graph. Our new algorithm is
described as follows.


III. EXPERIMENT RESULTS
In order to measure the performance, we use a set of
standard benchmark instances. They are 6 nodes (Palmer6),
12nodes (Palmer12) and 24 nodes (Palmer24) networks from

234


Palmer; 10 nodes (Raidl10), 20 nodes (Raidl20), 50 nodes
(Raidl50, Raidl50gen) networks from Raidl and 6 nodes
(Berry6) networks from Berrry. These instances can be found
in [4]. The node biased parameter is set to 1 and the parameters
for the PSO are set as below:

In the future, we will test our algorithm on more problem
instances, both from literature and real world. We will also try
find out a better encoding scheme and adapt our method to
other problems.
ACKNOWLEDGMENT

x Population size P = 1000
x Maximum number of interaction Ngen = 500
x Cognitive parameter c1 = 1
x Social parameter c2 = 1
x Update population according to (6.b) and (7) with number
of neighbor is K = 3

This research is partly conducted as a program for the QT09-03 and TN-09-03 in Funds for Science and Technology by
the Vietnam National University.
REFERENCES

[1] Hu, T.C, Optimum Communication Spanning Trees,

SIAM Journal of Computing, 3(3), 188–195 (1974)

Note that: the author of [16] recommended that the local best PSO is better
than a global one and this is verified by us.

[2] Garey

M. R., Johnson D. S., Computers
Intractability: A Guide to the Theory of
Completeness, W.H. Freeman, 1979

We run our algorithm on those above instances and compare
to the results produced by Palmer’s GA and Li and
Bouchebaba’s GA in Table 1. All three algorithms were
implemented in C++ and run on a workstation with AMD
Athlon™ 64X2 Dulal Core – 2.30 GHz processor and 2GB
RAM.

TABLE I.

[3] A. Cayley, A theorem on trees, Quart. J. Math. 23 (1889),

376–378.
[4] Franz

Rothlauf, Representations for Genetic and
Evolutionary Algorithms, Springer, Heidelberg New
York, 2nd Edition, 2006


[5] Thomas H. Cormen, Charles E. Leiserson, Ronald L.

RESULTS FOR STANDARD BENCHMARK INSTANCE
Palmer' GA

Li & Bouchebaba's
GA

and
NP-

Rivest, Clifford Stein. Introduction to Algorithms, Second
Edition. MIT Press and McGraw-Hill, 2001.

PSO

[6] Bang Ye Wu. Kun-Mao Chao, Spanning Trees and

Instance

Optimization Problems, Chapman & Hall/CRC, 2004

Cost

Time

Cost

Time


Cost

Time

Palmer6

709770

6.88

708090

5

693180*

4.1

Palmer12

3876488

35.53

3457952

24.7

3428509*


22

Palmer24

1959790

229.67

10866568*

162

1138360

143

communication cost spanning, trees and related problems.
Master’s thesis, Feinberg Graduate School of the
Weizmann Institute of Science, Rehovot 76100, Israel.

14

[8] Palmer C. C, An approach to problem in network design

*

*

Raidl10


58352

22.21

53674

15.93

53674

Raidl20

165788

138.5

157570*

97.3

157570*

87.3

Raidl50

911987

1883.09


134931

1350

107746

1178

Raidl50gen

123013

1883.86

964140

1351

826499

1177

Berry6

534

*

6.8


534

*

5.74

534

*

[7] Reshef, E. (1999, April). Approximating minimum

using genetic algorithms, PhD Thesis, Polytechnic
University, Computer Science Department, Brooklyn,
New York, 1994
[9] Li, Y., & Bouchebaba, Y, A new genetic algorithm for the

4.6

optimal communication spanning tree problem,
Proceedings of Artificial Evolution: Fifth European
Conference (pp. 162–173). Berlin, Springer, 1999.

(An entry marked by a star (*) denotes a optimal solution)

[10] Picciotto, S, How to encode a tree, Ph. D. thesis,

For Palmer series, we have the two optimal solutions
(Palmer6 and Palmer12). For Raild series, we have the same

two optimal solutions (Raild10 and Raild20) with Li &
Bouchebaba’s. In other instances (Raidl50 and Raidl50gen),
we also have better solution than Palmer’s and Li &
Bouchebaba’s. The last instance (Berry6), all three algorithms
result optimal solution. However, ours still the fastest.
IV.

University of California, San Diego, USA, 1999.
[11] Julstrom, B. A. The blob code: A better string coding of

spanning trees for evolutionary search. In A. S. Wu (Ed.),
Proceedings of the 2001 Genetic and Evolutionary
Computaton Conference Workshop Program, San
Francisco, California, USA, pp. 256–261, 2001.
[12] Julstrom, B. A. The blob code is competitive with edge-

CONCLUSION AND FUTURE WORK

sets in genetic algorithms for the minimum routing cost
spanning tree problem. In Beyer, Hans-Georg et al. (Ed.),
Proceedings of the Genetic and Evolutionary
Computation Conference 2005, New York, pp. 585–590,
ACM Press, 2005.

In this paper, we present a novel PSO-based algorithm to
solve the OCST problem in which the each particle is encode
using NBE scheme. The experiments results show that the
proposed algorithm is effective to get optimal and near
optimal solution in term of final solution cost and running
time.


[13] Gottlieb, J., B. A. Julstrom, G. R. Raidl, and F. Rothlauf,

Pr¨ufer numbers: A poor representation of spanning trees

235


[15] J. Kennedy and R. Eberhart, Swarm Intelligence, Morgan

for evolutionary search,Proceedings of the Genetic and

Kaufmann Publisher Inc, 2001

Evolutionary Computation Conference (GECCO2001): 343–350. 2001

[16] M. Clerc, A method to improve Standard PSO ,Technical
Report, />
[14] Rothlauf, F., J. Gerstacker, and A. Heinzl (2003). On the

optimal communication spanning tree problem. Technical
Report 15/2003, Department of Information Systems,
University of Mannheim.

236



×