You are on page 1of 6

(IJCNS) International Journal of Computer and Network Security, 103

Vol. 2, No. 2, February 2010

Integration of Metaheuristic Algorithms for


Minimum Spanning Tree
R.Thamilselvan1, Dr.P.Balasubramanie2
1
Assistant Professor, Department of Computer Science and Engineering,
Kongu Engineering College, Perundurai, Erode 638 052, Tamilnadu, India
r_thamilselvan@yahoo.co.in
2
Professor, Department of Computer Science and Engineering,
Kongu Engineering College, Perundurai, Erode 638 052, Tamilnadu, India
pbalu_20032001@yahoo.co.in

minimum spanning tree algorithm [10] is shown in table 1


Abstract: This paper presents a new algorithm based on
integrating Tabu Search (TS), Simulated Annealing (SA) and
Genetic Algorithms (GA) for solving minimum spanning tree A
problem. This proposed integration method is a general kind of 7
solution method that orchestrates the interaction between local 2 2
improvement procedures and higher level strategies to create a 5 4 D 5
process that is capable of escaping from local optima and B
O T
performing a robust search of a feasible region. This paper 4 1 3 1
applies Tabu Search, Simulated Annealing and Genetic 7
algorithm for minimum spanning tree problem and compares C 4
the results obtained by each. With the implementation of our E
approach the minimum spanning tree problem is solved with
feasible solution.
Figure 1. Network with nodes are connected
Keywords: Tabu Search, Simulated Annealing, Genetic
Algorithm, Minimum Spanning Tree. Table 1: Algorithm for Minimum Spanning Tree

1. Introduction 1. Select a node arbitrarily, and then connect it.


2. Identify the unconnected node that is closest to a
There are two cases in minimum spanning tree [12], an connected node, and then connect these two nodes.
undirected and connected network is being considered, Repeat this step until all nodes have been connected.
where the given information includes some measure of the 3. Tie breaking: Ties for the nearest distinct node or
positive length (distance, cost, time etc.) associated with the closest unconnected node may be broken
each link. The problem has to choosing a set of links that arbitrarily, and the algorithm must still yield an
have the shortest total length among all sets of links that optimal solution.
satisfy a certain property. For the minimum spanning tree
problem, the required property is that the chosen links must To apply the algorithm in Table 1 to the Network in
provide a path between each pair of nodes. The minimum Figure 1. Keep the arbitrarily select node O to start. The
spanning tree problem can be summarized as follows. unconnected node closest to node O is node A. Connect
node A to node O. Repeat the algorithm, then we will get
i. There are set of nodes of a network but not the links. the spanning tree in Figure 2.
Instead, you are given the potential links and the
positive length for each if it is inserted into the
network. A
ii. To design the network by inserting enough links to
satisfy the requirement that there be a path between 2 2
every pair of nodes. D 5
B
iii. The objective is to satisfy this requirement in a way O T
1 3 1
that minimizes the total length of the links inserted
into the network.
C
E
A network with n nodes required (n-1) links to provide a
path between each pair of nodes. No extra links should be Figure 2. Minimum Spanning Tree
used, since this would needlessly increase the total length of
the chosen links. The links need to be chosen in such a way The minimum spanning tree problem is the one
that the resulting network forms a spanning tree. The basic problem that falls into the broad category of network design.
104 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 2, February 2010

2. Related Work constraints must be observed when choosing the links to


include in the network.
2.1 Tabu Search
Constraint 1: Link AD can be included only if link DE also
Tabu Search [1] [2] is a widely used metaheuristic that included.
uses some common sense ideas to enable the search process
to escape from a local optimum. Any application of tabu Constraint 2: At most one of the three links AD, CD and
search includes as a subroutine a local search procedure that AB can be included.
seems appropriate for the problem being addressed. The To take the constraint into account is to charge a huge
process begins by using this procedure as a local penalty, such as charge a penalty of 100 if constraint 1 is
improvement procedure in the usual way to find a local violated and charge a penalty of 100 if two of the three links
optimum. A key strategy of tabu search is that is then specified in constraint 2 are included.
continues the search by allowing non improving moves to
the best solutions in the neighborhood of the local optimum.
Once the point is reached where better solutions can be B
found in the neighborhood of the current trial solution, the
local improvement procedure is reapplied to find a new local 30 30
optimum. The danger with this approach is that after
moving away from a local optimum, the process will cycle 10 5
A C E
right back to the same local optimum. A tabu list records
these forbidden moves, which are referred to as tabu moves.
25
2.1.1 Basic Tabu Search Algorithm 15 40
Initialization: Start with a feasible initial trial solution D

