VertexInComponent
✖
VertexInComponent
gives the vertices with a directed path to at least one of v1, v2, … of at most length k.
Details

- VertexInComponent works for any directed graph object.
- VertexInComponent works with undirected graphs, directed graphs, multigraphs, and mixed graphs.

Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Scope (8)Survey of the scope of standard use cases
VertexInComponent works with undirected graphs:

https://wolfram.com/xid/0ywrb6dlukqa-3jjvc1


https://wolfram.com/xid/0ywrb6dlukqa-zg3ksa


https://wolfram.com/xid/0ywrb6dlukqa-w3859o


https://wolfram.com/xid/0ywrb6dlukqa-vbiq94

Use rules to specify the graph:

https://wolfram.com/xid/0ywrb6dlukqa-bndh30

Use patterns to select a subset of vertices:

https://wolfram.com/xid/0ywrb6dlukqa-bp7bob

Find the in-component connected to a vertex by a path of at most length 2 in a graph:

https://wolfram.com/xid/0ywrb6dlukqa-imtbi

VertexInComponent works with large graphs:

https://wolfram.com/xid/0ywrb6dlukqa-wd8zhr

https://wolfram.com/xid/0ywrb6dlukqa-gopv0s

Properties & Relations (1)Properties of the function, and connections to other functions
Use VertexOutComponent to find the out-component for directed graphs:

https://wolfram.com/xid/0ywrb6dlukqa-nzzif9

Wolfram Research (2010), VertexInComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexInComponent.html (updated 2020).
Text
Wolfram Research (2010), VertexInComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexInComponent.html (updated 2020).
Wolfram Research (2010), VertexInComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexInComponent.html (updated 2020).
CMS
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. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/VertexInComponent.html.
APA
Wolfram Language. (2010). VertexInComponent. Wolfram Language & System Documentation Center. Retrieved from 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
BibTeX
@misc{reference.wolfram_2025_vertexincomponent, author="Wolfram Research", title="{VertexInComponent}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/VertexInComponent.html}", note=[Accessed: 02-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_vertexincomponent, organization={Wolfram Research}, title={VertexInComponent}, year={2020}, url={https://reference.wolfram.com/language/ref/VertexInComponent.html}, note=[Accessed: 02-June-2025
]}