0

I am working with a complex generating function and need help extracting a specific coefficient from it. The function is defined as follows:

$$ F(x,y,z,w) = \frac{1}{1 - x - xy + x^2y - x^2yz + x^3yz - x^3yzw + x^3y^2z - x^3y^2zw - x^4y^2z + 2x^4y^2zw - x^4y^2zw^2} $$

I am looking to determine the coefficient of $x^ny^kz^mw^l$ in the function $F(x,y,z,w)$. I'd really appreciate any tips or resources on handling such complex functions.

1 Answers1

2

For real?.. Okay, as you wish. Per WolframAlpha, the denominator "simplifies" as $$ 1-x (1 + y (1 - x (1 - z (1+x(w - 1) ) (1 + x y(w - 1) )))) $$ So, we need to find $$ [x^a y^b z^c w^d] \sum\limits_{m \geq 0} x^m (1 + y (1 - x (1 - z (1+x(w - 1) ) (1 + x y(w - 1) ))))^m $$ Let's expand the outermost parentheses... $$ [x^a y^b z^c w^d] \sum\limits_{m \geq 0} x^m \sum\limits_{n} \binom{m}{n} y^n (1 - x (1 - z (1+x(w - 1) ) (1 + x y(w - 1) )))^n $$ Keep expanding... $$ [x^a y^b z^c w^d] \sum\limits_{m \geq 0} \sum\limits_n \binom{m}{n} y^n \sum\limits_k \binom{n}{k} (-1)^{k} x^{m+k}(1 - z (1+x(w - 1) ) (1 + x y(w - 1) ))^k $$ Okay, now we finally can factor $(-1)^c\binom{k}{c}$ out: $$ (-1)^c [x^a y^b w^d] \sum\limits_{m \geq 0}\sum\limits_{n} \binom{m}{n} y^n \sum\limits_k \binom{n}{k} (-1)^{k} x^{m+k}\binom{k}{c} (1+x(w - 1) )^c (1 + x y(w - 1) )^c $$ Now, $(1+xy(w-1))^c$ must expand into $b-n$ to match with $y$: $$ (-1)^c [x^a w^d]\sum \limits_{m \geq 0} \sum\limits_{n} \binom{m}{n}\binom{c}{b-n} \sum\limits_k (-1)^{k} \binom{n}{k}\binom{k}{c} x^{m+k+b-n}(w-1)^{b-n}(1+x(w - 1) )^c $$ Now, $(1+x(w-1))^c$ must expand into $a-m-k-b+n$ to match with $x$: $$ (-1)^c [w^d] \sum\limits_{m \geq 0} \sum\limits_n\binom{m}{n} \binom{c}{b-n}\sum\limits_k (-1)^{k} \binom{n}{k}\binom{k}{c} \binom{c}{a-m-k-b+n}(w-1)^{a-m-k} $$ Finally, $(w-1)^{a-m-k}$ expands into $d$ to match $w$: $$ (-1)^{a+c+d} \sum\limits_{m \geq 0} \sum\limits_n(-1)^{m}\binom{m}{n} \binom{c}{b-n}\sum\limits_k \binom{n}{k}\binom{k}{c} \binom{c}{a-m-k-b+n}\binom{a-m-k}{d} $$ Note that $\binom{n}{k}\binom{k}{c} = \binom{n}{c}\binom{n-c}{k-c}$, hence we factor $\binom{n}{c}$ out:

$$ (-1)^{a+c+d} \sum\limits_{m\geq 0} \sum\limits_{n}(-1)^{m}\binom{m}{n} \binom{c}{b-n}\binom{n}{c}\sum\limits_k\binom{n-c}{k-c}\binom{c}{a-m-k-b+n} \binom{a-m-k}{d} $$ Well, that's still tough to crack. But let's change $m \to a-m-k$, we get $$ (-1)^{c+d} \sum\limits_{n,k}\sum\limits_{m \leq a-k} (-1)^{m+k}\binom{c}{b-n}\binom{n}{c}\binom{m}{d}\binom{c}{m-b+n} \binom{a-m-k}{n} \binom{n-c}{k-c} $$ Equivalently, the sum rewrites as $$ (-1)^{c+d}\sum\limits_{m,n} (-1)^m\binom{n}{c} \binom{m}{d} \binom{c}{b-n} \binom{c}{m-b+n} \sum\limits_{k \leq a-m}(-1)^k \binom{a-m-k}{n}\binom{n-c}{k-c} $$ For simplicity, we can rewrite the later inner sum as $$ (-1)^c \sum\limits_{k \leq a-m-c} \binom{n-c}{k} \binom{a-m-c-k}{n}(-1)^{k} $$ Now, if the sum was unbounded, it would rewrite as

$$ (-1)^c \sum\limits_k \binom{n-c}{k} (-1)^k[x^n](1+x)^{a-m-c-k} $$ Which then collapses into $$ (-1)^c [x^n] (1+x)^{a-m-c} \left(\frac{x}{1+x}\right)^{n-c} = (-1)^c\binom{a-m-n}{c} $$ And on practice, if $a-m-c \geq n-c$, that is, $a \geq m+n$, this is the actual closed form of the inner sum, as the summands with larger $k$ would be voided by $\binom{n-c}{k}$ being zero. Correspondingly, if $a < m + n$, the whole sum collapses into $0$, as $\binom{a-m-c-k}{n}$ is always zero on such $k$. Thus, we can simplify the whole sum into

$$ (-1)^{d} \sum\limits_{n=0}^a \sum\limits_{m=0}^{a-n}(-1)^m \binom{n}{c} \binom{m}{d} \binom{c}{b-n} \binom{c}{m+n-b}\binom{a-m-n}{c} $$ Let's substitute $m \to m-n$ and we will get

$$ \boxed{(-1)^{d} \sum\limits_{m=0}^{a}(-1)^m \binom{a-m}{c}\binom{c}{m-b}\sum\limits_{n=0}^m (-1)^n\binom{m-n}{d}\binom{n}{c} \binom{c}{b-n} } $$ I don't think this simplifies further as long as binomial coefficients go. On the other hand, It is quite likely that you would have received this formula much easier directly from the combinatoric nature of the problem you're solving.

If any closed form exists, it would likely involve some hyper-geometric functions, or maybe a recurrence that depends on $a,b,c,d$. Maybe someone more proficient in these matters can take it up from the sum above.

UPD: From computational perspective, you can represent the sequence

$$ f_m = \sum\limits_{n=0}^m (-1)^n \binom{m-n}{d} \binom{n}{c} \binom{c}{b-n} $$ as the convolution

$$ f_m = \sum\limits_{n=0}^m \alpha_n \beta_{m-n}, $$

where $\alpha_n = (-1)^n \binom{n}{c}\binom{c}{b-n}$ and $\beta_n = \binom{n}{d}$. Representing it in this way and using fast polynomial multiplication techniques, you at least can find the desired coefficient in $O(a \log a)$ rather than $O(a^2)$.

  • Oof, I assume it's correct, but it's scary as hell. I expected it to be simpler. Well, I guess I'll post the original problem. Thanks! – Valeriy Savchenko May 04 '24 at 15:59
  • If you are interested here's the actual problem. Maybe it does have a nice combinatoric way of solving it: https://math.stackexchange.com/questions/4910371/finding-coefficient-in-a-complex-multivariable-generating-function. Many thanks again! – Valeriy Savchenko May 04 '24 at 16:59