gives the vertices in the graph g that have a directed path to at least one of v1, v2, … .
gives the vertices with a directed path to at least one of v1, v2, … of at most length k.
gives the vertices at length exactly k.
uses rules vw to specify the graph g.
- VertexInComponent works for any directed graph object.
- VertexInComponent works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examplesopen allclose all
VertexInComponent works with undirected graphs:
Use rules to specify the graph:
Use patterns to select a subset of vertices:
Find the in-component connected to a vertex by a path of at most length 2 in a graph:
VertexInComponent works with large graphs:
Properties & Relations (1)
Use VertexOutComponent to find the out-component for directed graphs:
Wolfram Research (2010), VertexInComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexInComponent.html (updated 2020).
Wolfram Language. 2010. "VertexInComponent." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/VertexInComponent.html.
Wolfram Language. (2010). VertexInComponent. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexInComponent.html