Questions tagged [generating-functions]

Generating functions are formed by making a series $\sum_{n\geq 0} a_n x^n$ out of a sequence $a_n$. They are used to count objects in enumerative combinatorics.

A generating function is a formal power series of the form \begin{equation*} f(x)=\sum^{\infty}_{n=0}a_nx^n \end{equation*} whose coefficients contain information about $a_n$, the sequence of numbers. For instance, suppose that the sequence is the Fibonacci sequence $0,1,1,2,3,5,8,\ldots$ Then$$f(x)=x+x^2+2x^3+3x^4+5x^5+\cdots,$$$$xf(x)=x^2+x^3+2x^4+3x^5+\cdots,$$and$$x^2f(x)=x^3+x^4+2x^5+\cdots.$$Then, it follows from the definition of the Fibonacci sequence that$$(1-x-x^2)f(x)=x$$This fact can be used to prove properties of the sequence, such as that its $n^\text{th}$ term is$$F_n = \frac{\varphi^n-(-\varphi)^{-n}}{\sqrt5},$$where $\varphi$ is the golden ratio.

4469 questions
3
votes
0 answers

Generating Functions - Number of numbers with sum of digits $\leq 7$

How many natural numbers with $n$ digits are there, where the sum of their digits is $\leq 7$? So I said the following: For the first digit (MSB) we can't have a zero, and all the other $n-1$ digits they can be anything from $[0,..9]$ so I said: …
TheNotMe
  • 4,841
3
votes
4 answers

Find the formula of the sequence using generating functions

I have the following sequence given: $$\sum_{k=1}^{n} (-1)^{k}k^{2}$$ How can I do this? The sequence goes like this: $$-1 + 4 - 9 + 16 - 25 + 36 - ...$$ So it doesn't have any variables inside. It looks like a geometric sequence for me, so the…
khernik
  • 1,369
3
votes
2 answers

Find the formula of a sequence using generating functions

The given sequence is $\sum_{k=1}^{n}kx^{k}$. How can I do this? I think I should start with the already known generating function: $A(x) = \sum a^{n}x^{n} = \frac{1}{1 - ax}$ And then I should do something with this function so that I finally come…
khernik
  • 1,369
3
votes
1 answer

Solution to generatingfunctionology exercise 1a.

The question is: Find the ordinary power series generating functions of each of the following sequences, in simple, closed form. In each case the sequence is defined for all $n\geq0$. (a) $a_n=n$ This is the function…
JY1853
  • 122
3
votes
1 answer

Any Info on Generalized Binomial and Exponential Series?

I was reading Concrete Mathematics by Knuth et al. and on p. 200, it references the generalized binomial series $\mathcal B_t(z)$ and the generalized exponential series $\mathcal E_t(z)$, defined as $$\mathcal…
dua
  • 996
3
votes
2 answers

Exponential Generating function for 1 0 0 1 0 0 1 0 0...

The generating function for the alternating sequence of 1's and 0's is composed by taking $(e^x +e^{-x})/2$. This approach does not work for when we want the alternation to be based on $mod$ $3$. For ordinary generating functions, the general form…
3
votes
3 answers

Find the number of ways to distribute 10 pieces of candy using this generating function

The question asks: a) Find a generating function for the number of ways to distribute identical pieces of candy to 3 children so that no child gets more than 4 pieces. Write this generating function in closed form, as a quotient of polynomials. b)…
3
votes
1 answer

Does $e^x e^x$ really equal $e^{2x}$?

I'm trying to prove the well-known identity $$\sum_k {n \choose k} = 2^n$$ with exponential generating functions (egf's). The idea is to note that the egf of the left hand side and the right hand side are the same. (Note that I don't actually care…
Robert D-B
  • 2,206
3
votes
1 answer

Generating Functions written as product of geometric series

I am reading Richard Stanley's "Topics in Algebraic Combinatorics" and just before the notes for Chapter 8, he was discussing generating functions for plane partitions and solid partitions. It is claimed there that: It is easy to see that for any…
suncup224
  • 2,664
3
votes
1 answer

Understand variant kinds of generating functions?

I found there are various kinds of generating functions in Wikipedia. I would like to understand why (the purpose)and how these concepts were created. For the "how" part, given a sequence $(a_n)$, the ordinary generating function is defined as…
Tim
  • 47,382
3
votes
1 answer

annihilated coefficient extractor (ACE)

Please, someone can explain me how works the annihilated coefficient extractor technique (ACE). I have seen some examples but i can't understand. Is there some text to read about this specific argument? Thank in advance.
3
votes
1 answer

generatingfunctionology example 1.5

This is dealing with the binomial coefficients--namely,$\hspace{4 pt}f(n, k)$ is the number of subsets made of $k$ of the elements of the set $\{1, 2, ..., n\}$. $B_n(x)$ is defined as $$B_{n}(x)=\sum_{k \geq 0} f(n, k)x^k, $$ for $n \in…
3
votes
0 answers

Generating function for recurrence

Inspired by the excellent generatingfunctionology, I am trying to find the (ordinary) generating function for the recurrence describing worst-case runtime for merge sort: $$ \begin{align*} T_0 &= 0 \\ T_{2n} &= 2\ T_n + n \\ T_{2n+1} &= 2\ T_n +…
H. Case
  • 31
3
votes
1 answer

Using generating functions, find the number of ways to make change for a $\$100$ bill using only dollar coins and $\$1,\$2$, and $\$5$ bills.

Using generating functions, find the number of ways to make change for a $\$100$ bill using only dollar coins and $\$1,\$2$, and $\$5$ bills. Thanks for the help.
SurenNihalani
  • 303
  • 1
  • 3
  • 11
3
votes
2 answers

Generating Functions To Deal With

I've been working on producing a closed-form generating function for the coefficients $a_n = \binom{n}{2}.$ I was wondering what might be a good procedure to start on this. I get that $$\sum_{n=0}^{\infty} x^n = x^0 + x^1 + x^2 + ... =…
Nick
  • 33
1 2
3
21 22