You are on page 1of 6

IEEE - 31661

Enhancement of Coarse- Grained Parallel Genetic Algorithm for shortest path Routing
L.Venkatesan
PG (Scholar) Department of EEE

Dr.P.sivakumar
Professor Department of ECE SKP Engineering College slvenkatesanme@gmail.com

Abstract In general efficient way of routing method is used to transfer the data. This routing problem is solved by using Different types of routing algorithms, here we use Coarse-Grained Parallel GA-Based shortest path algorithm. Time computation is the vital parameter in all routing methods. The very shortest path routing algorithm involves reduce time of the transferring data. Using genetic algorithm we can find an efficient path. This algorithm found by using the nature of the genetic operation. Genetic algorithm is used to change the genes from one sub- population to another sub- population in a proper manner. In this paper discussion is going through both simple genetic algorithm and Parallel genetic algorithm and compares performance of both. Here Migration strategy is used to replace the genes. There are four types of strategies that are used to change the genes. These are: Best replace Worst, Best replace Random, Random replace Random, Random replace Worst, Random replace Random. Among these four types of Strategies worst replace best gives the better performance. Index Terms Simple Genetic Algorithm, Parallel Genetic Algorithm, Shortest Path routing, Genes crossover. I. INTRODUCTION

the field of routing in any type of wireless networks. These nature-inspired algorithms have several advantages over the traditional link-state or distance- vector routing algorithm is more robust in an environment where the network parameters can easily change. These advantages make these natureinspired algorithms attractive to be used in wireless and mobile environment such as a mobile ad-hoc network (MANET). The simple and parallel Genetic algorithms use similar parameters to find path. But the way of comparing genes are different. The PGA is fast enough by comparing Simple genetic algorithm. Because Simple genetic algorithm compares genes one by one, on the other hand PGA Compares all the genes placed in the given chromosome structure. The performance of GA- Based shortest path algorithm can vary depending on the choice of GA parameters used in the algorithm. There are many parameters in GA that can be fine tuned to get an optimum result such as the fitness function, population size, maximum iteration, the selection scheme, crossover rate and mutation rate. With Coarsegrained PGA, there is another GA operation involved called migration. In implementing migration, there are two GA parameters that need to be considered. These two types of parameters meters are the migration rate and the migration strategy. Migration rate specifies how often migration is to be performed, while migration strategy defines how the genes involved in the migration operation.

Routing in a computer network refers to the task of finding II. SERIAL GENETIC ALGORITHM a path from the source node to the destination node. Given a The genetic algorithm is a probabalistic search algorithm large network, it is very likely that there is more than one path for each source-destination pair. The task of a routing that iteratively transforms a set (called a population) of algorithm is to find the least-cost path among all the paths mathematical objects (typically fixed-length binary character available for a particular source-destination pair. There are two strings), each with an associated fitness value, into a new types of routing algorithm used in the Internet nowadays, population of offspring objects using the Darwinian principle of which are the link-state routing algorithm and the distance- natural selection and using operations that are patterned after vector routing algorithm. Even though the link-state and naturally occurring genetic operations, such as crossover and distance vector routing algorithms are well-established in the mutation. Internet, the quest for shortest-path routing algorithm is far from over. In recent years, there are many researchers who Probablistic Steps for SGA: came up with new shortest path routing algorithms that are a. The initial population is typically random based on nature-inspired optimization techniques such as b. Probabilistic selection based on fitness genetic algorithm, neural networks, particle swarm optimization and ant colony optimization. These type of shortest path finding approaches are used in different algorithms to improve 4th ICCCNT 2013
July 4-6, 2013, Tiruchengode, India

IEEE - 31661

c. d. e. f. g.

Best is not always picked Worst is not necessarily excluded Random picking of mutation and crossover points Often, there is probabilistic scenario as part of the fitness measure Mutation is performed finally to find finast path

These Seven steps are performed to find best shortest in serial genetic algorithm. The same basic steps are used in parallel genetic algorithm with additional. A .Initial Population: The algorithm begins by creating a random initial population, as shown in the following figure.

The algorithm selects a group of individuals in the current population, called parents, who contributetheir genesthe entries of their vectorsto their children. The algorithm usually selects individuals that have better fitness values as parents. You can specify the function that the algorithm uses to select the parents in the Selection function field in the Selection options. The genetic algorithm creates three types of children for the next generation:

a.

Elite children are the individuals in the current generation with the best fitness values. These individuals automatically survive to the next generation. Crossover children are created by combining the vectors of a pair of parents. Mutation children are created by introducing random changes, or mutations, to a single parent.

b.

c.

The following schematic diagram illustrates the three types of children.

Figure (1.a) Elite Child

