1

(Notice: The ordered tree here is irrelevant to any sorting utility in programming but is a term in graph theory or combinatorics.)

The question comes in three-fold:

  1. the wiki says an ordered tree is alternatively called a positional tree;
  2. this answer counts k-ary n-vertices ordered tree with Fuss-Catalan number; (p.s. I edited the title of this post from labeled to ordered since labeled is evidently inappropriate, but now I think ordered is ambiguous as well)
  3. this answer counts n-vertices ordered tree with Catalan number (no specification on the outdegree), which is equivalent to Fuss-Catalan number $C_n^{(2)}$.

Although (2) and (3) both claimed that they are counting ordered trees, they actually define the ordered tree in different ways:

  • In (2), I prefer to call it a positional tree. Each child is assigned to a specific position/slot within its parent, i.e., for a m-ary with 2 nodes, it counts to m trees rather than only 1, because the child could be set to 'different slot' within the parent;
  • In (3),I prefer to call it an ordered tree. Children under the same parent are ordered, i.e., for a m-ary with 2 nodes, it counts to only 1 tree.

I am not sure if 'my private discrimination' is appropriate since the wiki indicates these two terms can be used interchangeably, and most posts did not differ them seriously.

But I do think it is different.

I sincerely appreciate any advice or suggestions.

Xavier Z
  • 133

1 Answers1

1

After investing in some materials referred to by Wiki, I decided to answer the question myself before any other answer came up.
I did not close or delete the post since something is actually nontrivial under the topic.

Any corrections and suggestions are warmly welcomed.

In Short

The answer is that an ordered tree is not equivalent to a positional tree. The indication on Wiki is not correct.

In most contexts it is fine to use them interchangeably, although there are some subtle distinctions, readers can fix it themselves.

However, when someone tries to make an overall view, connecting all pieces together, the subtle distinction may be confusing.

The puzzle occurred to me when I tried to conclude several counting problems, as the post stated.

In Reference

The Wiki referred to three materials about the 'ordered tree'; therefore, I will introduce detailed information from the corresponding material here. These references are numbered as follows for convenience.

(1) Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2022). Introduction to Algorithms (4th ed.). Section B.5.3.
(2) Bender, Edward A.; Williamson, S. Gill (2010), Lists, Decisions and Graphs. With an Introduction to Probability
(3) Stanley, Richard P. (2012), Enumerative Combinatorics, Vol. I, Cambridge Studies in Advanced Mathematics, vol. 49, Cambridge University Press

In (1), the positional and ordered trees are explicitly defined as different structures.
Furthermore, k-ary tree is confined to k-ary positional tree in (1).
The definitions are as follows:

(p.1173) An ordered tree is a rooted tree in which the children of each node are ordered.

(p.1174) In a positional tree, the children of a node are labeled with distinct positive integers. (p.s. notice it is irrelevant with the labeled tree)

There is another statement telling the difference, as there is no concept like absent child for ordered trees, but for positional trees:

(p.1174) The i-th child of a node is absent if no child is labeled with integer i .

In (2), the plane tree is equivalent to an ordered tree, which is also simply called a tree. It does not refer to concepts like positional tree in (1).
(p.s. the Wiki indicates that plane, positional, and ordered tree are synonyms)

(p.173) Let (T, r) be a rooted tree. For each vertex, order the children of the vertex. The result is a rooted plane tree, which we abbreviate to RPtree. RP-trees are also called ordered trees.

In (3), the ordered tree is synonymous with the plane tree; however, it is not the same as the definition in (2): in (3), this term is more like a labeled tree, which has a more consistent definition on wiki.

I omit the exact definition for the lack of space; interested readers could refer to the section of Appendix.Graph Theory Terminology in (3).

Inference

Fuss-Catalan number counts the number of positional trees

It is well-founded to claim that, the number of counting n-nodes k-ary positional trees can be represented by Fuss-Catalan number $C_n^{(k)}$, as post-1 and post-2 indicated. The ordered tree in these posts are actually positional trees by the definition from (1).

This assertion can be proved by the following equation from post-2:

$$ C_n^{(m)} = \sum_{n_1+n_2+...+n_m=n-1}C_{n_1}^{(m)}C_{n_2}^{(m)}...C_{n_m}^{(m)} + [n=0] $$

Let us investigate two cases:
case 1, $n_1=c,n_2=0$;
case 2, $n_1=0,n_2=c$.
If it is counting ordered trees, since these two cases are exactly isomorphic, they should be counted only once.
However, according to the definition of Fuss-Catalan number, both cases count independently, which fits the definition of the positional trees, i.e., subtrees under $n_1$ and $n_2$ are labeled with distinct integers, and thus constitute non-isomorphic trees.

Catalan number counts ordered trees

The ordered tree in post-3 is consistent with the definition of ordered tree in (1).

These trees with n-nodes and no outdegree limitation can be counted as they can be encoded as binary trees.
Binary trees are 2-ary trees and thus are positional trees. Thereby, these trees can be counted directly by Catalan number, which is a special case of Fuss-Catalan number:

$$k=2 \iff C_n^{(k)} = C_n^{(2)} = C_n$$

In Conclusion

In my humble opinion, positional trees are intrinsic ordered trees, as children are labeled with distinct integers, implying an ordering.
But ordered trees are not necessarily positional trees.

For example, consider a tree with 4 nodes, and each node has up to 2 children:

(star as vertex, numbers are labeled on edges)

(a) * (b) * (c) * / \ / \ /
1 2 0 1 0 1 / \ / \ / \


    / \              / \        / \
   0   1            0   1      0   1
  /     \          /     \    /     \
 *       *        *       *  *       *

(a) and (b) are distinct as postional trees.
With all numbers removed, (a) and (b) are identical as ordered trees, and they are distinct from (3).
Furthermore, all numbers removed, (a), (b), and (c), are identical as unordered trees.

Xavier Z
  • 133