Given a integer $n$, how many Dyck words are a substring of a Dyck word of size $n$, on average?
For example, if $n=2$, then Dyck words of size $2$ are :
- [ ] [ ]
- [ [ ] ]
(1) contains two strict "sub-Dyck words" : [ ] (with the first two parentheses) and [ ] (with the last two parentheses). And the original [ ] [ ]. The total is 3
(2) contains only one strict "sub-Dyck word": [ ]. And the original [ [ ] ]. The total is 2
So for $n=2$ the answer is 2.5, of course it is harder to compute when $n$ gets bigger.
Has anyone an idea on how to find a general formula for this problem?
This is the case for the "sub-Dyck words" of length $1$.
You can see http://en.wikipedia.org/wiki/Narayana_number. The "sub-Dyck words" can be regarded as the "peaks" in the Dyck path, and the Narayana number (distribution) counts the peaks of the given length n.