Iteration: Use an appropriate local search procedure to


Figure 3. Data for a Minimum Spanning Tree before
define the feasible moves into the local neighborhood [5] of
choosing the links to be included in the network
the current trial solution. Eliminate from consideration any
move on the current tabu list unless that move would result B
in a better solution than the best trial solution found so far.
Determine which of the remaining moves provides the best 30 30
solution. Adopt this solution as the next trial solution,
regardless of whether it is better or worse than the current 10 5
A C E
trial solution. Update the tabu list to forbid cycling back to
what has been the current trial solution. If the tabu list
already had been full, delete the oldest member of the tabu 25
list to provide more flexibility for future moves. 15 D 40
Stopping rule: Use some stopping criterion, such as a Figure 4. Optimal solution for a Minimum Spanning
fixed number of iterations [7], a fixed amount of CPU time, Tree
or a fixed number of consecutive iterations without an
improvement in the best objective function value. Also stop The Figure 4 shows the desired minimum spanning tree,
at any iteration where there are no feasible moves into the where the dark lines represent the links that have been
neighborhood of the current trial solution. Accept the best inserted into the network with a total cost of 50. This
trial solution found on any iteration as the final solution. optimal solution [8] is obtained by the greedy algorithm.
The method to conduct tabu search is follows.
The basic idea behind tabu search is that, adding short-term
memory to local search, improves its ability to locate optimal Local Search Procedure: At each iteration, choose the best
solutions. It is an is an iterative search that starts from some immediate neighbor [6] of the current trial solution that is
initial feasible solution [8] and attempts to determine the best not ruled out by its tabu status.
solution in the manner of a hill-climbing algorithm.
Neighborhood structure: An immediate neighbor of the
2.1.2 A Minimum Spanning Tree Problem with current trial solution is one that is reached by adding a
Constraints single link and then deleting one of the other links in the
Figure 3 shows a network with five nodes, where the cycle that is formed by the addition of this link.
dashed lines represent the potential links that could be Form of tabu moves: List the links that should not be
inserted into the network and the number next to each deleted
dashed line represents the cost associated with inserting that
particular link. Thus, the problem is to determine which Addition of tabu move: At each iteration, after choosing
four of these links should be inserted into the network to the link to be added to the network, also add this link to the
minimize the total cost of these links. The following tabu list.
(IJCNS) International Journal of Computer and Network Security, 105
Vol. 2, No. 2, February 2010

