tubular

matroid prime

mathematics

video games

internet sludge

brain problems


next home after cohost
tubs.bearblog.dev/

suppose, for the sake of me practicing writing mathml, that you have a generating function taking the form of a rational function, whose coefficients you'd like to extract.

f ( x ) = P ( x ) Q ( x ) = n = 0 a n x n

suppose further that you have to do this :host-shock: by hand :eggbug-nervous:

instead of trying to futz around with a n = f (n) (0) / n ! (because you know already that the iterated derivatives of f are going to be so annoying) there's a neat trick you can do involving the geometric series formula. wlog check this shit out:

f ( x ) = P ( x ) Q ( x ) = p ( x ) x d ( 1 - q(x) ) = x -d p ( x ) ( 1 + q(x) + q(x) 2 + )

where of course p ( x ) and q ( x ) and d are easily determined from P and Q.

imo this simple product form is good actually for generating function–style thinking. it even has a reasonably simple interpretation in terms of ℕ-weighted sets and the kleene star: whatever f is counting, it's basically something that (up to a shift of d) decomposes into a p and a q* (i.e. a finite string of qs).

unfortunately you may need some mental gymnastics à la virtual species (though of course we have ordinary genfuncs here and not EGFs) to interpret negative terms in p and especially q. but i think this is a relatively small price to pay for algebra this clean


You must log in to comment.