Question

I'm working on a Twitternetwork based on follower-relations in R. In this Network I want to determine the size of the largest cliques within everybody can read each others tweets in his or her timeline. Therefore I would need largest.cliques. But this function is ignoring directionality. I know its not integrated in the igraph package but is there a way to find cliques in directed networks, where every node is actively and passivly connected to each other?

Was it helpful?

Solution

For this problem, you can convert the directed instance of the problem to an undirected instance. Consider any two nodes, if there is only one directed edge between them, you know they cannot be part of a clique by your definition. Hence, we can dismiss any edge (u,v) if there is no corresponding (v,u). Otherwise, if we have both (v,u) and (u,v) it is equivalent to an undirected edge.

In other words, we create an undirected graph G' with edges between u and v if and only if there is are directed edges u -> v and v -> u. Finding a clique in G' should find you the equivalent clique in G.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top