Você está na página 1de 13

PHASE 3

MALIK UBAID UL RAB


BCSF12MO54
MUHAMMAD ADEEL UR REHMAN
BCSF12M011

NOTE: The names of nodes are changed according


to following
Manner.
A= PAKISTAN PESHAWER
B = PAKISTAN PESHAWER ATTACK
C = PAKISTAN PESHAWER SCHOOL
D = PESHAWER
E = PESHAWER ATTACK
F = PESHAWER ATTACK NEWS
G = PESHAWER ATTACK PICS
H = PESHAWER SCHLL ATTACK PICTURES
I = PESHAWER ATTACK SCHOOL
J = PESHAWER ATTACK VIDEO
K = PESHAWER NEWS
L = PESHAWER PAKISTAN
M= PESHAWER PAKISTAN ATTACK
N = PESHAWER PAKISTAN NEWS
0 = PESHAWER SCHOOL
P = PESHAWER SCHOOL ATTACK

Q = PESHAWER SCHOOL IMAGES


R = PESHAWER SCHOOL NEWS
S = PESHAWER SCHOOL VIDEO
T = TALIBAN ATTACK
U = THE PESHAWER ATTAC

The weights of nodes are given on next page on


the basis of weight of edges given in the graph.
In rectangle small boxes

Weight of the nodes


A =0

N =0

B=0

O=4

C=2

P=2

D=2

Q=0

E=4

R=0

F=0

S=2

G=0

T=0

H=0

U=0

I=0
J=2
K=0
L=0
M=0

Solution :
Cluster 1
Clustering will start from O as O=E(weight are equal) but degree of O is greater
than E.
Adding O to cluster 1 and adding its neighbours on the basis of priority:
The neighbor nodes are written on the basis of priority
1E2C3D4I5R6L
A. E:
1. Check density after adding E
D =[E]/[E]max =2*1/2(2-1) = 1 >0.5
B. CPe
CP = [Ec]/d*[n]= 1/1*1 =1 >0.5
CPe >CP(threshold)
E is added to cluster
2. (A)

(add cto cluster)

Check density
d= 2*3/3(3-1) = 6/6 = 1 >0.5
(B).

check

CPc

CPc = 2/1*4 = 0.1 >0.5


C is added to cluster
3.

(A) ( Add D to cluster 1)

Check density
D= 2*5/4(4-1) = 0.8 >0.5
d cluster >d therseshold
(B) check

CPd

CP d = 2/1*3 = 0.66 >0.,5


