Macaulay2 » Documentation
Packages » Graphs :: nondescendants
next | previous | forward | backward | up | index | toc

# nondescendants -- returns the nondescendants of a vertex of a digraph

- Usage:
    `L = nondescendants (D, v)`
- Inputs:
  - D, a digraph,
  - v, a thing, a vertex of the digraph
- Outputs:
  - L, a set, a set of all the nondescendants of v

## Description

The nondescendants of a directed graph are all the vertexSet u of D such that u is not reachable from v.

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

    i2 : nondescendants (D, d)

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

    o2 : Set

## See also

- children -- returns the children of a vertex of a digraph
- descendants -- returns the descendants of a digraph
- isReachable -- checks if a vertex u is reachable from a vertex v

## Ways to use nondescendants:

- `nondescendants(Digraph,Thing)`

## For the programmer

The object nondescendants is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Graphs.m2:3889:0.