AN EVOLUTIONARY APPROACH TO FIND THE - DComp

June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
1
AN EVOLUTIONARY APPROACH TO FIND THE SET OF
K-SPANNING TREES WITH LOWEST COSTS IN GRAPHS
WITH FUZZY PARAMETERS
TIAGO A. ALMEIDA∗ and AKEBO YAMAKAMI
School of Electrical and Computer Engineering, University of Campinas,
Campinas, 13081-970, SP, Brazil
E-mail: {tiago,akebo}@dt.fee.unicamp.br
This work proposes an heuristic approach based on evolutionary computation,
whose goal is to find a set of k-spanning trees with lowest costs in graphs that
contain uncertainties in their parameters. In order to avoid the high complex
ordinary resolution, this work presents a genetic approach to explore the space
of solutions looking for satisfactory results, without the necessity of comparing
all possible solutions.
Keywords: Fuzzy Graphs; Fuzzy Sets; Evolutionary Computation; Genetic Algorithm
1. Introduction
Minimum spanning tree (MST) problem shows up in many applications, like
cluster analysis, information storage, among others; and it can be solved by
efficient algorithms, like Kruskal, Prim and Sollin.1 This kind of problem
can be defined as a part of a bigger one, that is to find the set of k-spanning
trees with lowest costs (k-MST).2,3 The attainment of this set of solutions
is necessary when the problem has restrictions or when the interest is to
present good alternative solutions for posterior decision making.
A lot of real world problems have not precise data because their parameters often have uncertain nature. These problems might be solved under
Fuzzy Set Theory.4–6 On fuzzy graph problems, uncertainty can arise either at structure level (nodes, edges) or at parameter level (cost, capacity,
demand).
Many fuzzy graph problems, like fuzzy k-MST problem, are NP-Hard
∗ supported
by CNPq, Brazil
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
2
ones,7 and they frequently have a huge number of possible solutions. It is
impossible solve them using exact algorithms in an feasible time. Hence,
heuristic methods, like evolutionary algorithms, are often used to find satisfactory results.8
In this paper, we propose an heuristic approach based on evolutionary
computation to solve the fuzzy k-MST problem in a reasonable computational time.
2. The Problem and Its Solution
Let G : (N, E) be an undirected graph, where each edge (i, j) ∈ E connecting nodes i and j ∈ N has a cost cij > 0 ∈ IR. Consider a subset
T ∗ ⊆ E connecting every nodes on G which has minimum total cost. As
T ∗ is non-cyclical and connects every nodes on G, T ∗ is the MST of G.1 In
this paper, we intend to find a set of k other trees with high potential to
be as good solution as T ∗ .
In Figure 1 has an example of a graph with crisp structure (without
uncertainties), but its edge costs are not certain. Instead, these parameters
are represented by fuzzy numbers, and membership functions are associated
to edge costs. Figure 2 presents the membership function associated to fuzzy
total cost of MST showed in Figure 1.
Fig. 1.
MST with fuzzy parameters.
Fig. 2.
Membership Function.
Figure 3 presents three other spanning trees obtained from graph showed
in Figure 1.
Note that T ∗ lengths (68,80,93), tree a lengths (70,85,98), b (70,90,103)
and c (95,115,130), their membership function are presented in Figure 4.
There is no way to c be shorter than T ∗ . However, trees a and b have a
possibility of being equal or shorter than mentioned solution.9
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
3
Fig. 3.
Spanning trees obtained from graph showed in Figure 1.
Fig. 4.
Comparison of fuzzy lengths of T ∗ , a, b and c.
3. Theoretical Aspects
Let a graph G : (N, E), where N is the set of nodes and E is the set of
edges, considering that it has a crisp structure, but each edge (i, j) ∈ E has
an associated fuzzy cost cij > 0. Let T the set of all spanning trees of G
P
and two spanning trees T 1 and T 2 ∈ T , with fuzzy total costs ij∈T 2 cij >
P
P
P
4
ij∈T 1 cij , the possibility degree of
ij∈T 2 cij ≤
ij∈T 1 cij is given by:
w = P oss(
X
ij∈T 2
cij ≤
X
cij ) = supi≤j min{µT 1 (i), µT 2 (j)}
(1)
ij∈T 1
Each edge cost of G is represented by a triangular membership function
cij = (ci , cm , cs ). Let T ∗ ∈ T , the MST obtained by crisp graph Gm only
associated to modal costs cm . Hence, T ∗ is the best fuzzy MST that can be
obtained of G.7 So, to find others k > 1 ∈ IN+ spanning trees T k ∈ T with
high possibility degree of having fuzzy total cost smaller or equal to T ∗ , it
is necessary to find all spanning trees T n ∈ T , n = 1 . . . |T | and compare
each one to T ∗ .7,10 The set of solutions Sk composed by k-MST should be
found using possibility degree (Eq. (1)) given by:11
Sk = minT n ∈T {P oss(
X
ij∈T n
cij ≤
X
cij )}
(2)
ij∈T ∗
The necessity of enumerate and compare all possible solutions turns the
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
4
problem a N P -Hard one.7,12,13
Proposition 3.1. Let two triangular normalized fuzzy numbers a =
(ai , am , as ) and b = (bi , bm , bs ), if a ≤ b, then P oss(a ≤ b) = 1.
Proof. From definition of possibility between two fuzzy numbers (Eq. (1)):
P oss(a ≤ b) = sup{min{µa (i), µb (j)}}
If i = am and j = bm , then if am ≤ bm , i ≤ j and so:
µa (i) = µb (j) = 1 ⇒ min{µa (i), µb (j)} = 1
Hence, P oss(a ≤ b) = 1.
By Proposition 3.1, if tree T ∗ , whose smaller modal total cost (cm )T ∗ , is
found, it is the spanning tree with maximum possibility of being the fuzzy
MST of G. This tree can be taken from the crisp graph Gm where each
edge cost cij = (cm )ij .
Proposition 3.2. Let T 0 be the MST of Gm , and let T ∗ be a fuzzy spanning
P
tree of G, which has the same edges of T 0 , with fuzzy total cost ij∈T ∗ cij .
P
P
If T ∗ is the fuzzy MST of G, then w = P oss( ij∈T ∗ cij ≤ ij∈T n cij ) = 1,
where T n is any fuzzy spanning tree from G.
Proof. Suppose that there is a T p with modal total cost (cm )T p , such
P
P
that w = P oss( ij∈T ∗ cij ≤
ij∈T p cij ) < 1. By Proposition 3.1,
(cm )T ∗ ≤ (cm )T p . However, as (cm )T ∗ is the lowest value found for Gm , then
P
(c ) ∗ ≤ (cm )T p , which is a contradiction. Hence, w = P oss( ij∈T ∗ cij ≤
Pm T
ij∈T n cij ) = 1.
4. Genetic Algorithm
This section presents a genetic algorithm as proposed by Holland,8 whose
population is made up of individuals (spanning trees) that evolves through
crossover operators, which generates new individuals, that inherits some
of their parents attributes. While we are looking for the fuzzy set of solution, the measure of adaptation (fitness) is used in a way to enhance the
reproduction success of the most fitted individuals.
Representation: each chromosome represents one spanning tree whose
genes are associated to the graph edges. Thus, a chromosome representing
a spanning tree has m − 1 genes with only integer numbers.
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
5
Initialization: is done by an adaptation of Kruskal algorithm to generate random feasible trees of G. This procedure makes a search around the
base-tree (T ∗ ) to avoid solutions with null possibility degree. Some edges
of T ∗ are random selected and replaced by others to obtain a new spanning
tree and so forth until that the initial population is filled out.
Selection: a roulette wheel method8 is used to randomly pick one or
two individuals from population.
Crossover: two selected parents are joined creating a subgraph Gs . The
child is a random tree obtained from Gs . As this one is randomly-generated,
there is a probability that it has edges from one or from both parents. Thus,
it was designed a local search inside the crossover operator to compute a
pre-defined times the new individual.
Fitness: let a spanning tree T n , its fitness is given by the possibility
degree of T n has its cost smaller than or equal to T ∗ (Eq. (1)), as described
in Sec. 3.
Mutation: it is done by randomly taking n edges from a selected individual and replacing them for other edges belonging to the same cut.
Diversity: a parameter was created to allow an observation of how
population diversity affects the solution set. Population Diversity is defined
as the (dimensionless) ratio between the amount of unique individual and
population size.
5. Main Results
The proposed algorithm was evaluated using all instances extracted from
TSPLIB a . Due to paper limitations, the authors chose the results of two
instances to report b .
All graphs have crisp structure, but each edge is associated to a triangular fuzzy number, as cij = (ci , cm , cs ), where ci = cm − 10% and
cs = cm + 10%.
Implementations were made in MatLab 7 and tests were realized in a
microcomputer with an AMD Athlon 2GHz with 256Mb memory. Following
parameters were used: Population Size = 50; Crossover Rate = 50%; Mutation Rate = 3%; Bi-Classist Preservation = 10% of best and 10% of worst
individuals are preserved in each generation; Number of Best Solutions to
Store = 10.
a TSPLIB
- Travel Salesman Problem Library - http://www.iwr.uni-heidelberg.de/
groups/comopt/soft/ TSPLIB95/TSPLIB.html.
b A set of all results can be found at http://www.dt.fee.unicamp.br/˜tiago/
pesquisas.html (in Portuguese).
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
6
5.1. Swiss Graph
This graph is a complete one and it is composed by 42 nodes and 861 edges.
Thus, the space of solutions has approximately 8.51x1064 candidates.
Main results obtained are shown in Table 1.
Table 1.
Sol.
Fitness
1
2
3
4
5
6
7
8
9
10
1.0000
1.0000
1.0000
0.9954
0.9907
0.9861
0.9861
0.9815
0.9815
0.9815
Swiss graph results.
Fuzzy Total Cost
[971.10
[971.10
[971.10
[972.00
[972.90
[973.80
[973.80
[974.70
[974.70
[974.70
1079.00
1079.00
1079.00
1080.00
1081.00
1082.00
1082.00
1083.00
1083.00
1083.00
1186.90]
1186.90]
1186.90]
1188.00]
1189.10]
1190.20]
1190.20]
1191.30]
1191.30]
1191.30]
Note that, it was found 3 solutions with maximum possibility degree.
Also, other solutions have high possibility (above of 0.98).
About maintenance of population diversity, the genetic algorithm had
a good performance: 50%, in average.
The time spent in each round was 50 seconds, in average. In this time,
595 generations were processed and the number of evaluated solutions has
the superior limit equal to 29,750 spanning trees.
5.2. Berlin Graph
It is a complete graph composed by 52 nodes and 1326 edges, resulting in
a space of solutions with almost 6.81x108 5 candidates.
Table 2 shows main results found.
Though the algorithm had found one fuzzy MST (T ∗ ), all found solutions have high possibility degree (above of 0.98), even that the space of
solutions be a huge one. About maintenance of population diversity, the
genetic algorithm had again a good performance: 50%, in average.
The time spent in each round was 1 minute and 20 seconds, in average.
They were processed 850 generations and the number of evaluated solutions
has the superior limit equal to 42,500 spanning trees. Note that, if an exact algorithm was used to solve this problem, it would be necessary many
millions of years to compare all possible solutions.
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
7
Table 2.
Sol.
Fitness
1
2
3
4
5
6
7
8
9
10
1.0000
0.9985
0.9961
0.9960
0.9952
0.9888
0.9879
0.9873
0.9837
0.9833
Berlin graph results.
Fuzzy Total Cost
[5473.20
[5474.80
[5477.50
[5477.70
[5478.50
[5485.50
[5486.40
[5487.20
[5491.20
[5491.70
6081.40
6083.20
6086.20
6086.30
6087.30
6095.10
6096.10
6096.90
6101.30
6101.80
6689.60]
6691.50]
6694.80]
6695.00]
6696.00]
6704.60]
6705.70]
6706.70]
6711.50]
6712.10]
6. Conclusions
This work had presented an evolutionary algorithm based on fuzzy sets4,5
and possibility theory6 to find the k-MST for graphs with fuzzy parameters.
Experiment results shown that proposed algorithm found satisfactory
solutions in reasonable time, and it had a good performance on the space
of solution exploration without to let down population diversity.
References
1. R. K. Ahuja, T. L. Magnati and J. B. Orlin, Network flows : Theory, Algorithms and Applications (Prentice-Hall, 1993).
2. M. S. Bazaraa, J. J. Jarvis and H. F. Sherali, Linear Programming and Network Flows, 2 edn. (John Wiley & Sons, 1990).
3. P. Berbert, L. Freitas Filho, T. Almeida, M. Carvalho and A. Yamakami,
Artificial immune system to find a set of k-spanning trees with low costs
and distinct topologies, in Artificial Immune Systems, , Lecture Notes in
Computer Science Vol. 4628 (Springer, 2007) pp. 395–406.
4. D. Dubois and H. Prade, Fuzzy Sets and Systems (Academic Press, 1980).
5. L. A. Zadeh, Information and Control 8, 338 (1965).
6. L. A. Zadeh, Fuzzy Sets and Systems 1, 3 (1978).
7. M. T. Takahashi, Contributions to the study of fuzzy graphs: Theory and
algorithms, PhD thesis, School of Electrical and Computer Engineering, University of Campinas, (Brazil, 2004). (In Portuguese).
8. J. H. Holland, Adaptation in Natural and Artificial Systems, 2 edn. (MIT
Press, 1992).
9. M. P. Blue, B. W. Bush and J. Puckett, Fuzzy Sets and Systems 125, 355
(2002).
10. T. Almeida, F. Prado, V. Sousa, M. Takahashi and A. Yamakami, A genetic
algorithm to solve the mininum spanning tree problem with fuzzy parameters
using possibility measure, in Proceedings of the 24th North American Fuzzy
June 11, 2007
15:14
WSPC - Proceedings Trim Size: 9in x 6in
FTT-39
8
Information Processing Society’s Conference (NAFIPS’05), (Ann Arbor, MI,
USA, 2005).
11. S. Okada, Interactions among paths in fuzzy shortest path problems, in Joint
9th IFSA World Congress and 20th NAFIPS International Conference, (Vancouver, Canada, 2001).
12. T. Almeida, A. Yamakami and M. Takahashi, An evolutionary approach to
solve minimum spanning tree problem with fuzzy parameters, in Proceedings of the 3rd International Conference on Computational Intelligence for
Modelling, Control and Automation (CIMCA’05), (Vienna, Austria, 2005).
13. T. Almeida, A. Yamakami and M. Takahashi, Pesquisa Operacional 27, 131
(2007).