GraphReciprocity

GraphReciprocity[g]

gives the reciprocity of a graph g.

GraphReciprocity[{vw,}]

uses rules vw to specify the graph g.

Details and Options

  • The reciprocity of a graph g is the fraction of reciprocal edges over all edges of g.
  • For a directed graph, the edges and are reciprocal and form a cycle of length 2.
  • For an undirected graph, all edges are reciprocal.
  • GraphReciprocity works with undirected graphs, directed graphs, and weighted graphs.

Examples

open allclose all

Basic Examples  (2)

Compute the reciprocity of a directed graph:

Distribution of graph reciprocity:

Scope  (6)

GraphReciprocity works with undirected graphs:

Directed graphs:

Weighted graphs:

Multigraphs:

Use rules to specify the graph:

GraphReciprocity works with large graphs:

Applications  (3)

GraphReciprocity measures the number of directed edges that are bidirectional:

Test whether a square matrix is structurally symmetric:

Distribution of reciprocity in UniformGraphDistribution[n,m,DirectedEdges->True]:

The expected value is (m-1)/(n(n-1)-1):

Properties & Relations  (3)

The graph reciprocity is between 0 and 1:

A bidirectional directed graph has reciprocity 1:

An undirected graph also has reciprocity 1:

Introduced in 2012
 (9.0)
 |
Updated in 2014
 (10.0)
2015
 (10.3)