- #1
techmologist
- 306
- 12
ere me now.
I'm trying to figure out how many words of length r having exactly k distinct letters can be made with an alphabet of size n. Call this number a_k,r. It satisfies the recursion
[tex]a_{k,r} = ka_{k,r-1} + (n-k+1)a_{k-1,r-1}[/tex]
[tex]a_{1,r} = n[/tex] for r >= 1
[tex]a_{k,r} = 0[/tex] for r < k
My best effort so far is to use a generating function as follows
[tex]f_k(x) = \sum_{r=1}^{\infty}a_{k,r}x^r[/tex]
and use the recursion formula to get
[tex]f_k(x) = \frac{(n-k+1)x}{1-kx}f_{k-1}(x) = \frac{x^{k-1}(n-1)(n-2)...(n-k+1)}
{(1-x)(1-2x)...(1-kx)}f_1(x)[/tex]
or since f_1(x) = n/(1-x),
[tex]f_k(x) = \frac{(k-1)!\left(^n_{k-1} \right)x^{k-1}}{(1-x)(1-2x)...(1-kx)}[/tex]
I'm having a well difficult time getting the coefficient of x^r (which would be a_k,r) in the expansion of this. Is there a way to simplify it so you don't have k nested sums? thanks.
I'm trying to figure out how many words of length r having exactly k distinct letters can be made with an alphabet of size n. Call this number a_k,r. It satisfies the recursion
[tex]a_{k,r} = ka_{k,r-1} + (n-k+1)a_{k-1,r-1}[/tex]
[tex]a_{1,r} = n[/tex] for r >= 1
[tex]a_{k,r} = 0[/tex] for r < k
My best effort so far is to use a generating function as follows
[tex]f_k(x) = \sum_{r=1}^{\infty}a_{k,r}x^r[/tex]
and use the recursion formula to get
[tex]f_k(x) = \frac{(n-k+1)x}{1-kx}f_{k-1}(x) = \frac{x^{k-1}(n-1)(n-2)...(n-k+1)}
{(1-x)(1-2x)...(1-kx)}f_1(x)[/tex]
or since f_1(x) = n/(1-x),
[tex]f_k(x) = \frac{(k-1)!\left(^n_{k-1} \right)x^{k-1}}{(1-x)(1-2x)...(1-kx)}[/tex]
I'm having a well difficult time getting the coefficient of x^r (which would be a_k,r) in the expansion of this. Is there a way to simplify it so you don't have k nested sums? thanks.