2. GRAPH PARTITION PROBLEM
Input: G = (V, E, Ω1, Ω2, m) where
Z+
Z+
Ω1 :
Ω2:
m :
Notations:
Partition: π :
E —>
V —>
: weights on edges
: weights on nodes
number of subsets of G
V --> { π1, π2, π3,..., πm}
where
π = {v ε V |π(v)= πi,} i|1≤ i ≤ mi
such that πi n πj = for i = j
2
3. NOTATIONS CONT…..
o Size of subset πi :
S(π i) = ΣΩ2(v) for all v in πi
W(π) = ∑|S(π i) – S(π j)| i,j| 1≤ i <j≤ m
(Imbalance weight)
o Cut size :
1. Ci = ΣΩ1(u,v) for all (u,v) ε E| u ε πi and v ε πjj
2. Cut(π) = ΣCi for all i,j| 1≤ i <j≤ m
(Cut Size Of π )
j
Objective: To find a partition of the nodes of G into m
disjoint, equal-sized subsets such that the sum
Cost = ω1*Cut(π)+ ω2*W(π)
is minimized
o It’s NP Complete problem 3
4. GENETIC ALGORITHM
Requirements
1. Np:
2.Ng :
Population Size at each iteration
Number of generations(iterations ) required
Cross Over rate (Pc% chromosomes undergo
cross over at each iteration)
mutationrate (Pm% of genes undergo
mutation)
3. Pc :
4. Pm:
5.
6.
α(alpha) : Scaling parameter
ω1 & ω2 : weights for cutcost & imbalance weight
4
6. INTIAL POPULATION
(Pro)i = Ω2(vi) * Random(0,1) * N;
ȵ = μ = Maxi{(Pro)i}/
Where α is known as scaling factor
o (Pr )i = (Pro)i + Uniform(-ȵ, μ)
o Form Matrix X of above elements
as shown below
6
8. COST ,MATES & CROSS OVER
For each chromosome form a partitioned graph & find the
corresponding Cut cost & fitness cost (Draw)
MATES Selection
Select a randomnumberr in (0,1) & select corresponding
chromosome for Mutation if r < Pc for cross over.
Cross Over
Select a number randomly from {1,2,3,…….ColX} & do
the cross over in the selected chromosomes
Replace old chromosomeswith their offsprings.
8
9. MUTATION
Let Pm* RowX = # of genes undergo mutation = K
Generate K random numbers from {1,2,3 ………RowX}
Also K random numbers from {1,2,3 …….ColX}
For each element at intersectionreplaceit by a random number
generated between {MinX, , , , , , MaxX}
This way we get a new matrix X for next generation
computation.
Store the minimum value of cost at each iterations
At the end of finite number of iterations(Ng) find the
minimum among the stored cost values & corresponding
partition gives suboptimalpartition of G
9
10. PARAMETER TUNNING
If we consider Np between 150 to 200
Ng between 80 to 100, Pc= 0.06 & Pm= 0.001
Above
GPP.
are sufficient to arrive at good solution to
10
11. APPLICATIONS
VLSI circuits
Routing in distributed systems
Mapping parallel programming
Image segmentation in the field of computer
visions
Approximately computing suboptimal answers
most of the NP complete problems
to
11