Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The following subsections describe the important components in table II. The linked nodes are the admissible next nodes to
of the proposed genetic algorithm. the current one in the solution.
The first three row vectors in the sparse command represent depends on the number of nodes in the network. The
source nodes, destination nodes, and equivalent costs MATLAB environment searches the shortest path using
respectively. The MATLAB command graphshortes tpath is Dijkstra's algorithm as the default one. The algorithm is
executed to find the shortest path. This command applies simulated to solve the network of 10 nodes for the first one as
Dijkstra's algorithm as the default one to find the optimal
the source node. Also, the developed GA is simulated to find
solution.
the solution for the same problem. The obtained results
[cost, path, pred] = graphshortestpath(net,1,10) affirmed the potential of the proposed algorithm that gave the
same results as Dijkstra'a algorithm. In the future, the
The obtained solution is: developed GA will be more investigated to decrease the
chromosome length especially for network with a large number
cost =39
of nodes.
path = 1 3 5 7 9 10
pred = 0 1 1 2 3 5 5 6 7 9 REFERENCES
[1] E. W. Dijkst ra, "A Note on T wo Problems in Connexion with
That means; the shortest path from node 1 to node 10 has to Graphs", Numerische Mathematlk l, 269 – 271, l 959.
pass via nodes 3, 5, 7, 9 wit minimum cost 39. The network is [2] T . H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Section
viewed using the following command in MATLAB 24.3: Dijkstra's algorithm. Introduction to Algorithms (Second ed.),
MIT Press and McGraw-Hill, pp. 595–601, 2001.
view(biograph(net,[],'ShowArrows','off','ShowWeights','on [3] E. F. Moore, "T he shortest path through a maze", Proceedings of
')) an International Symposium on the Theory of Switching
(Cambridge, Massachusetts, 2–5 April 1957). Cambridge:
Proposed Genetic Algorithm Harvard University Press, pp. 285–292, 1959.
The MATLAB environment has a very powerful string [4] M. Sniedovich, "Dijkstra’s algorithm revisited: the dynamic
manipulation commands that helps to convert easily the programming connexion". Journal of Control and Cybernetics 35
numeric variables into strings and vice versa. Consequently, (3): 599–620, 2006.
the bit crossover and mutation were so easily to be [5] N. K. Cauvery and K. V. Viswanatha, "Routing in Dynamic
Network using Ants and Genetic Algorithm", Int. J. of Computer
implemented in the developed program. Given the source node
Science and Network Security, Vol. 9 No.3, pp.194-200, March
is 1 and the goal node is 10. The network in Fig. 2 is simulated 2009.
to find the shortest path. The initial population cons ists of 6 [6] B. A. Forouzan, Data Communications and Networking, Fourth
chromosomes 40 bits of each. The probability of crossover was Edition McGraw Hill, 2007.
chosen as 70% and the mutation rate equal to 2.5%. The best [7] N. Selvanathan and W. J. T ee, "A Genetic Algorithm Solution to
results are obtained using two points of crossover. The Solve T he Shortest Path Problem OSPF and MPLS", Malaysian
simulation result after 30 generations is given by: Journal of Computer Science, Vol. 16 No. 1, pp. 58-67, 2003.
[8] J. H. Holland, Adaptation in Natural and Artificial Systems, Ann
Arbor, MI, T he University of Michigan Press, 1975.
1 3 5 5 7 7 7 9 10 10 [9] D. E. Goldberg, Genetic Algorithms in Search, Optimization, and
1 3 5 5 7 7 7 9 10 10 Machine Learning, Addison-Wesley Publishing Company, 1989.
[10] Y. John and R. Langari, Fuzzy Logic: Intelligence, Control, and
1 3 5 5 3 7 7 9 10 10
Information, Prentice-Hall Inc., Ch (17), pp.469-470, 1999.
1 3 5 5 7 7 7 9 10 10 [11] Finding shortest path in a Network using MAT LAB, Available
1 3 5 5 7 7 7 9 10 10 online at http://hubpages.com/hub/Shortest -Path-Routing---
1 3 5 5 7 7 7 9 10 10 Finding-Shortest-Path-in-Network-using-MAT LAB
VI. CONCLUSION
A simple genetic algorithm is developed to find the shortest
path routing in a dynamic network. The developed algorithm
uses an efficient coding scheme. The chromosome length