Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Generating function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Convolution (Cauchy products)=== A discrete ''convolution'' of the terms in two formal power series turns a product of generating functions into a generating function enumerating a convolved sum of the original sequence terms (see [[Cauchy product]]). #Consider {{math|''A''(''z'')}} and {{math|''B''(''z'')}} are ordinary generating functions. <math display="block">C(z) = A(z)B(z) \Leftrightarrow [z^n]C(z) = \sum_{k=0}^{n}{a_k b_{n-k}}</math> #Consider {{math|''A''(''z'')}} and {{math|''B''(''z'')}} are exponential generating functions. <math display="block">C(z) = A(z)B(z) \Leftrightarrow \left[\frac{z^n}{n!}\right]C(z) = \sum_{k=0}^n \binom{n}{k} a_k b_{n-k}</math> #Consider the triply convolved sequence resulting from the product of three ordinary generating functions <math display="block">C(z) = F(z) G(z) H(z) \Leftrightarrow [z^n]C(z) = \sum_{j+k+ l=n} f_j g_k h_ l</math> #Consider the {{mvar|m}}-fold convolution of a sequence with itself for some positive integer {{math|''m'' ≥ 1}} (see the example below for an application) <math display="block">C(z) = G(z)^m \Leftrightarrow [z^n]C(z) = \sum_{k_1+k_2+\cdots+k_m=n} g_{k_1} g_{k_2} \cdots g_{k_m}</math> Multiplication of generating functions, or convolution of their underlying sequences, can correspond to a notion of independent events in certain counting and probability scenarios. For example, if we adopt the notational convention that the [[probability generating function]], or ''pgf'', of a random variable {{mvar|Z}} is denoted by {{math|''G<sub>Z</sub>''(''z'')}}, then we can show that for any two random variables <ref>{{harvnb|Graham|Knuth|Patashnik|1994|loc=§8.3}}</ref> <math display="block">G_{X+Y}(z) = G_X(z) G_Y(z)\,, </math> if {{mvar|X}} and {{mvar|Y}} are independent. ====Example: The money-changing problem==== The number of ways to pay {{math|''n'' ≥ 0}} cents in coin denominations of values in the set {1, 5, 10, 25, 50} (i.e., in pennies, nickels, dimes, quarters, and half dollars, respectively), where we distinguish instances based upon the total number of each coin but not upon the order in which the coins are presented, is given by the ordinary generating function <math display="block">\frac{1}{1-z} \frac{1}{1-z^5} \frac{1}{1-z^{10}} \frac{1}{1-z^{25}} \frac{1}{1-z^{50}}\,.</math> When we also distinguish based upon the order in which the coins are presented (e.g., one penny then one nickel is distinct from one nickel then one penny), the ordinary generating function is <math display=block>\frac{1}{1-z-z^5-z^{10}-z^{25}-z^{50}}\,.</math> If we allow the {{mvar|n}} cents to be paid in coins of ''any'' positive integer denomination, we arrive at the [[partition function (mathematics)|partition function]] ordinary generating function expanded by an infinite [[q-Pochhammer symbol|{{mvar|q}}-Pochhammer symbol]] product, <math display="block">\prod_{n = 1}^\infty \left(1 - z^n\right)^{-1}\,.</math> When the order of the coins matters, the ordinary generating function is <math display=block>\frac{1}{1-\sum_{n=1}^\infty z^n} = \frac{1-z}{1-2z}\,.</math> ====Example: Generating function for the Catalan numbers==== An example where convolutions of generating functions are useful allows us to solve for a specific closed-form function representing the ordinary generating function for the [[Catalan numbers]], {{math|''C<sub>n</sub>''}}. In particular, this sequence has the combinatorial interpretation as being the number of ways to insert parentheses into the product {{math|''x''<sub>0</sub> · ''x''<sub>1</sub> ·⋯· ''x<sub>n</sub>''}} so that the order of multiplication is completely specified. For example, {{math|''C''<sub>2</sub> {{=}} 2}} which corresponds to the two expressions {{math|''x''<sub>0</sub> · (''x''<sub>1</sub> · ''x''<sub>2</sub>)}} and {{math|(''x''<sub>0</sub> · ''x''<sub>1</sub>) · ''x''<sub>2</sub>}}. It follows that the sequence satisfies a recurrence relation given by <math display="block">C_n = \sum_{k=0}^{n-1} C_k C_{n-1-k} + \delta_{n,0} = C_0 C_{n-1} + C_1 C_{n-2} + \cdots + C_{n-1} C_0 + \delta_{n,0}\,,\quad n \geq 0\,, </math> and so has a corresponding convolved generating function, {{math|''C''(''z'')}}, satisfying <math display="block">C(z) = z \cdot C(z)^2 + 1\,.</math> Since {{math|''C''(0) {{=}} 1 ≠ ∞}}, we then arrive at a formula for this generating function given by <math display="block">C(z) = \frac{1-\sqrt{1-4z}}{2z} = \sum_{n = 0}^\infty \frac{1}{n+1}\binom{2n}{n} z^n\,.</math> Note that the first equation implicitly defining {{math|''C''(''z'')}} above implies that <math display="block">C(z) = \frac{1}{1-z \cdot C(z)} \,, </math> which then leads to another "simple" (of form) continued fraction expansion of this generating function. ====Example: Spanning trees of fans and convolutions of convolutions==== A ''fan of order {{mvar|n}}'' is defined to be a graph on the vertices {{math|{0, 1, ..., ''n''}<nowiki/>}} with {{math|2''n'' − 1}} edges connected according to the following rules: Vertex 0 is connected by a single edge to each of the other {{mvar|n}} vertices, and vertex <math>k</math> is connected by a single edge to the next vertex {{math|''k'' + 1}} for all {{math|1 ≤ ''k'' < ''n''}}.<ref>{{harvnb|Graham|Knuth|Patashnik|1994|loc=Example 6 in §7.3}} for another method and the complete setup of this problem using generating functions. This more "convoluted" approach is given in Section 7.5 of the same reference.</ref> There is one fan of order one, three fans of order two, eight fans of order three, and so on. A [[spanning tree]] is a subgraph of a graph which contains all of the original vertices and which contains enough edges to make this subgraph connected, but not so many edges that there is a cycle in the subgraph. We ask how many spanning trees {{math|''f<sub>n</sub>''}} of a fan of order {{mvar|n}} are possible for each {{math|''n'' ≥ 1}}. As an observation, we may approach the question by counting the number of ways to join adjacent sets of vertices. For example, when {{math|''n'' {{=}} 4}}, we have that {{math|''f''<sub>4</sub> {{=}} 4 + 3 · 1 + 2 · 2 + 1 · 3 + 2 · 1 · 1 + 1 · 2 · 1 + 1 · 1 · 2 + 1 · 1 · 1 · 1 {{=}} 21}}, which is a sum over the {{mvar|m}}-fold convolutions of the sequence {{math|''g<sub>n</sub>'' {{=}} ''n'' {{=}} [''z<sup>n</sup>''] {{sfrac|''z''|(1 − ''z'')<sup>2</sup>}}}} for {{math|''m'' ≔ 1, 2, 3, 4}}. More generally, we may write a formula for this sequence as <math display="block">f_n = \sum_{m > 0} \sum_{\scriptstyle k_1+k_2+\cdots+k_m=n\atop\scriptstyle k_1, k_2, \ldots,k_m > 0} g_{k_1} g_{k_2} \cdots g_{k_m}\,, </math> from which we see that the ordinary generating function for this sequence is given by the next sum of convolutions as <math display="block">F(z) = G(z) + G(z)^2 + G(z)^3 + \cdots = \frac{G(z)}{1-G(z)} = \frac{z}{(1-z)^2-z} = \frac{z}{1-3z+z^2}\,,</math> from which we are able to extract an exact formula for the sequence by taking the [[partial fraction expansion]] of the last generating function.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)