Figure (1) create initial population In this example, the initial population contains 20 individuals, which is the default value of Population size in the Population options. Note that all the individuals in the initial population lie in the upper-right quadrant of the picture, that is, their coordinates lie between 0 and 1, because the default value of Initial range in the Population options is [0;1]. If you know approximately where the minimal point for a function lies, you should set Initial range so that the point lies near the middle of that range. For example, if you believe that the minimal point for Rastrigin's function is near the point [0, 0], you could set Initial range to be [-1;1]. However, as this example shows, the genetic algorithm can find the minimum even with a less than optimal choice for Initial range. B. Calculation of Fitness value: At each step, the genetic algorithm uses the current population to create the children that make up the next generation.

Figure (1.b) Crossover Child Fi Figure (1.c) Mutate Child C. Crossover children: The algorithm creates crossover children by combining pairs of parents in the current population. At each coordinate of the child vector, the default crossover function randomly selects an entry, or gene, at the same coordinate from one of the two parents and assigns it to the child. For problems with linear constraints, the default crossover function creates the child as a random weighted average of the parents.

4th ICCCNT 2013 July 4-6, 2013, Tiruchengode, India

VENKATESAN: ALGORITHM

COARSE-GRAINED

PARALLEL

IEEE - 31661 GENETIC

A. Introduction to Parallel Genetic Algorithm GA is generally able to find good solutions in reasonable amount of time. However, as they are applied to harder and bigger problems, there is an increase in the time required to find adequate solutions. As a consequence, there have been multiple efforts to make GA faster and one of the promising options is to use parallel implementation.

Figure (2) crossover The above figure (2) shows the children of the initial population, that is, the population at the second generation, and indicates whether they are elite, crossover, or mutation children. D. Mutation Children: The algorithm creates mutation children by randomly changing the genes of individual parents. By default, for unconstrained problems the algorithm adds a random vector from a Gaussian distribution to the parent. For bounded or linearly constrained problems, the child remains feasible. Finally Serial Genetic algorithm creates best path by using fitness values of each genes. That the serial genetic algorithm compares parent genes in a serial manner so it creates computation time is higher.

Figure (3) General outline of PGA In PGA, there are multiple computing nodes. The task of each computing node depends on the type of parallel GA used. There are four major types of PGAs which are masterslave GA, coarse-grained GA, fine- grained GA and hierarchical hybrids. In master-slave PGA, one computing node will be- come the master and the other computing nodes will be- come the slaves. The master node will hold the population and perform most of the GA operations. However, the master can assign one or more computing intensive tasks to the slaves. This is done by sending one or more chromosomes to the slaves and the master would then wait for the slaves to return their results. In coarse-grained PGA, the population is divided among the computing nodes and each computing node executes GA on its own sub-population. To ensure that good solutions can be spread to other nodes, the nodes can occasionally, with certain probability, exchange chromosomes with each other. This exchange is called migration and it involves a node sending a chosen chromosome to other nodes. The other nodes would then replace a chromosome in their population with the one received. Which node is chosen to be migrated or replaced would depend on the migration strategy used. Coarse-grained PGA has the highest level of parallelism among the four types of PGAs. In Coarse-grained PGA, each computing node only has a single chromosome. The computing nodes are normally arranged in a spatial structure where each node can only communicate with several neighboring nodes. The population would be the collection of all the chromosomes in each node. To execute a genetic operation, a computing node will have to interact with its neighbors.

III.

PARALLEL GENETIC ALGORITHM

GA is a multipurpose search and optimization algorithm that is inspired by the theory of genetics and natural selection. The problem to be solved using GA is encoded as a chromosome that consists of several genes. The solution of the problem is represented by a group of chromosomes referred to as a population. During each iteration of the algorithm, the chromosomes in the population will undergo one or more genetic operations such as crossover and mutation. The result of the genetic operations will become the next generations of the solution. This process continues until either the solution is found or a certain termination condition is met. The idea behind GA is to have the chromosomes in the population to slowly converge to an optimal solution. At the same time, the algorithm is supposed to maintain enough diversity so that it can search a large search space. It is the combination of these two characteristics that makes GA a good search and optimization algorithm. The general outline of GA is shown in Figure 3.

4th ICCCNT 2013 July 4-6, 2013, Tiruchengode, India

4
IEEE - 31661

Since the neighborhood overlaps, eventually the good traits of a superior individual can spread to the entire population. Coarse-grained GA has a large communication overhead due to the high frequency of interactions between neighboring nodes. The final type of PGA is the hierarchical hybrid which is structured in two levels. For example, at the higher level, the algorithm operates as a coarse-grained GA while at the lower level the algorithm operates as a fine-grained GA. A hierarchical PGA combines the benefits of its components and it has better potential than any of the single implementation of the algorithm alone. B. Coarse-Grained PGA: Coarse-grained parallel GAs are suited for massively parallel computers and consist of one spatially-structured population. Selection and mating are restricted to a small neighborhood, but neighborhoods overlap permitting some interaction among all the individuals (see Figure 4 for a schematic of this class of GAs). The ideal case is to have only one individual for every processing element available.

