This resource function is obsolete. Use the function NeighborhoodGraph instead.

Function Repository Resource:

# SubgraphExpand

Expand a subgraph inside the space of a graph

 ResourceFunction["SubgraphExpand"][g,{v1,v1,…},r] selects the subgraph of graph consisting of all edges between only those vertices of g whose GraphDistance through g to the nearest vertex vi is less than or equal to radius r. ResourceFunction["SubgraphExpand"][g,sg,r] accepts subgraph sg as the initial value (or kernel) of the expansion.

## Details

ResourceFunction["SubgraphExpand"] accepts the same options as Graph.

## Examples

### Basic Examples (2)

Expand a cycle graph around one vertex:

 In[1]:=
 Out[1]=

Expand a grid graph around its central vertex at several radii:

 In[2]:=
 Out[2]=

Use directed edges to only expand the grid graph into the Northeast quadrant:

 In[3]:=
 Out[3]=

### Scope (2)

Expand a graph around multiple initial vertices:

 In[4]:=
 Out[4]=

Define a graph:

 In[5]:=
 Out[5]=

Extract a subgraph:

 In[6]:=
 Out[6]=

Expand that subgraph by radius one:

 In[7]:=
 Out[7]=

### Possible Issues (2)

SubgraphExpand does not recognize subgraph isomorphism:

 In[8]:=
 Out[8]=

This can be fixed by manually choosing vertices:

 In[9]:=
 Out[9]=

### Neat Examples (1)

Expand a polyhedral skeleton graph into three dimensions:

 In[10]:=
 Out[10]=