next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Graphs :: forefathers

forefathers -- returns the forefathers of a digrah

Synopsis

Description

The forefathers of a vertex v in a digraph D are all the vertexSet u in D such that v is reachable from u. Another way to more intuitively see what the forefathers are is to see the forefathers of a vertex v can be found by first taking the parents of v. Then if you find the parents of each of the parents of v, and continue the process until the list stops growing, this will form all the descandants of v.

i1 : D = digraph({a,b,c,d,e},{{a,b},{b,c},{b,d},{e,b}});
i2 : forefathers (D, d)

o2 = set {a, b, d, e}

o2 : Set

Caveat

The forefathers of a vertex in a digraph are more commonly known as the ancestors. But ancestors is an entirely different function in Macaulay 2, so forefathers is the convention we will use

See also

Ways to use forefathers :

For the programmer

The object forefathers is a method function.