where, Sn represents the sub-population size of the nth node, P represents the total population size and N represents the total number of computing nodes. D. Fitness Function: Each chromosome in the population is associated with a fitness value that is calculated using a fitness function. This value indicates how good the solution is for a particular chromosome. This information is then used to pick the chromosomes that will contribute to the formation of the next generation of solution. The fitness function used in the proposed algorithm is defined as follows: (2) where, fi represents the fitness value of the ith chromo-some and ci represents the total cost of the path represented by the ith chromosome. This would give a higher fitness value for shorter paths. E. Selection: Selection is used to choose the parent chromosomes for the crossover operation. The selection scheme used in the algorithm is the pair wise tournament selection with tournament size, s = 2. In this selection scheme, a parent for the crossover operation is selected by randomly choosing two chromosomes from the population. The one with the higher chromosome between the two will be selected as a parent. To select two parents, this operation is performed twice. F. Crossover: Crossover is performed on the two parent chromosomes selected using the selection scheme described above. Crossover is only performed if one or both chromosomes chosen have not yet mated. To ensure that the paths generated by the crossover operation are still valid paths, the two chromosomes selected must have at least one common node other than the source and destination nodes. If more than one common node exists, one of them will be randomly chosen with equal probability. The chosen node is called the crossover point. For example, assume that we have the following parent chromosomes: Parent chromosome 1 = [A B C G H I X Y Z] Parent chromosome 2 = [A K L M I T U Z] where, A and Z are the source node and destination node respectively. In this example, the common node is node I. Therefore, crossover operation will exchange the first portion of chromosome 1 with the second portion of chromosome 2 and vice versa. As a result, the following child chromosomes will be generated: Child chromosome 1: [A B C G H I T U Z] Child chromosome 2: [A K L M I X Y Z]

Figure (4) A schematic of a Coarse-Grained parallel GA In this paper Coarse- grained Parallel genetic algorithm is used to find better solution. Also compared with Serial Genetic algorithm to prove the better one. C. Initial Sub-Population: In the beginning, the sub-population is filled with genes that build chromosomes that represent random paths. Even though the paths are random, they are supposed to be valid paths, where the chromosomes consist of a sequence of nodes that are in the path from sender to receiver. The number of chromosomes generated for each sub-population, Sn, depends on the total population size and the number of computing nodes, as depicted in Equation (1): (1)

4th ICCCNT 2013 July 4-6, 2013, Tiruchengode, India

ALGORITHM IEEE - 31661

VENKATESAN: COARSE-GRAINED PARALLEL GENETIC

These two chromosomes would then become new members of the population. For a population of size n, the crossover operation must be performed n/2 times to generate n child chromosomes. G. Mutation: Each chromosome produced by the crossover operation has a small chance to be mutated based on the mutation probability, pm for all the experiments, the value for pm is set to 0.05. For each chromosome that is chosen to be mutated, a mutation point will be chosen randomly, with equal probability, among the intermediate nodes in the path from sender to receiver (i.e., the sending and receiving node cannot be chosen as the mutation point). Once the mutation point is chosen, the chromosome will be changed starting from the node after the mutation point and onwards. For example, assume that the following chromosome has been chosen to be mutated: Original chromosome: [A C E F G H I Y Z] where, A and Z are the sending node and the receiving node respectively. Assume also that the node G has been chosen as the mutation point. The mutated chromosome would become like this: Mutated chromosome: [A C E F G x1 x2 x3 Z] The mutated chromosome now contains a new path from G to Z where xi is the ith new node in the path. The new path is generated randomly; the same way as the paths in the initial population is generated. H. Migration: Migration is performed by choosing a chromosome from the local sub-population and then sends it to the other computing nodes. At the same time, the node should also check whether there is any chromosome migrated from the other computing nodes. If a migrated chromosome is received, it will replace one of the chromosomes in the local sub-population. The rule to determine which chromosome should be chosen to be migrated or replaced depends on the migration strategy used.

VI.

RESULTS AND DISCUSSION

The graph 5.1 shows below. It describes the path finding speed of the both simple and Coarse-grained parallel genetic algorithm. When increasing number of nodes the performance gets lag a little amount. But comparison shows that the Coarse-grained is best anyway. And then figure 5.2 shows about packet delivery ratio after path finding.

Figure (5.1) Time taken to find Shortest path

IV.

