1. Introduction
Combinatorial objects such as permutations, combinations, partitions, graphs, trees, paths, etc. play an important role in mathematics and computer science and also have many applications in practice. Knuth [
1] gave an overview of the formation and development of the direction related to designing combinatorial algorithms. In this field of mathematics, the following tasks are distinguished: enumerating, listing, and generating combinatorial objects.
Sometimes combinatorial sets can be described by using number triangles, for example, for their enumerating (in this case, an element
of a number triangle shows the total number of objects in the corresponding combinatorial set
, i.e.,
where
is the cardinality of the combinatorial set
). A number triangle is a doubly-indexed sequence in which the length of each row corresponds to the index of the row. There are many well-known number triangles such as Pascal’s triangle, Catalan’s triangle, Euler’s triangles, Stirling’s triangles, Narayana’s triangle, etc., whose elements have a whole set of combinatorial interpretations [
2].
To define a number triangle, it is necessary to specify the rules for generating elements
of this triangle. For example, it can be some expression for
in the form of an explicit formula or a recurrence relation. It can also be an expression of a bivariate generating function:
Generating functions are a powerful tool for solving problems in many fields of mathematics and they can also be applied for studying combinatorial sets, especially for their enumeration. Some examples of using generating functions for solving this problem can be found in [
3,
4,
5,
6,
7]. In addition, describing the properties of combinatorial objects with the help of generating functions, it is often possible to find a relationship with special numbers [
8,
9,
10,
11,
12].
In this paper, we study labeled binary trees with ascents on the left branch and labeled Dyck paths with ascents on return steps. For these combinatorial objects, we obtain an explicit formula that counts the total number of such objects and a bivariate generating function. In addition, we present the relation of the obtained number triangle to Catalan’s and Euler’s triangles and call the obtained number triangle as Euler–Catalan’s triangle and the elements of this triangle as the Euler–Catalan numbers.
2. Combinatorial Objects
Binary trees are widely used in many different topics of discrete mathematics. They allow us to represent objects with a hierarchical structure in a convenient form for their storage and processing. Depending on the set of parameters and characteristics that describe the structural features of the binary tree, the class of binary trees is divided into many subclasses. Therefore, a large number of different combinatorial sets can be distinguished. There are also many different kinds of problems related to trees, for example, their enumeration or algorithmic problems that are discoursed in [
13].
Let us consider the following combinatorial object: a labeled binary tree of size
n with
m ascents on the left branch. In such a tree structure, a tree consists of
n nodes, each node has at most two children (the left child and the right child), and each node has its own label (a unique value from 1 to
n) [
14]. By the left branch of a tree, we mean the tree obtained by removing all right children (the identifier St000061 in [
15]). If we consider the sequence of labels of the left branch of a tree starting from the root, then it has exactly
m ascents (that is, there are exactly
m labels that are greater than the previous).
Figure 1 shows all possible variants of such labeled trees for
and
. For the left branch of a tree, every pair of labels that form an ascent is marked with a green edge and every pair of labels that form a descent is marked with a red edge.
The following combinatorial object has the same properties: a labeled Dyck n-path with m ascents on return steps. In such a Dyck n-path, each down-step has its own label (a unique value from 1 to n). If we consider the sequence of labels of down-steps of a Dyck n-path starting from , then it has exactly m ascents (that is, there are exactly m labels that are greater than the previous).
A Dyck
n-path is a lattice path in the plane which begins at
, ends at
, and consists of steps
called rises or up-steps and
called falls or down-steps. A return step is a down-step at level 1 (a return to the ground level 0) [
16]. There are many research papers dedicated to studying Dyck paths. For example, it can be: the enumeration of Dyck paths and the study of their statistics [
16,
17,
18], the study of different generalizations [
19,
20,
21,
22], the generation of Dyck paths, their ranking and unranking [
23,
24], and many other tasks.
Figure 2 shows all possible variants of the considered labeled Dyck paths for
and
.
The presented combinatorial objects have similar properties related to their structure and it is possible to define a bijection between them. We can also define other combinatorial objects that have similar properties. To do this, we need to consider such unlabeled combinatorial objects for which the number of objects is defined by the elements of the transposed Catalan triangle (the sequence
in OEIS [
25]).Then, we need to get the labeled version of such objects.
The connection of the transposed Catalan triangle with the Catalan numbers allows us to obtain a variety of combinatorial interpretations for the elements of this number triangle. It is possible because Catalan numbers are used in many combinatorial problems and there are more than 200 known combinatorial interpretations for them [
26,
27].
The Catalan numbers form the following sequence of positive integers (the sequence
in OEIS [
25]):
The Catalan numbers are denoted as
. According to Graham et al. [
2], an explicit formula for
is
and an ordinary generating function is
The Catalan numbers also satisfy the following recurrence relation:
In addition, there are many different generalizations of the Catalan numbers that associate them with other special numbers. For example, it could be numbers such as the Catalan–Mersenne numbers [
28], the Eulerian–Catalan numbers [
29], the Catalan–Daehee numbers [
30,
31,
32], etc.
3. Main Results
For the presented combinatorial objects, we have obtained an explicit formula for their enumerating. However, to state the theorem, it is necessary to consider the description of the following number triangles: the transposed Catalan triangle, Euler’s triangle, and the number of m-permutations of n.
The elements of the transposed Catalan triangle (the sequence
in OEIS [
25]) are denoted as
. According to Deutsch [
16], an explicit formula for
is
Table 1 presents several first values of the transposed Catalan triangle.
The elements of Euler’s triangle (the sequence
in OEIS [
25]) are denoted as
. The elements
of Euler’s triangle are also called the Eulerian numbers of the first kind [
33]. According to Graham et al. [
2], an explicit formula for
is
Table 2 presents several first values of Euler’s triangle.
The numbers of the
m-permutations of
n [
34] form the number triangle (the sequence
in OEIS [
25]) that elements are denoted as
. According to Graham et al. [
2], an explicit formula for
is
Table 3 presents several first values of this number triangle.
Theorem 1. The number of labeled binary trees of size n with m ascents on the left branch iswhere is the transposed Catalan triangle, is Euler’s triangle, and is the number of m-permutations of n. Proof. The number of binary trees of size
n with
m nodes on the left branch is defined by the elements of the transposed Catalan triangle
(the sequence
in OEIS [
25]). Then, we consider a labeled version of these binary trees (for each node, there is an associated unique value from 1 to
n). We need to count the number of ways to label the given binary tree of size
n with
k nodes on the left branch such that it has exactly
m ascents on the left branch. For this, it is necessary that the labels of
k nodes on the left branch form a permutation of
k elements with
m ascents and the remaining labels of
nodes form all possible permutations.
An ascent of a permutation
of
is a place where
[
2,
35]. The number of permutations of
n elements with
m ascents is defined by the elements of Euler’s triangle
(the sequence
in OEIS [
25]). The number of permutations of
m elements given from a set of
n elements is defined by
(the sequence
in OEIS [
25]). Hence, combining Equations (
1) and (
2), we get the number of ways to label the given binary tree of size
n with
k nodes on the left branch such that it has exactly
m ascents on the left branch
If we consider all variants of binary trees of size
n with
k nodes on the left branch for
k from
to
n (since
for
) and get the number of ways to label them using Equation (
4), we obtain the total number of labeled binary trees of size
n with
m ascents on the left branch
We also need to consider a special case for when . This means that there is only one variant to get a labeled binary tree of size 0 without ascents on the left branch (an empty labeled binary tree).
Hence, we obtain the desired result in Equation (
3). □
It is known that the number of Dyck
n-paths with
m return steps is also defined by the elements of the transposed Catalan triangle [
16]. If we consider labeled version of Dyck
n-paths with
k return steps (for each down-step there is an associated unique value from 1 to
n) with
m ascents on return steps, then we can get the same result:
Corollary 1. The number of labeled Dyck n-paths with m ascents on return steps iswhere is the transposed Catalan triangle, is Euler’s triangle, and is the number of m-permutations of n. Proof. The proof of Corollary 1 is the same as for Theorem 1: we need to count the number of ways to label the given Dyck n-path with k return steps such that the labels of k return steps form a permutation of k elements with m ascents and the remaining labels of return steps form all possible permutations. □
The sequence of
forms a number triangle (see
Table 4). Due to the connection with Catalan’s and Euler’s triangles, let us call it Euler–Catalan’s triangle. The elements
of Euler–Catalan’s triangle are here called the Euler–Catalan numbers.
The next step in studying the introduced number triangle is to obtain an expression for the generating function of the Euler–Catalan numbers.
Theorem 2. The Euler–Catalan numbers are defined by the following bivariate generating function:where is the generating function of the Catalan numbers. Proof. Let us consider
as the composition of generating functions
where
is the bivariate generating function of Euler’s triangle [
2].
According to Kruchinin and Kruchinin [
36], if we have the composition
of generating functions
and
, then we can obtain the values of the coefficient function
where
is the composita of the generating function
:
The composita of
is [
37]
Using Equation (
6) for the composition
, we get
Hence, we obtain the desired result in Equation (
5). □
4. Conclusions
In this paper, we study labeled binary trees of size n with m ascents on the left branch and labeled Dyck n-paths with m ascents on return steps. Using properties of Catalan’s and Euler’s number triangles, we obtain the explicit formula that counts the total number of such combinatorial objects. The obtained results can be generalized for enumerating many other combinatorial sets that are also related to labeled versions of combinatorial interpretations for the transposed Catalan triangle.
In addition, for these combinatorial objects, we derive the bivariate generating function. Information about the generating function that describes a combinatorial set can be applied for a more detailed study of the properties of the combinatorial set.