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:

Wolfram Research (2012), GraphReciprocity, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphReciprocity.html (updated 2015).

Text

Wolfram Research (2012), GraphReciprocity, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphReciprocity.html (updated 2015).

CMS

Wolfram Language. 2012. "GraphReciprocity." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphReciprocity.html.

APA

Wolfram Language. (2012). GraphReciprocity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphReciprocity.html

BibTeX

@misc{reference.wolfram_2024_graphreciprocity, author="Wolfram Research", title="{GraphReciprocity}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/GraphReciprocity.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_graphreciprocity, organization={Wolfram Research}, title={GraphReciprocity}, year={2015}, url={https://reference.wolfram.com/language/ref/GraphReciprocity.html}, note=[Accessed: 21-December-2024 ]}