 networks(deprecated)/path - Maple Help

networks

 path
 finds a path in a directed tree Calling Sequence path([a, b], G) Parameters

 G - graph or network [a, b] - list of two vertices Description

 • Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.
 • If there is a directed path from a to b a list containing the nodes on the path is returned. The message FAIL is returned when no such path can be found.
 • The notion of a path depends exclusively on the status of the ancestor and daughter tables. These properties are not ordinarily maintained by the standard graph primitives such as addedge() and delete().  It is maintained by calls to spantree() and shortpathtree().
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[path](...). Examples

Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $G≔\mathrm{petersen}\left(\right):$
 > $T≔\mathrm{shortpathtree}\left(G,1\right):$
 > $\mathrm{ancestor}\left(T\right)$
 ${table}{}\left(\left[{2}{=}\left\{{1}\right\}{,}{3}{=}\left\{{2}\right\}{,}{4}{=}\left\{{5}\right\}{,}{5}{=}\left\{{1}\right\}{,}{6}{=}\left\{{1}\right\}{,}{7}{=}\left\{{6}\right\}{,}{9}{=}\left\{{5}\right\}{,}{8}{=}\left\{{2}\right\}{,}{10}{=}\left\{{6}\right\}\right]\right)$ (1)
 > $\mathrm{daughter}\left(T\right)$
 ${table}{}\left(\left[{1}{=}\left\{{2}{,}{5}{,}{6}\right\}{,}{2}{=}\left\{{3}{,}{8}\right\}{,}{3}{=}{\varnothing }{,}{4}{=}{\varnothing }{,}{5}{=}\left\{{4}{,}{9}\right\}{,}{6}{=}\left\{{7}{,}{10}\right\}{,}{7}{=}{\varnothing }{,}{9}{=}{\varnothing }{,}{8}{=}{\varnothing }{,}{10}{=}{\varnothing }\right]\right)$ (2)
 > $\mathrm{path}\left(\left[9,1\right],T\right)$
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{path}\left(\left[1,9\right],T\right)$
 $\left[{1}{,}{5}{,}{9}\right]$ (4)