# edgeCut -- break up a tree at an edge

## Synopsis

• Usage:
edgeCut(T,e,newl)
edgeCut(T,E,newl)
• Inputs:
• T, an instance of the type LeafTree,
• e, a set, an edge specified by the set of leaves on one side of it
• E, a list, an edge specified by a list of the leaves on one side of it
• newl, , the label for a new leaf
• Outputs:

## Description

This function outputs the two subtrees of T obtained by deleting edge e from T and then re-adding the edge to each of the two resulting subtrees. Both subtrees share a copy of the edge e and the newly labeled leaf adjacent to e. Other than this overlap, they are disjoint.

Each subtree in P may have at most one leaf that was not a leaf of T, and therefore previously unlabeled. The label for this new leaf is 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 = edgeCut(T, set {0,1}, 4); i3 : P#0 o3 = {{0, 1, 4}, {set {0}, set {1}, set {4}}} o3 : LeafTree i4 : P#1 o4 = {{2, 3, 4}, {set {2}, set {3}, set {4}}} o4 : LeafTree