Improved Genetic Algorithm: Channel Allocation in Mobile Computing - D. P. Vidyarthi - Jawaharlal Nehru ...
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Improved Genetic Algorithm: Channel Allocation in Mobile Computing D. P. Vidyarthi School of Computer & Systems Sciences Jawaharlal Nehru University New Delhi 2/6/2018 JNU, New Delhi
Source Article “Improved Genetic Algorithm for Channel Allocation with Channel Borrowing in Mobile Computing”, S. S. Mahapatra, Kousik Roy, Sarthak Banerjee, Deo Prakash Vidyarthi, IEEE Trans. on Mobile Computing, Vol. 5, No. 7, July, 2006. 2/6/2018 JNU, New Delhi
GAs: What Are They • Large Class of problems having no fast algorithms • Any Problem solving can be perceived as a search through a space of potential solutions • Objective is BEST solution • Small Spaces- Exhaustive Methods • Large Spaces- AI techniques • GA is one such technique, Stochastic Algorithms based on natural phenomena Genetic Inheritance Continued…. 2/6/2018 JNU, New Delhi
•Based on Darwin’s Theory “Survival of the fittest” •Example - Rabbits & Foxes •Darwin’s theory of natural selection, bending inheritance mixing like fluids •Mendel- hereditary factors of discrete nature •Morgan- Chromosomes are the carriers of hereditary information •Vocabulary borrowed from natural genetics individuals (genotypes, structures) in a population quite often called strings, chromosomes. 2/6/2018 JNU, New Delhi
•Every gene controls the inheritance of characters. •In contrast with the cell of organism which carries a number of chromosomes (man has 46) chromosomes are made of genes (features, characters, decoders) •Search through population of chromosomes •Objectives- Exploiting the Best solution & Exploring the search space •Each chromosomes represent a potential solution 2/6/2018 JNU, New Delhi
•Hill climbing- exploiting not exploring •Random Search- exploring not exploiting •GA- balance between exploitation & exploration •It provides a multidirectional search by maintaining a population of potential solutions. •Successfully applied to various optimization problems- Wire routing, Scheduling, Adaptive control, Game playing, Cognitive modeling, Transportation problems, TSP, optimal controls, Mobile Communications etc. 2/6/2018 JNU, New Delhi
Evolutionary Algorithms 2/6/2018 JNU, New Delhi
Simple Genetic Algorithm( ) { Population Initialization; Population Evaluation; Until solution converges do { Perform Crossover & Mutation; Evaluate Population; Reproduction; } } 2/6/2018 JNU, New Delhi
Initial Population • The chromosomes in GA population generally take the form of bit strings. – Bit strings (0101 ... 1100) – Real numbers (43.2 -33.1 ... 0.0 89.2) – Permutations of element (E11 E3 E7 ... E1 E15) – Lists of rules (R1 R2 R3 ... R22 R23) – Program elements (genetic programming) – ... any data structure ... 2/6/2018 JNU, New Delhi
GA Operations - Crossover • Choose randomly some crossover point • Copy everything before this point from the first parent • Then copy everything after the crossover point from the other parent. • Crossover probability is fixed. 11001011 + 11011101 = 11011111 2/6/2018 JNU, New Delhi
Crossover Crossover site 1-point crossover (used in SGA) n-point crossover Uniform crossover 2/6/2018 JNU, New Delhi
Mutation A chromosome is altered a little bit randomly(e.g. 0 to 1 or 1 to 0). 2/6/2018 JNU, New Delhi
Mutation • Mutation means that the elements of DNA are a bit changed. • Mutation probability is fixed. • Bit inversion - selected bits are inverted 11001001 => 10001001 2/6/2018 JNU, New Delhi
Fitness Function • The GA requires a fitness function that assigns a score to each chromosome in the population. • The fitness function in a GA is the objective function that is to be optimized. • It is used to evaluate search nodes, thus it controls the GA. 2/6/2018 JNU, New Delhi
Chromosome Selection Each individual chromosome (string) is assigned a fitness value by the fitness function. The chromosome is evaluated with this value for survival. The fitness function used to rank the quality of the chromosome. Chromosomes with higher value have a higher probability of contributing one or more offspring in the next generation. 2/6/2018 JNU, New Delhi
Chromosome Selection • Roulette Wheel Selection • Boltzman Selection • Tournament Selection • Rank Selection • Steady State Selection • ….. 2/6/2018 JNU, New Delhi
Selection-Roulette Wheel • Want to maintain an element of randomness but ‘fix’ the selection so that fitter individuals have better odds of being chosen • Assign areas on a number line relative to each individuals fitness • Generate a random number within the range of the number line • Determine which individual occupies that area of the number line • Choose that individual 2/6/2018 JNU, New Delhi
Selection-Roulette Wheel This process can be described by the following algorithm. [Sum] Calculate the sum of all chromosome fitnesses in population - sum S. [Select] Generate random number from the interval (0,S) - r. [Loop] Go through the population and sum the fitnesses from 0 - sum s. When the sum s is greater then r, stop and return the chromosome where you are. Of course, the step 1 is performed only once for each population. 2/6/2018 JNU, New Delhi
Selection-Roulette Wheel 2/6/2018 JNU, New Delhi
An Example: TSP • Must visit in his territory exactly once and return to the starting point • Given the cost of travel between all cities, how should he plan for minimum total cost of his entire tour • Several BB, approximate, heuristic algorithms are available for this • Decide on chromosome: Integer or Binary • If Binary, each cities should be coded as a string of log n bits. A chromosome string of 2 nlog2n bits 2/6/2018 JNU, New Delhi
TSP Continues… • A mutation may result in a sequence of cities, which is not a tour • For 20 cities, 5 bits are needed and some sequence may not correspond to a city • Similar problems with Crossover • Clearly we require some repair algorithm • Integer representation is better • Vector v=(i1i2..in) represents a tour 2/6/2018 JNU, New Delhi
TSP Continues…. • For initialization: Heuristics (few outputs from greedy algorithm) or random permutation • Evaluation is straightforward. • Crossover (e.g. OX operator) • Populations are (1 2 3 4 5 6 7 8 9 10 11 12) & (7 3 1 11 4 12 5 2 10 9 6 8) chosen part (4 5 6 7) • Resulting offspring ( 1 11 12 4 5 6 7 2 10 9 8 3) • The roles of the parents reversed for the next offspring 2/6/2018 JNU, New Delhi
How GA Works: An Example • Maximize the function for 4 decimal places f(x1,x2)=21.5+x1*sin(4πx1)+x2*sin(20πx2) Where –3.0
• e.g. (010001001011010000111110010100010) • first 18 bits represent x1 3.0 dec (010001001011010000)*12.1 (3.0) 218 1 x1=-3.0+4.052426=1.052426 • Similarly x2=5.755330 • So (010001001011010000111110010100010) corresponds to (x1,x2)=(1.052426,5.755330) • Fitness f(x1,x2)=20.252640 • For population size 20 random population is 2/6/2018 JNU, New Delhi
• V1=(100110100000001111111010010100000) • V2=(111000100100110111001010100011010) • V3=(000010000011001000001010111011101) • V4=(100011000101101001111000001110010) • V5=(000111011001010011010111111000101) • V6=(000101000010010101001010111111011) • v7=(001000100000110101111011011111011) • V8=(100001100001110100010110101100111) • V9=(010000000101100010110000001111100) • V10=(000001111000110000011010000111011) 2/6/2018 JNU, New Delhi
• v11=(011001111110110101100001101111000) • v12=(110100010111101101000101010000000) • v13=(111011111010001000110000001000110) • v14=(010010011000001010100111100101001) • v15=(111011101101110000100011111011110) • v16=(110011110000011111100001101001011) • v17=(011010111111001111010001101111101) • v18=(011101000000001110100111110101101) • v19=(000101010011111111110000110001100) • v20=(101110010110011110011000101111110) 2/6/2018 JNU, New Delhi
• We evaluate each chromosome eval(vi) after calculating the fitness from (x1,x2) • eval(v1)=26.019600, eval(v2)=7.580015, eval(v3)=19.526329, eval(v4)=17.406725, eval(v5)=25.341160, eval(v6)=18.100417, eval(v7)=16.020812, eval(v8)=17.959701, eval(v9)=16.127799, eval(v10)=21.278435, eval(v11)=23.410669, eval(v12)=15.011619, eval(v13)=27.316702, eval(v14)=19.876294, eval(v15)=30.060205, eval(v16)=23.867227, eval(v17)=13.696165, eval(v18)=15.414128, eval(v19)=20.095903, eval(v20)=13.666916 2/6/2018 JNU, New Delhi
• Now the system constructs a roulette wheel for selection. • The total fitness F=Sum of vi=387.776822. • Probability of selection pi for vi is eval(vi)/F • Generate the cumulative probabilities of pi • Generate 20 random numbers between 0 and 1. • Select the population based on these numbers. • Probability of crossover is 25% so 5 out of 20 will undergo crossover. • Generate random number r [0..1] if r
• Random integer pos is generated between 1 and 32 for the crossover site. • New populations are generated after crossover. • Probability of mutation is 0.01 so 1% of the bits will undergo mutation. There are total 20*33 bits • We expect 6.6% average mutations per generation • Again random number [0..1] is generated and if r
GA for Task Scheduling • GA is applied for Task Scheduling in DCS and Grid • Initial Population consists of allocation of modules to computing nodes in binary • Fitness: Turnaround Time, Reliability • Crossover, Mutation & Reproduction • Better Allocation with balanced load 2/6/2018 JNU, New Delhi
Channel Allocation • Mobile Devices are increasing • Radio frequency resources are limited • Need for effective resource management • Fixed Channel Allocation (FCA); No channel Reuse • Dynamic Channel Allocation (DCA); Channel Reuse to balance the load • Borrowing Channel Allocation (BCA); borrows channel from the cells having light load • Other Methods; Channel Sharing, Cell Splitting 2/6/2018 JNU, New Delhi
Improved Genetic Algorithm for CA • GA, with a variant, is used for the Channel Allocation Problem • Objective: To minimize Blocked Hosts and to reduce channel borrowings • A Host is blocked, if it enters into a cell but didn’t get channel • A new operator ‘Pluck’ is introduced • Add some knowledge in Chromosome selection for reproduction 2/6/2018 JNU, New Delhi
Encoding Borrowing information Free channels 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Blocked hosts Lending information • A chromosome, for each cell, is an array of length 14 • A Superchromosome 7*14 formed with chromosome of 6 neighbor cells • One population is one Superchromosome 2/6/2018 JNU, New Delhi
Pluck Operation • Incorporating problem specific knowledge • Idea is from Tealeaves plucking in Tea garden • It is applied when borrowing decision are to be taken • The information is extracted from the cell itself (about free and blocked hosts) • Pluck together with encoding 2/6/2018 JNU, New Delhi
Crossover • The cut point is chosen randomly • Elements before cut-point are swapped • After cut-point, the commonality of the elements are checked • Uncommon elements are kept at the same position • For common elements, order is maintained from the other matrix • This is to preserve the information 2/6/2018 JNU, New Delhi
Crossover Cont.. 1st matrix 2nd matrix cut point cut point 1 2 3 4 5 6 7 4 5 6 5 7 4 6 2 3 4 3 4 8 7 4 3 5 8 7 9 4 5 6 7 5 6 4 3 1 2 2 6 6 3 4 offspring 1 offspring 2 4 5 6 5 7 4 6 1 2 3 4 5 6 7 4 3 5 3 8 7 4 2 3 4 4 8 9 7 1 2 2 5 6 3 4 5 6 7 6 6 4 3 2/6/2018 JNU, New Delhi
Mutation • Mutation is not effectuated • Weakness is giving borrowing decision ahead of time • It may result in non-optimality • Simple reason: Their effect is not measured in fitness function 2/6/2018 JNU, New Delhi
Fitness Fitness = αc* current_blocked + αn*next_blocked + β*next_free + µ*hotcell + *transaction αc, αn, β, µ, are constant values to suit the environment • Next_blocked and next_free are calculated by the behavior variable of the cell and the host • Hotcell is taken into account when cell has no free channel • Transaction is the number of blocked or free hosts of the cell • Fittest is one with lowest fitness value 2/6/2018 JNU, New Delhi
Repair • It is possible that during crossover some information becomes irrelevant • If Host number > Available Free channels then free channel number is updated to 0 • Also the lending part will be updated to 0, as the cell with no free channel can not spare an extra channel to any cell • Similarly, when host number < available free channels it need not to borrow and its borrowing part becomes 0 2/6/2018 JNU, New Delhi
Experiments Input: • Total number of cells: 19 • Channel per cell: 10 • Crossover probability: 1 • Number of hosts in the network: 50, 75,100. • Number of time units in seconds: 10, 20, 50, 100, 150 2/6/2018 JNU, New Delhi
FCA Vs. IGA FCA w ith 50 hosts Average Blocked 80 FCA w ith 75 70 60 hosts Hosts 50 FCA w ith 100 40 30 hosts 20 IGA w ith 50 10 0 hosts 10 20 50 100 150 IGA w ith 75 hosts 2/6/2018 Time JNU, New Delhi IGA w ith 100
Modified Mutation GA Vs. IGA 120 Number of Blocked Hosts 100 80 60 40 20 0 10 20 50 100 Time FCA Modi Mutation GA IGA 2/6/2018 JNU, New Delhi
Other Applications • GA has been applied for Resource Management in Cellular IP networks • Resources considered are Bandwidth, Buffer and Router CPU cycle • Better results are achieved • A variant, MGA was also proposed that uses elitist selection method • For Multi Objective Optimization problems NSGA-II was also applied 2/6/2018 JNU, New Delhi
Conclusion • GA suited for any optimization problem where search space is large • Much better than exhaustive search • Provides good result • Incorporating problem specific knowledge converges the solution quickly • Is applicable for variety of problems 2/6/2018 JNU, New Delhi
2/6/2018 JNU, New Delhi
You can also read