There is a function in the KnoxOR`Graphs` package called This command returns a list of all children
Question:
There is a function in the KnoxOR`Graphs` package called
This command returns a list of all children of vertices in the given list of parents, where adjmatrix is the adjacency matrix of a directed graph and a vertex \(v\) is a child of a vertex \(u\) iff there is an edge \((u, v)\) in the graph. Revise the Components function of Section 1.1 using FindChildren to produce a function called Descendants[adjmatrix, vertex] that returns the set of all vertices reachable by some path from the given vertex in the directed graph characterized by the given adjacency matrix. For each vertex in the graph of Figure 1.11, use the Descendants function to find the set of all descendants of that vertex.
Step by Step Answer:
Introduction To The Mathematics Of Operations Research With Mathematica
ISBN: 9781574446128
1st Edition
Authors: Kevin J Hastings