Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
(Redirected from Narayana numbers)
Triangular array of natural numbers
An example of a counting problem whose solution can be given in terms of the Narayana numbers , is the number of words containing pairs of parentheses, which are correctly matched (known as Dyck words) and which contain distinct nestings. For instance, , since with four pairs of parentheses, six sequences can be created which each contain two occurrences the sub-pattern ():
From this example it should be obvious that , since the only way to get a single sub-pattern () is to have all the opening parentheses in the first positions, followed by all the closing parentheses. Also , as distinct nestings can be achieved only by the repetitive pattern ()()()…().
More generally, it can be shown that the Narayana triangle is symmetric:
The sum of the rows in this triangle equal the Catalan numbers:
Monotonic lattice paths
The Narayana numbers also count the number of lattice paths from to , with steps only northeast and southeast, not straying below the x-axis, with peaks.
The following figures represent the Narayana numbers , illustrating the above mentioned symmetries.
Paths
N(4, 1) = 1 path with 1 peak
N(4, 2) = 6 paths with 2 peaks:
N(4, 3) = 6 paths with 3 peaks:
N(4, 4) = 1 path with 4 peaks:
The sum of is 1 + 6 + 6 + 1 = 14, which is the 4th Catalan number, . This sum coincides with the interpretation of Catalan numbers as the number of monotonic paths along the edges of an grid that do not pass above the diagonal.
Rooted trees
The number of unlabeled orderedrooted trees with edges and leaves is equal to .
This is analogous to the above examples:
Each Dyck word can be represented as a rooted tree. We start with a single node – the root node. This is initially the active node. Reading the word from left to right, when the symbol is an opening parenthesis, add a child to the active node and set this child as the active node. When the symbol is a closing parenthesis, set the parent of the active node as the active node. This way we obtain a tree, in which every non-root node corresponds to a matching pair of parentheses, and its children are the nodes corresponding to the successive Dyck words within these parentheses. Leaf nodes correspond to empty parentheses: (). In analogous fashion, we can construct a Dyck word from a rooted tree via a depth-first search. Thus, there is an isomorphism between Dyck words and rooted trees.
In the above figures of lattice paths, each upward edge from the horizontal line at height to corresponds to an edge between node and its child. A node has as many children, as there are upward edges leading from the horizontal line at height . For example, in the first path for , the nodes 0 and 1 will have two children each; in the last (sixth) path, node 0 will have three children and node 1 will have one child. To construct a rooted tree from a lattice path and vice versa, we can employ an algorithm similar to the one mentioned the previous paragraph. As with Dyck words, there is an isomorphism between lattice paths and rooted trees.
Partitions
In the study of partitions, we see that in a set containing elements, we may partition that set in different ways, where is the Bell number. Furthermore, the number of ways to partition a set into exactly blocks we use the Stirling numbers . Both of these concepts are a bit off-topic, but a necessary foundation for understanding the use of the Narayana numbers. In both of the above two notions crossing partitions are accounted for.
To reject the crossing partitions and count only the non-crossing partitions, we may use the Catalan numbers to count the non-crossing partitions of all elements of the set, . To count the non-crossing partitions in which the set is partitioned in exactly blocks, we use the Narayana number .
Generating function
The generating function for the Narayana numbers is