EXPERIMENT AND ANALYSIS

There are four different types of migration strategy which are best replace worst, best replace random, random replace worst, and random replace random. To evaluate the performance of the four migration strategies in the proposed Fine-Grained parallel GA-based shortest path routing algorithm, an experiment has been conducted. The performance metric used to measure the performance is accuracy, where accuracy is defined as the percentage of the shortest paths returned by the algorithm that are actually shortest paths. A higher accuracy would indicate that the migration strategy used is better.
4th ICCCNT 2013 July 4-6, 2013, Tiruchengode, India

Figure (5.2) Packet Delivery Ratio

6 VII. CONCLUSION

IEEE - 31661

This paper presents a study on the comparison of effect of migration strategies on the performance of a coarse-grained parallel GA with Serial GA based shortest path routing algorithm. There are four migration strategies that have been evaluated which are best replace worst, best replace random, random replace worst and random replace random. Simulation result shows that best replace worst strategy does provide the best result most of the time. However, there are situations where the other strategies can perform just as well as, or even better than, the best replace worst strategy. It is also shown that the difference in performance between the serial geneticc algorithm and the parallel genetic algorithm. VIII. REFERENCES

Parallel Genetic Algorithms on Job Shop Scheduling Problems, Lecture Notes in Computer Science, Vol. 1213, 1997, pp. 383-393. . L.Venkatesan has obtained B.E., (ECE) Degree from SKP Engineering College in 2010. Currently doing his Final year M.E from SKP Engineering College, Tiruvannamalai, Tamilnadu, India. His area of interest is Optical Communication, real time embedded system, robotics and wireless communication.

[1].J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach Featuring the Internet, 4th Edition, Addison-Wesley, Boston, 2007. [2]. M. Munetomo, N. Yamaguchi, K. Akama and Y. Sato, Empirical Investigations on the Genetic Adaptive Routing Algorithm in the Internet, Proceedings of the Congress on Evolutionary Computation, Seoul, 27-30 May 2001, pp. 12361243. [3]. C. W. Ahn and R. S. Ramakrishna, A Genetic Algorithm for Shortest Path Routing Problem and the Sizing of Populations, IEEE Transactions on Evolutionary Computation, Vol. 6, No. 6, 1999, pp. 1-7. [4]. W. Liu and L. Wang, Solving the Shortest Path Routing Problem Using Noisy Hopfield Neural Networks, International Conference on Communications and Mobile Computing , Kunming, 6-8 January 2009, pp. 299-302. doi:10.1109/CMC.2009.366 [5]. H. A. Mukhef, E. M. Farhan and M. R. Jassim, Generalized Shortest Path Problem in Uncertain Environment Based on PSO, Journal of Computer Science, Vol. 4, No. 4, 2008, pp. 349-352. [6]. M. Yusoff, J. Ariffin and A. Mohamed, A Discrete Particle Swarm Optimization with Random Selection Solution for the Shortest Path Problem, International Conference of Soft Computing and Pattern Recognition , Paris, 7-10 December 2010, pp. 133-138. doi:10.1109/SOCPAR.2010.5685867. [7]. A. A. A. Zakzouk, H. M. Zaher and R. A. Z. El-Deen, An Ant Colony Optimization Approach for Solving Shortest Path Routing Problem with Fuzzy Constraints, 7th International Conference on Informatics and Systems , Cairo, 28-30 March 2010, p. 1. [8]. S. Yussof and H. S. Ong, A Robust GA-based QoS Routing Algorithm for Solving Multi-Constrained Path Routing Problem, Journal of Computers, Vol. 5, No. 9, 2010, pp. 13221334. doi:10.4304/jcp.5.9.1322-1334 [9]. S. Yussof, R. A. Razali and H. S. Ong, An Investigation of Using Parallel Genetic Algorithm for Shortest Path Routing Problem, Journal of Computer Science, Vol. 7, No. 2, 2011, pp. 206-215. doi:10.3844/jcssp.2011.206.215. [10]. S.C. Lin, E. D. Goodman and W. F. Punch, Investigating

Dr.P.Sivakumar has obtained B.E., (ECE) Degree from University of MADRAS in 1999 and completed his M.Tech (DEAC) from National Institute of Technology, Surathkal, Karnataka (NITK) in 2005. He finished his Ph.D from Anna University; Chennai in 2012. He is presently working as Professor and Head in department of ECE, S.K.P. Engineering College, Tiruvannamalai, India. He is a member of ISTE, IETE and International Association of Engineers (IAENG) Hong Kong, IACSIT Singapore, and SDIWC Hong Kong. His areas of interest are Wireless Communication, Signal Processing

4th ICCCNT 2013 July 4-6, 2013, Tiruchengode, India

You might also like