next | previous | forward | backward | up | top | index | toc | Macaulay2 website
PhylogeneticTrees :: vertexCut

vertexCut -- Breaks up a tree at a vertex

Synopsis

Description

Vertices of a LeafTree do not have explicit names. Therefore a vertex $v$ is specified by naming an edge $e$ incident to $v$, and leaf $l$ on the opposite side of the edge as $v$.

The function outputs the subtrees of $T$ obtained by deleting the vertex $v$ from $T$ and then re-adding $v$ to each of the resulting subtrees as a new leaf. The new leaf on each subtree is adjacent to the edge previously adjacent to $v$ on $T$. Each subtree has a copy of the vertex labeled newl, but their edge sets are disjoint.

Each subtree in $P$ may have at most one leaf that was not a leaf of $T$, and therefore previously unlabeled. This leaf label is determined by the user and input as newl.

i1 : T = leafTree(4,{{0,1}})

o1 = {{0, 1, 2, 3}, {set {0, 1}, set {0}, set {1}, set {2}, set {3}}}

o1 : LeafTree
i2 : P = vertexCut(T, set {0,1}, 0, 4);
i3 : P#0

o3 = {{3, 4}, {set {3}}}

o3 : LeafTree
i4 : P#1

o4 = {{2, 4}, {set {2}}}

o4 : LeafTree
i5 : P#2

o5 = {{0, 1, 4}, {set {0}, set {1}, set {4}}}

o5 : LeafTree

See also

Ways to use vertexCut :

For the programmer

The object vertexCut is a method function.