WOLFRAM

gives the transitive closure of the graph g.

TransitiveClosureGraph[{vw,}]

uses rules vw to specify the graph g.

Details and Options

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

The transitive closure of a graph:

Out[2]=2

Highlight the original graph within its transitive closure:

Out[3]=3

Scope  (5)Survey of the scope of standard use cases

TransitiveClosureGraph works with undirected graphs:

Out[1]=1

Directed graphs:

Out[1]=1

Multigraphs:

Out[1]=1

Use rules to specify the graph:

Out[1]=1

TransitiveClosureGraph works with large graphs:

Out[2]=2

Options  (3)Common values & functionality for each option

Method  (3)

The method is automatically chosen depending on input:

Out[1]=1

"Warshall" and "Warren" methods can be used for dense graphs:

Out[2]=2
Out[3]=3

"Purdom" can be used for directed acyclic graphs:

Out[2]=2

Applications  (2)Sample problems that can be solved with this function

Find species in the food chain that would be affected if beetles were extinct:

Out[1]=1
Out[10]=10

Give a divisibility tree and find all divisors for each number:

Out[2]=2

Properties & Relations  (6)Properties of the function, and connections to other functions

The transitive closure graph has the same vertices as the original graph:

Out[2]=2

An edge uv is in the closure graph if there is a path from u to v in the original graph:

There is a path from 1 to 6 in the given graph, by no direct edge:

Out[2]=2
Out[3]=3

There is a direct edge 16 in the transitive closure:

Out[4]=4

The transitive closure of a connected undirected graph is a complete graph:

Out[1]=1
Out[2]=2

Using transitive closure to find the reachability of each vertex in the graph:

Out[2]=2
Out[3]=3

TransitiveClosureGraph can be computed using GraphPower:

Out[2]=2
Out[3]=3

The transitive closure is the same for a graph and its transitive reduction:

Out[2]=2
Wolfram Research (2014), TransitiveClosureGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html (updated 2015).
Wolfram Research (2014), TransitiveClosureGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html (updated 2015).

Text

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

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

CMS

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

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

APA

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

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

BibTeX

@misc{reference.wolfram_2025_transitiveclosuregraph, author="Wolfram Research", title="{TransitiveClosureGraph}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html}", note=[Accessed: 02-April-2025 ]}

@misc{reference.wolfram_2025_transitiveclosuregraph, author="Wolfram Research", title="{TransitiveClosureGraph}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html}", note=[Accessed: 02-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_transitiveclosuregraph, organization={Wolfram Research}, title={TransitiveClosureGraph}, year={2015}, url={https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html}, note=[Accessed: 02-April-2025 ]}

@online{reference.wolfram_2025_transitiveclosuregraph, organization={Wolfram Research}, title={TransitiveClosureGraph}, year={2015}, url={https://reference.wolfram.com/language/ref/TransitiveClosureGraph.html}, note=[Accessed: 02-April-2025 ]}