IncidentEdges - Maple Help

GraphTheory

 IncidentEdges
 find graph edges incident on a vertex

 Calling Sequence IncidentEdges(G, V, d)

Parameters

 G - graph or digraph V - vertex or list of vertices d - (optional) equation of the form direction=incoming or outgoing

Description

 • IncidentEdges returns the set of edges (arcs) which are incident to a given vertices.  If G is a directed graph, then the set of arcs which have a tail in the given list of vertices are returned.
 • IncidentEdges(G, V, direction=incoming) returns the set of arcs which have a head in the given set of vertices.

Examples

 > $\mathrm{with}\left(\mathrm{GraphTheory}\right):$
 > $G≔\mathrm{CycleGraph}\left(7\right)$
 ${G}{≔}{\mathrm{Graph 1: an undirected graph with 7 vertices and 7 edge\left(s\right)}}$ (1)
 > $\mathrm{IncidentEdges}\left(G,1\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{7}\right\}\right\}$ (2)
 > $\mathrm{IncidentEdges}\left(G,\left[1,5,7\right]\right)$
 $\left\{\left\{{1}{,}{2}\right\}{,}\left\{{1}{,}{7}\right\}{,}\left\{{4}{,}{5}\right\}{,}\left\{{5}{,}{6}\right\}{,}\left\{{6}{,}{7}\right\}\right\}$ (3)
 > $\mathrm{DG}≔\mathrm{Digraph}\left(\mathrm{Trail}\left(1,2,3,4,5,3\right),\mathrm{Trail}\left(1,5,2,4,1\right)\right)$
 ${\mathrm{DG}}{≔}{\mathrm{Graph 2: a directed graph with 5 vertices and 9 arc\left(s\right)}}$ (4)
 > $\mathrm{IncidentEdges}\left(\mathrm{DG},\left[2,3\right]\right)$
 $\left\{\left[{2}{,}{3}\right]{,}\left[{2}{,}{4}\right]{,}\left[{3}{,}{4}\right]\right\}$ (5)
 > $\mathrm{IncidentEdges}\left(\mathrm{DG},\left[2,3\right],\mathrm{direction}=\mathrm{incoming}\right)$
 $\left\{\left[{1}{,}{2}\right]{,}\left[{2}{,}{3}\right]{,}\left[{5}{,}{2}\right]{,}\left[{5}{,}{3}\right]\right\}$ (6)
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 13, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}