NestGraph
NestGraph[f,expr,n]
gives the graph obtained by starting with expr and applying f successively n times.
NestGraph[f,{expr1,expr2,…},n]
gives the graph obtained by applying f to expr1, expr2, ….
NestGraph[f,graph,n]
gives the graph obtained by applying f to the vertices of graph and extending the graph.
Details and Options

- NestGraph is also known as crawl graph or tree growing.
- expr can be an expression or a list of expressions or graphs.
- NestGraph[f,expr] is equivalent to NestGraph[f,expr,1].
- NestGraph[f,expr] gives a graph with edges {exprexpr1,…,exprexprk}, where f[expr] evaluates to {expr1,…,exprk}.
- NestGraph[f,{expr1,expr2,…}] is the graph union of NestGraph[f,expr1] and NestGraph[f,expr2],….
- NestGraph[f,graph] is the union of graph and NestGraph[f,{v1,…}], where vi are the vertices of graph.
- NestGraph[f,graph,n] is the union of NestGraph[f,graph,n-1] and NestGraph[f,{v1,…}], where vi are the vertices of NestGraph[f,graph,n-1].
- NestGraph[f,expr,n] is equivalent to NestGraph[f,graph,n], where graph is the singleton graph with only one vertex expr and no edges.
- NestGraph takes the same options as Graph.
- The option DirectedEdges can be used to control whether an undirected or directed graph is constructed.
Examples
open allclose allBasic Examples (4)
Scope (3)
Options (80)
Applications (2)
Properties & Relations (5)
Neat Examples (1)
See Also
Related Guides
Related Links
Introduced in 2015
(10.2)