Improved Genetic Algorithm: Channel Allocation in Mobile Computing - - PowerPoint PPT Presentation

improved genetic algorithm channel allocation in mobile
SMART_READER_LITE
LIVE PREVIEW

Improved Genetic Algorithm: Channel Allocation in Mobile Computing - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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

slide-2
SLIDE 2

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.

JNU, New Delhi 2/6/2018

slide-3
SLIDE 3

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

slide-4
SLIDE 4
  • 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

slide-5
SLIDE 5
  • 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

slide-6
SLIDE 6
  • 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

slide-7
SLIDE 7

JNU, New Delhi

Evolutionary Algorithms

2/6/2018

slide-8
SLIDE 8

JNU, New Delhi

Simple Genetic Algorithm( ) { Population Initialization; Population Evaluation; Until solution converges do { Perform Crossover & Mutation; Evaluate Population; Reproduction; } }

2/6/2018

slide-9
SLIDE 9

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

slide-10
SLIDE 10

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

slide-11
SLIDE 11

JNU, New Delhi

Crossover

1-point crossover

(used in SGA)

n-point crossover Uniform crossover

Crossover site

2/6/2018

slide-12
SLIDE 12

JNU, New Delhi

Mutation

A chromosome is altered a little bit randomly(e.g. 0 to 1 or 1 to 0).

2/6/2018

slide-13
SLIDE 13

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

slide-14
SLIDE 14

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
  • bjective function that is to be optimized.
  • It is used to evaluate search nodes, thus it

controls the GA.

2/6/2018

slide-15
SLIDE 15

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

slide-16
SLIDE 16

JNU, New Delhi

Chromosome Selection

  • Roulette Wheel Selection
  • Boltzman Selection
  • Tournament Selection
  • Rank Selection
  • Steady State Selection
  • …..

2/6/2018

slide-17
SLIDE 17

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

slide-18
SLIDE 18

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

slide-19
SLIDE 19

JNU, New Delhi

Selection-Roulette Wheel

2/6/2018

slide-20
SLIDE 20

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 bits. A chromosome string of nlog2n bits

 

n

2

log

2/6/2018

slide-21
SLIDE 21

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

slide-22
SLIDE 22

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
  • ffspring

2/6/2018

slide-23
SLIDE 23

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<=x1<= 12.1 and 4.1<=x2<=5.8 Pop size=20, pc=0.25 and pm=0.01

  • The domain of x has length 15.1. Precision

implies range [-3.0,12.1] should be divided into 15.1*10000 equal size ranges

  • 18 bits required 217<151000<218 for first part
  • Similarly 15 bits for second part of

chromosome

  • Total length of a chromosome is 18+15=33

2/6/2018

slide-24
SLIDE 24

JNU, New Delhi

  • e.g.

(010001001011010000111110010100010)

  • first 18 bits represent

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

1 18 2 ) . 3 ( 1 . 12 * 011010000) (010001001

. 3 1

  

   dec x

2/6/2018

slide-25
SLIDE 25

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

slide-26
SLIDE 26

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

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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<0.25, we

select a given chromosome for crossover.

2/6/2018

slide-29
SLIDE 29

JNU, New Delhi

  • 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<0.01 we mutate the bit.

  • Next population has total fitness 447.049688
  • Repeat the same steps 1000 iteration.
  • The best chromosome at 396th iteration of value

38.827553

2/6/2018

slide-30
SLIDE 30

JNU, New Delhi

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

slide-31
SLIDE 31

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

JNU, New Delhi 2/6/2018

slide-32
SLIDE 32

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

JNU, New Delhi 2/6/2018

slide-33
SLIDE 33

Encoding

  • A chromosome, for each cell, is an array of length 14
  • A Superchromosome 7*14 formed with chromosome
  • f 6 neighbor cells
  • One population is one Superchromosome

1 2 3 4 5 6 7 8 9 10 11 12 13

Borrowing information Lending information Free channels Blocked hosts

JNU, New Delhi 2/6/2018

slide-34
SLIDE 34

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

JNU, New Delhi 2/6/2018

slide-35
SLIDE 35

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

JNU, New Delhi 2/6/2018

slide-36
SLIDE 36

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

  • ffspring 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

JNU, New Delhi 2/6/2018

slide-37
SLIDE 37

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

JNU, New Delhi 2/6/2018

slide-38
SLIDE 38

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

JNU, New Delhi 2/6/2018

slide-39
SLIDE 39

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

JNU, New Delhi 2/6/2018

slide-40
SLIDE 40

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

JNU, New Delhi 2/6/2018

slide-41
SLIDE 41

FCA Vs. IGA

10 20 30 40 50 60 70 80 10 20 50 100 150 Time Average Blocked Hosts FCA with 50 hosts FCA with 75 hosts FCA with 100 hosts IGA with 50 hosts IGA with 75 hosts IGA with 100

JNU, New Delhi 2/6/2018

slide-42
SLIDE 42

Modified Mutation GA Vs. IGA

20 40 60 80 100 120 10 20 50 100 Time Number of Blocked Hosts FCA Modi Mutation GA IGA

JNU, New Delhi 2/6/2018

slide-43
SLIDE 43

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

slide-44
SLIDE 44

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

slide-45
SLIDE 45

JNU, New Delhi 2/6/2018