Difference between revisions of "Generating function"

m (generatings functions are power series, not polynomials in general)
Line 1: Line 1:
The idea behind generating functions is to represent a [[combinatorics|combinatorial]] [[function]] <math>A(k)</math> in terms of a [[power series]] which is equivalent for all purposes. This function is <math>A(0)+A(1)x+A(2)x^2+A(3)x^3+\cdots</math>, where the coefficient <math>A(k)</math> of <math>x^k</math> is the number of ways an event <math>\displaystyle{k}</math> can occur.
+
The idea behind '''generating functions''' is to create a [[power series]] whose [[coefficient]]s, <math>c_0, c_1, c_2, \ldots</math>, give the terms of a [[sequence]] which of interest. Therefore the power series (i.e. the generating function) is <math>c_0 + c_1 x + c_2 x^2 + \cdots </math> and the sequence is <math>c_0, c_1, c_2,\ldots</math>.
  
 
== Simple Example ==
 
== Simple Example ==

Revision as of 19:12, 12 August 2006

The idea behind generating functions is to create a power series whose coefficients, $c_0, c_1, c_2, \ldots$, give the terms of a sequence which of interest. Therefore the power series (i.e. the generating function) is $c_0 + c_1 x + c_2 x^2 + \cdots$ and the sequence is $c_0, c_1, c_2,\ldots$.

Simple Example

If we let $A(k)={n \choose k}$, then we have ${n \choose 0}+{n \choose 1}x + {n \choose 2}x^2+\cdots+$${n \choose n}x^n$.

This function can be described as the number of ways we can get $\displaystyle{k}$ heads when flipping $n$ different coins.

The reason to go to such lengths is that our above polynomial is equal to $(1+x)^n$ (which is clearly seen due to the Binomial Theorem). By using this equation, we can rapidly uncover identities such as ${n \choose 0}+{n \choose 1}+...+{n \choose n}=2^n$(let ${x}=1$), also ${n \choose 1}+{n \choose 3}+\cdots={n \choose 0}+{n \choose 2}+\cdots$.

See also