Let $$$C_i$$$ be $$$i^{th}$$$ catalan number. Is it possible to derive a generalised formula for convolution of catalan numbers in $$$k$$$ variables.
For example:
For $$$K = 2$$$,
$$$\sum_{i=0}^{n} {C_iC_{n-i}} = C_{n+1}$$$
For $$$K = 3$$$,
$$$\sum_{i=0}^{n} \sum_{j=0}^{n} {C_iC_jC_{n-i-j}} = C_{n+2} - C_{n+1}$$$
For $$$K = 4$$$,
$$$\sum_{i=0}^{n} \sum_{j=0}^{n} \sum_{k=0}^{n} {C_iC_jC_kC_{n-i-j-k}} = C_{n+3} - {2 C_{n+2}}$$$
I wanted to know, does any formula exist for any generalized K?
probably, yeah
I tried to derive, but seemed hard..
I'd have to agree with you there
bro said a bunch of nothing
Well let's take a second to think about the positive impact I made here: I took his post from the bottom to the top of the recent actions tab. Now, the probability that someone actually answers his question is quite a bit higher.
Assuming F(k, n) = sum(Xik * C(n + i)) for i from 1 to k where Xik is coefficient of C(n + i) in F(k, n)
F(n, k + 1) = sum(F(t, k) * C(n — t)) for t from 0 to n (Combine first k factors while summing)
= sum(Xik * sum(C(S + i) * C(n — S)) for S from 0 to n) for i from 1 to k (Just written by expanding)
= sum(Xik * (C(n + i + 1) — (sum(C(j) * C(n + j)) for j from 0 to i — 1)) for i from 1 to k (Negation comes as some of the terms were missing from product(using formula for K = 2)
So I am getting somewhat recursive way of getting the coefficients, maybe implementation can help us get few more F's to make some observation.
One silly implementation later:
A pretty clear Pascal's triangle pattern, but... in each column, the numbers seem to be shifted down by double the normal amount! This could very well be related to the other formula for Catalan numbers:
$$$C_{n} = \binom{2n}{n} - \binom{2n}{n-1}$$$
ooh, that's great, how did you come up with this? I just wanted to know how did u figure out this pattern, just as part of learning
brutfors
A realer answer: At some point, you'll see a lot of patterns appear in problems. It can be the Pascal Triangle, Catalan numbers, pentagonal numbers, Stirling's numbers of the second kind etc. Once you see them enough times, you start realising: "hey, I should probably memorise the first few terms of these sequences, so when there is a weird combinatorial problem, I can just bruteforce some small values and see if any of these sequences emerge!". Sometimes, it turns out the answer is really simple, like in this case. And now, once you have intuition for the pattern, proving mathematically (if necessary) should be really easy.
So, in combinatorics, just as in game theory, it's always worth bruteforcing for a bit and looking for common patterns! Intuition rocks
You can use generating functions to brute-force this.
A simpler way is to use the first relation (which is often used to derive the generating function $$$f$$$) in the form: $$$x f(x)^2 - f(x) + 1 = 0$$$. This resembles a second order recurrence. You can now do things like this:
Basically, you note that the $$$k$$$-variable identity is the convolution of the generating function with itself $$$k$$$ times. To find a general formula, a more direct way is to just expand:
The RHS gives a linear function in the coefficients of $$$f(x)$$$ which are just the Catalan numbers.
this is awesome, so I can use ideas of generative functions to deal with simplifying any combinatorics expressions.