Hi!
It is known to us that the maximal weakly connected component of a connected
nework is itself. Just like the code below shows that the elements of Siz_wcc
never change.
ga <- erdos.renyi.game(1000, 1500, type = "gnm", directed=TRUE);
Siz_wcc <- rep(0,10)
for(i in 1:10)
{
wcca <- clusters(ga, mode="weak")
largest_wcc_va <- which(wcca$membership == which.max(wcca$csize))
Siz_wcc[i] <- length(largest_wcc_va)
ga <- induced.subgraph(ga, largest_wcc_va, impl="copy_and_delete")
}
> Siz_wcc
[1] 936 936 936 936 936 936 936 936 936 936
Given two networks ga and gb, if network ga is exactly the same with network
gb, then the elements in Siz_wcca and Siz_wccb are also expected to be
invariant. But Siz_wcca and Siz_wccb decrease to 1 in the end. How could this
happen?
gb <- erdos.renyi.game(1000, 1500, type = "gnm", directed=TRUE);
ga <- gb
Siz_wcca <- rep(0,10)
Siz_wccb <- rep(0,10)
for(i in 1:10)
{
wcca <- clusters(ga, mode="weak")
largest_wcc_va <- which(wcca$membership == which.max(wcca$csize))
Siz_wcca[i] <- length(largest_wcc_va)
gb <- induced.subgraph(gb, largest_wcc_va, impl="copy_and_delete")
wccb <- clusters(gb, mode="weak")
largest_wcc_vb <- which(wccb$membership == which.max(wccb$csize))
Siz_wccb[i] <- length(largest_wcc_vb)
ga <- induced.subgraph(ga, largest_wcc_vb, impl="copy_and_delete")
}
> Siz_wcca
[1] 933 854 756 615 331 3 1 1 1 1
> Siz_wccb
[1] 933 845 722 521 46 1 1 1 1 1
best
Xueming
[email protected]_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help