(CPd

>

CP( threshold)

D is added to cluster 1
4.

Add I to cluster
(A) Check density
D = 2*6/5(5-1) = 0.6 >0.5
d
(B)

> d(threshold)
Check CPI

cluster

CP I =1/(0.8)(4) = 0.315<0.5
Deduct I from CLUSTER
(5). (A) (Add R to the cluster 1)
Check density

d = 2*6/5(5-1) = 0.6 > 0.5


dcluster

> d (threshold)

check CPR
CPi =1/(0.8)(4) =0.312< 0.5
CPi <CP (threshold)
Deduct the node R from cluster 1

(6) . (A):
Add L to cluster 1
Check density
d= 2*6/5(5-1) = 0.6 > 0.5

dcluster > d(threshold)


check CPL
CPL

CPL

<

1/(0.8)(4) = 0.31< 0.5


CP(threshold)

Deduct L from cluster 1

of O,C,D,E Cluster 1 consist


Now consider CLUSTAR 2:
2nd cluster start from E neighbours are arranged accordinf to their priorites
1 O 2 C 3 D 4 S
1. O:

Add O to cluster 2;
(A) Density:
d = 2*1/2(2-1) = 1>0.5
(B) CPo:
CPo = 1/1*1 =1 >0.5
CPo >CP(threshold)
O is added to cluster 2

(2) C : Add C to Cluster 2


Density :
d = 2*3/3(3-1) = 1>0.5
check CPc
CPc = 2/1*2 = 1> 0.5
CPc > CP(threshold)
C is added to cluster 2
(3) D.

Add D to cluster

Density = 2*5/4(4-1) =10/12 = 0.8>0.5


dcluster > D (threshold)
Check CPd
CPd =2/1*4 = 0.5 = 0.5
CPd =CP (threshold)

D IS Added to cluster 2
(4).

Add S to cluster 2

Check density = 2*6/5(5-1) = 0.6 >0.5


d cluster > d (threshold)
check CPd:
CPd = 1/0.8*4 = 0.3125
CPd<CP(threshold)
Node S is deducted from cluster 2

Cluster 2 is consists of E,O,C,D

Cluster 3:
Cluster 3 starts from P having weight 2 and degree 11.

Neighbours are arranged according to their priority


1 J 2 S 3 C 4 M 5 Q 5 G 7 T 8 U 9 B 10 H
(1). Add j to cluster 3.
Check density = d = 2*1/2(2-1) = 1> 0.5
dcluster > d(threshold)
Check CPd = 1/1*1 = 1 > 0.5
CPd > CP(threshold)
J is added to cluster 3.
(2) . Add S to cluster 3
Check density = 2*3/3(3-1) = 6/6 =1 >0.5
dcluster > d(threshold)
check CPd = 2/1*2 = 1 > 0.5
CPd > CP(threshold)
Node S is added to cluster 3.

(3).

Add C to cluster 3

Check density = 2 *4/4(4-1) = 8/12 =0.6 >0.5


dcluster > d(threshold)
check CPd:
CPd = 1/1*3 = 0.33 <0.5
CPd <CP(threshold)
C is deducted from cluster 3
(4). Add M

to cluster 3

Check density= d = 2*4/4(4-1) =8/12 =0.6>0.5


Check CPm
CPm =1/1*3 =0.33 <0.5
CPm <CP(threshold)
Node M is deducted from cluster 3
(5). Add Q to the cluster 3
Check density d
d = 2*4/4(4-1) =8/12 =0.6> 0.5
dcluster >d(threshold)
Check CPq:
CPq = 1*3 =0.33 <0.5
CPq <CP(threshold)
Q is deducted from cluster 3
(6). Add G to the cluster 3
Check density = d =2*4/4(4-1) =0.6 >0.5
Dcluster > d(threshold)
Check CPg = i/1*3 = 0.33<0.5
CPg < CP(threshold)

Node G is deducted from cluster 3


(7). Now, Add node T to the cluster 3
dt>d(threshold)
and
CPt< CP(threshold)
So,nodet is deducted from cluster 3
(8). Add nodeV to cluster 3
Density
dcluster >d(threshold)
and

CPv < CP(threshold)


So, node V is deducted from cluster 3
(9). Add nodeB to the cluster 3
Density
dcluster >d(threshold)
and
CPe<CP(threshold)
So, node B is deducted from cluster 3.
(10). Add node H in cluster 3
Density
dcluster > d(thersh0ld)
and
CPh <CP(threshold)
Hence, node H is deducted from cluster 3
Hence, cluster 3 consists of of T,S,C
Same cluster would be formed by S(weight =2),J(weight =2)

CLUSTER 4
Cluster 4 starts from C .Node C is added to cluster 4.
Neighbours are arranged according to their priority
Neighbours
1O2E3P4F
(1). Add 0 to the cluster 4
Density
dcluster >d(threshold)
and
CPo>CP(threshold)
Hence, Node O is added to the cluster 4
(2). Now, add node E to the cluster 4
Density
dcluster > d(threshold)
and
CPe> cCP(threshold)
So, node E is added to cluster 4
(3). Add node P to the cluster 4
Density
dcluster > d(threshold)
and
CPe<CP(threshold)
So. Node E is deducted from cluster 4
(4).

Add F to cluster 4

Density
dcluster > d(threshold)

and
CPf <CP(therhold)
So, node F is deducted from cluster 4

Cluster 4 is consist of C,O,E

There are four clusters in this graph pointed out


by us, according to heuristics. Others are same as
these four clusters with different arrangement.

Você também pode gostar