## You are here

Homeordered tree

## Primary tabs

# ordered tree

A tree is, by definition, a partially ordered set. An *ordered tree* is a tree equipped with a linear extension. In other words, its a linear order on the nodes of the tree that obeys the parent-child relationship of the tree. By Zorn’s lemma, every tree can be ordered. When a tree $T$ is finite, the linear extension of the tree can be constructed inductively:

1. First, label the nodes of $T$: each label is an $n$-tuple of positive integers, for some $n$,

(a) the root of $T$ is labeled $(1)$,

(b) if a node $V$ of $T$ has been labeled $(m_{1},\ldots,m_{k})$, and if the children of $T$ are $V_{1},\ldots,V_{{\ell}}$, then label each $V_{i}$ by $(m_{1},\ldots,m_{k},i)$.

From this labeling process, we see that the (direct) children of the root have labels $(1,1),(1,2),\ldots$. In general, if a node is of level $k$, its label is a $k$-tuple starting with $1$. It is easy to see that each label corresponds to a unique node of $T$: for if two distinct nodes are of different level, their labels are clearly different. However, if they are of the same level, then the last components of their labels are distinct.

2. Next, order the labels of the nodes lexicographically. In other words, given an $m$-tuple $p=(p_{1},\ldots,p_{m})$ and an $n$-tuple $q=(q_{1},\ldots,q_{n})$, compare them componentwise, starting from the first. There are two cases:

(a) either all $k$ components match, where $k=\min(m,n)$, or

(b) $p_{j}\neq q_{j}$, but $p_{i}=q_{i}$ for all $i<j$, where $j\leq\min(m,n)$.

Then $p<q$ iff $m<n$ in the first case, or $p_{j}<q_{j}$ in the second. This ordering on the labels induces an ordering on the nodes: for nodes $V$ and $V^{{\prime}}$ with labels $p$ and $p^{{\prime}}$,

$V\leq V^{{\prime}}\qquad\mbox{iff}\qquad p\leq p^{{\prime}}.$ This ordering on the nodes is linear, and extends the partial ordering on $T$.

For example, below are two diagrams of the same tree. The one on the right is labeled by the method above:

By ordering the labels, we get the corresponding ordering of the nodes:

$a<b<e<f<c<g<h<i<j<k<d.$ |

## Mathematics Subject Classification

03E05*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections