igraph-help
[Top][All Lists]

## Re: [igraph] centralization again

 From: Gábor Csárdi Subject: Re: [igraph] centralization again Date: Mon, 24 Nov 2008 23:47:15 +0100

```Well, we will sort this centralization out, sooner of later.... I
think it is just a question of definition. Your definition is fine for
undirected graphs, among these the most centralized (according to
degree) is the star.

This one is a directed graph, however, so you probably want to count
the incoming connections only. (Or maybe not? Again, a question of
definition.) If you want to count the incoming edges for directed
graphs, then the definition reads as

centralization <- function(g)
(sum(max(degree(g,mode="in"))-degree(g,mode="in")))/(vcount(g)-1)/(vcount(g)-2)

If you want to count all edges, incoming and outgoing as well, then it is

centralization <- function(g)
(sum(max(degree(g))-degree(g)))/(2*vcount(g)-2)/(vcount(g)-2)

Here we assume that there are at most two edges between a pair of
vertices, at most one each direction. For graphs with multiple edges
this definition fails as well.

Does this make sense?
Gabor

On Mon, Nov 24, 2008 at 11:30 PM, Simone Gabbriellini
> Dear Gabor,
>
> sorry to trouble you again with a centralization problem, but I am
> experiencing a trouble with my graph.
>
> centralization<-(sum(max(degree(g))-degree(g))) / (vcount(g)-1) /
> (vcount(g)-2)
>
> this is the adiacency matrix of my graph:
>
>   a b c d
> a 0 1 1 1
> b 1 0 0 0
> c 1 0 0 0
> d 1 0 0 0
>
> and this is a brief summary
>
>> summary(WOW)
> Vertices: 4
> Edges: 6
> Directed: TRUE
> No graph attributes.
> Vertex attributes: id.
> Edge attributes: weight, color.
>
> the surprise is that the result of centralization is 2... which is
> pretty unusual for centralization...
> I have others networks, and for them the code always runs ok, but with
> this particular network, it seems not to work properly...
>
> any help, as usual, is more than welcome
>
> cheers,
> Simone
>
>
> _______________________________________________
> igraph-help mailing list
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>

--