Maximum size of tabu list: Two Add link BE to the network shown in Figure 5, the
automatically place this added link on the tabu list. Delete
Stooping rule: Stop after three consecutive iterations
link AB from the network shown in Figure 5. Various
without an improvement in the best objective function value.
options for adding a link and deleting a link in iteration 2
In Figure 4 both constraints are violates, so that penalties of are shown in Table 3.
100 need to be imposed twice. Therefore the total cost of
Table 3: The options for adding a link and deleting another
this solution is
link in iteration 2
Cost = 20+10+5+15+200 = 250
Add Delete Cost
Iteration 1: There are three options for adding a link to the AD DE (Tabu move)
network in Figure 4 are BE, CD and DE. If BE were to be AD CD 85+100=185
chosen, the cycle formed, so the three options for deleting a AD AC 80+100=180
link would be CE, AC and AB. If CE were to be deleted, the BE CE 100+0=100
change in the cost would be 30-5=25 with no change in the BE AC 95+0=95
constraint penalties, so the total cost would increase from BE AB 85+0=85 (Minimum)
250 to 275. So that iteration 1 is followed as per Table 2. CD DE 60+100=160
CD DE 95+100=195
Table 2: The options for adding a link and deleting another
link in iteration 1 Iteration 3: The following are the decisions are made in
this iteration.
Add Delete Cost
BE CE 75+200=275 Add a link CD to the network shown in Figure 6, and then
BE AC 70+200=270 automatically place this added link on the tabu list. Delete
BE AB 60+100=160 link DE from the network shown in Figure 6. Various
CD AD 60+100=160 options for adding a link and deleting a link in iteration 3
CD AC 65+300=365 are shown in Table 4.
DE CE 85+100=185
DE AC 80+100=180 B
DE AD 75+0=75 (Minimum)
30 30
The final output of the iteration 1 in a network is shown in
Figure 5. 10 5
A C E
B
25
30 30 15 40
D
A 10 C 5 E
Figure 7. Modified network after Iteration 3 with optimal
solution cost=70
25
15 40 Table 4: The options for adding a link and deleting another
D link in iteration 3
Figure 5. Modified network after Iteration 1 with new Add Delete Cost
cost=75
Iteration 2: In the second iteration the following decisions AB BE (Tabu move)
are made. AB CE 100+0=100
AB AC 95+0=95
B AD DE 60+100=160
AD CE 95+0=95
30 30 AD AC 90+0=90
CD DE 70+0=70 (optimal solution
10 5 CD CE 105+0=105
A C E
With a well designed tabu search algorithm, the best trial
solution found in Figure 7 after the algorithm has run a
25
modest number of iterations is likely to be a good feasible
15 40
D solution. It might even be an optimal solution [1], [2] but no
such guarantee can be given. Selecting a stopping rule that
Figure 6. Modified network after Iteration 2 with new provides a relatively long run of the algorithm increases the
cost=85 chance of reaching the global optimum.
106 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 2, February 2010

2.2 Simulated Annealing happens to inherit the better features of the parents is
Simulated annealing [1]-[5] is another widely used slightly more likely to survive into adulthood and then
metaheuritic that enables the search process to escape from become a parent who passes on some of these features to the
a local optimum. Each iteration of the simulated annealing next generation. The population tends to improve slowly
search process moves from the current trial solution to an over time by this process. A second factor that contributes to
immediate neighbor in the local neighborhood of this this process is a random, low-level mutation rate in the
solution, just as for tabu search. However, the difference DNA of the chromosomes. Thus, a mutation occasionally
from tabu search lies in how an immediate neighbor is occurs that changes the features of a chromosome that a
selected to be the next trial solution. Let child inherits from a parent.

Zc = objective function value for the current trial solution 2.3.1 Basic Genetic Algorithm
Zn = objective function value for the current candidate to be Initialization: Start with an initial population of feasible
the next trial solution. trial solutions, perhaps by generation then randomly.
T = a parameter that measures the tendency to accept the
Iteration: Use a random process [5] that is biased toward
current candidate to be the next trial solution if this
the more fit members of the current population to select
candidate is not an improvement on the current trial
some of the members to become parents. Pair up the parents
solution.
randomly and then have each pair of parents give birth to
The rule for selecting which immediate neighbor will be the two children whose features are a random mixture [10] of
next trial solution is the following. the features of the parents, except for occasional mutations.
Evaluate the fitness for each new member in the new
Move Selection rule: Among all the immediate neighbors
population.
of the current trial solution [9], select one randomly to
become the current candidate to be the next trial solution. Stopping rule: Use some stopping rule, such as a fixed
Assuming the objective is maximization of the objective number of iterations, a fixed amount of CPU time, or a fixed
function, accept or reject this candidate to be the next trial number of consecutive iterations without any improvement
solution as follows: in the best trial solution found so far. Use the best trial
solution fond on any iteration as the final solution.
If Zn ≤ Zc, always accept this candidate
If Zn < Zc, accept the candidate with the following 3. Proposed Work
probability
The new algorithm based on integrating genetic
Zn − Zc algorithms, tabu search and simulated annealing methods to
Prof {acceptance} = e where x =
x
T solve the minimum spanning tree problem. The core of the
proposed algorithm is based on tabu search algorithms.
Genetic algorithm is used to generate new population
2.2.1 Basic Simulated Annealing Algorithm members in the reproduction phase of the tabu search
Initialization: Start with a feasible initial trial solution. algorithm. Simulated annealing method is used to accelerate
the convergence of the tabu search algorithm by applying
Iteration: Use to move selection rule to select the next the simulated annealing test for all the population members.
trial solution. A new implementation of the tabu search algorithm is
Check the temperature schedule: When the desired introduced. In the genetic algorithm part of the proposed
number of iterations has been performed at the current value algorithm, a simple short-term memory procedure is used to
of T, decrease T to the next value in the temperature counter the danger of entrapment at a local optimum, and
schedule and resume performing iterations at this next the premature convergence of the tabu search algorithm. A
value. simple cooling schedule has been implemented to apply the
simulated annealing test in the algorithm [3]-[5].
Stopping rule: When the desired number of iterations
have been performed at the smallest value of T in the 3.1 Basic Integration Algorithm
temperature schedule as final solution. Initialization: Start with a feasible trial solution.
2.3 Genetic Algorithms Iteration: Use an appropriate local search procedure to
Genetic algorithms [1]-[3] provide a third type of define the feasible moves into the local neighborhood [6] of
metaheuristic that is quite different from first two. This type the current trial solution. Determine which of the remaining
tends to be particularly effective at exploring various parts moves provides the best solution. At the same time Use the
of the feasible region and gradually evolving toward the best move selection rule to select the next trial solution. For each
feasible solutions. The modern field of genetics provides a iteration invoke the algorithm to test the cycles in a graph.
further explanation of this process of evolution and the
Stopping rule: If a pre-defined termination condition
natural selection involved in the survival of the fittest. In
is satisfied, output Best Solution and exit.
any species that reproduces by sexual reproduction, each
offspring inherits some of the chromosomes from each of 3.1.1 Algorithm for testing Cycles
the two parents, where the genes within the chromosomes
determine the individual features of the child. A child who
(IJCNS) International Journal of Computer and Network Security, 107
Vol. 2, No. 2, February 2010

Step 1: From the combination of edges and incidence Step 3: Test whether at least three nodes of degree more
matrix, obtain degree of each node contributed by the edges than one? If not go to step 5.
under consideration. Step 4: Delete pendant edges, if exists of n-1 edges and
Step 2: Test whether at least two nodes of degree one? If modify the degree of the modes accordingly and go to step 2.
not, go to step 6. Otherwise continue. Otherwise go to step 6.

Table 6: Comparisons of TS, GA, SA and Integration Algorithm for Spanning Tree
Graph TS GTA SA Integration Algorithm
size (No.
of Time(s) Cost Iteration Time(s) Cost Iteration Time(s) Cost Iteration Time(s) Cost Iteration
Nodes)
5 50 75 3 52 75 3 55 75 4 50 75 2
7 55 80 3 54 80 4 55 80 4 48 80 2
9 58 95 3 57 90 3 60 90 4 52 90 2
11 65 100 4 68 100 3 75 110 5 60 95 1
13 70 120 4 75 120 4 78 120 5 60 115 1

Figure 8. Comparisons of TS, GA, SA and Integration Algorithm for Spanning Tree

Step 5: Edge combinations are tree. The final output of the iteration 1 in a network is shown in
Step 6: Stop. Figure 9. Well defined tabu search algorithm [2], the best
trial solution found after the algorithm has run a modest
Iteration 1: Instead of charge a penalty for the constraint,
the constraint should be verified for every change in the number of iterations is likely to be a good feasible solution
graph. There are three options for adding a link to the [8]. But the integration algorithm found the feasible solution
network in Figure 4 are CD, DE and DE. If CD were to be in only little iteration from the starting.
chosen, the cycle formed, so the two options for deleting a
link would be AD and AC. If AD is added then AB should B
be deleted according to the second constraint. So that for
connecting B, BE should be added. So that iteration 1 is 30 30
followed as per Table 5.
10 5
Table 5: The options for adding a link and deleting another A C E
link in iteration 1
25
Add Delete Cost 15 40
D
BE CE 75
BE AC 70
Figure 9. Modified network after Iteration 1 with new
BE AB 60
Constraints violated. cost=70
CD AD 60
CD AC 65
CD AB 70 4. Experiments and Results
DE CE 85 Five testing graphs of the size 5, 7,9,11 and 13 nodes. All
DE AC 80 Constraints violated.
the five graphs are generating a parse tree using tabu search,
genetic algorithm, simulated annealing and integration
108 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 2, February 2010

algorithm. All the algorithm were stopped when the Annealing”, Operation Research, Vol. 40, pp. 113-
solutions 125, 1992.
did not change over a fixed number of iterations. The [7] K. Aggarwal and R. D. Kent, “An Adaptive
relative performance between TS, GTA, SA and Integration Generalized Scheduler for Grid Applications”, in
algorithm for the minimum spanning tree problem is given Proc. of the 19th Annual International Symposium on
in Table 6 and Figure 8. Five trials were taken on each High Performance Computing Systems and
graph and the average value of the cost and time in Applications (HPCS’05), pp.15-18, Guelph, Ontario
milliseconds are tabulated in each case. It is evident from Canada, May 2005.
the table that Integration algorithm performed very well as [8] Anant Oonsivilai, Wichai Srisuruk, Boonuruang
the problem size increased and showed superliner speedups Marungsri and Thanatchai Kulworawanichpong,
at higher problem sizes. “Tabu Search Approach to Solve Routing Issues in
Communication Networks”, World Academy of
5. Conclusion and Future Work Science, Engineering and Technology, pp. 1174-
1177, 2009.
In this paper, we have implemented an integration of [9] D.Janaki Ram, T.H.Steenivas and K.Ganapathy
all the three metaheuristics [5] algorithms for minimum Subramaniam, “Parallel Simulated Annealing
spanning tree problem. In this approach, a pre-defined Algorithms”, International journal of Parallel and
number of starting solutions are chosen from widely Distributed Computing, Vol.37,pp. 207-212, 1996.
separated regions in the sample space, and used in [10] D.Janakiram, “Grid Computing”, A Research
local search procedures to obtain a set of locally optimal Monograph, Tata McGraw-Hill Publishing Company
solutions. These locally optimal solutions [9] [10] are Limited, 2005.
then examined to provide an idea about the probability [11] Bernard Chazelle, “A Minimum Spanning Tree
of each vertex being included in an optimal solution Algorithm with Inverse Ackermann Type
to the instance. Using these ideas, the neighborhood Complexity”, Journal of the ACM, 47(6), pp. 1028-
of each solution is searched in a probabilistic manner, 1047, 2000.
such that the moves excluding vertices that have a [12] Sanjay Kumar Pal, “Renovation of Minimum
high probability of being in an optimal solution or of Spanning Tree Algorithms of Weighted Graph”,
including vertices that have a low probability of being Journal of ACM Ubiquity, Vol.9, Issue 7, pp. 1-5,
in an optimal solution are discouraged. Experiment 2008.
result shows that the integration of metaheuristics [13] Greening, Daniel R., “Parallel Simulated Annealing
provides a feasible solution [11] if the numbers of nodes Techniques”, Physica D, Vol.42, pp. 293-306,1990.
are increased in a graph. In future based on this result [14] Van Laarhoven, P.J.M., E.H.L., AArts, and Jan Karel
this may be extended for feasible dynamic routing in a Lenstra, “Job Shop Scheduling by Simulated Annealing”,
network. Operation Research, Vol. 40, pp. 113-125, 1992.

References Authors Profile


[1] R.Thamilselvan and Dr.P. Balasubramanie, “A Genetic
Algorithm with a Tabu Search (GTA) for Travelling R.Thamilselvan is an Assistant Professor in the department of
Salesman Problem”. International Journal of Recent computer Science and Engineering, Kongu Engineering College,
Perundurai, Tamilnadu India. He has completed his M.E Computer
Trends in Engineering, Issue. 1, Vol. 1, pp. 607-610,
Science and Engineering in 2005 under Anna University Chennai.
June 2009. He has completed 8 years of teaching service. He has published 3
[2] R.Thamilselvan and Dr.P. Balasubramanie, papers in national conference and 2 paper in International Journal.
“Integrating Genetic Algorithm, Tabu Search He was the recipient of the Best Faculty award during the year
Approach for Job Shop Scheduling” International 2007-2008. His area of interest includes Grid Computing, Parallel
Journal of Computer Science and Information Processing, and Distributed Computing. He has organized 2
Security, Vol. 2, No.1, pp. 134-139, 2009 national level seminar sponsored by AICTE, New Delhi.
[3] Jingjing Zhang, Yaohui Jin and Wsisheng Hu, “A Dr.P.Balasubramanie is a Professor in the department of
Genetic Algorithm for Smooth Scheduling in Slotted computer Science and Engineering, Kongu Engineering College,
WDM Network”, International Journal of Information Perundurai, Tamilnadu India. He was awarded junior research
Technology, Vo. 12, No. 6, pp.26-34, 2006. Fellowship by Council of Scientific and Industrial Research
[4] S.Jayalakshmi and S.P. Rajagopalan, “Modular (CSIR) in 1990 and he has completed his Ph.D degree in 1990
Simulated Annealing in Classical Job Shop under Anna University in 1996. He has also qualified for the state
Scheduling”, International Journal of Information Level Eligibility test for Lectureship in 1990. He has completed 13
years of teaching service. He has published more than 60 articles
Technology, Vol. 6, No.2, pp. 222-226, 2007.
in International/National Journals. He has authored six books with
[5] N.K.Cauvery and Dr. K.V Viswanatha, “Routing in the reputed publishers. He was the recipient of the Best Faculty
Dynamic Network using Ants and Genetic award for consecutively two years. He is also the recipient of the
Algorithm”, International Journal of Computer CTS Best Faculty Award- 2008. He has guided 3 Ph.D scholars
Science and Network Security, Vol. 9, No. 3, pp. 194- and 23 research scholars are working under his guidance. His area
200, March 2009. of interest includes Image processing, data mining, networking and
[6] Van Laarhoven, P.J.M., E.H.L., AArts, and Jan Karel so on. He is a member of Board of studies, Anna University
Lenstra, “Job Shop Scheduling by Simulated Coimbatore. He has organized several seminar/workshops.

You might also like