Symbols and Functions > Utility Functions >
AcyclicGraphTake gives the intersection of the out-component of the first vertex
with the in-component of the second vertex:
In[] := graph = BlockRandom[
DirectedGraph[RandomGraph[{10, 10}], "Acyclic", VertexLabels -> Automatic],
RandomSeeding -> 2
]In[] := AcyclicGraphTake[graph, {1, 9}]![Out[] = ... directed acyclic graph with 10 vertices and multiple branches ...](/maxitg/SetReplace/raw/7b4fabdc33857213970323e2e94d4b9fefdf46ed/Documentation/Images/AcyclicGraphTakeInput.png)
![Out[] = ... subgraph of the input graph with only vertices between 1 and 9 remaining ...](/maxitg/SetReplace/raw/7b4fabdc33857213970323e2e94d4b9fefdf46ed/Documentation/Images/AcyclicGraphTakeOutput.png)