Leaf of a tree (source code)

= Leaf of a tree

= Tree leaf
{synonym}

A <leaf of a tree> is a <vertex> of degree one in an unrooted <tree>. In a <rooted tree>, the usual convention instead calls a vertex a <leaf of a tree> when it has no children, so the one-vertex <rooted tree> has a leaf even though its degree is zero. Every finite <tree> with at least two vertices has at least two leaves: the endpoints of a longest simple <path> cannot have an unused neighbour without extending that <path>. Removing a leaf and its incident edge leaves a <tree>, a useful step in <mathematical induction>.