# descendants(MixedGraph,Thing) -- return the descendants of a vertex of a mixed graph

## Synopsis

• Function: descendants
• Usage:
descendents (G,v)
descendants (G,v)
• Inputs:
• G, an instance of the type MixedGraph,
• v, , a vertex of G
• Outputs:

## Description

The descendants of v are the all the vertices u such that u is reachable from v in the directed edge set of the MixedGraph G. Another way to more intuitively see what the descendants are is to see the descendants of a vertex v can be found by first taking the children of v. Then if you take the children of each of the children, and continue the process until the list stops growing, this will form all the descendants of v.

The output also includes the vertex v from the input in the set of the descendants.

 i1 : G = mixedGraph(graph{{3,1}},digraph {{1,2},{2,3}},bigraph {{3,4},{2,4}}) o1 = MixedGraph{Bigraph => Bigraph{2 => {4} }} 3 => {4} 4 => {3, 2} Digraph => Digraph{1 => {2}} 2 => {3} 3 => {} Graph => Graph{1 => {3}} 3 => {1} o1 : MixedGraph i2 : descendants (G,1) o2 = set {1, 2, 3} o2 : Set i3 : descendants (G,2) o3 = set {2, 3} o3 : Set i4 : descendants (G,3) o4 = set {3} o4 : Set