6
$\begingroup$

Let's define the Fibonacci numbers as $F_0=1$, $F_1=1$ and $F_n=F_{n-1}+F_{n-2}$. Using this recurrence I was able to calculate the generating function of the Fibonacci numbers to be $-\frac{1}{x^2+x-1}$. Now, it can be proved that $F_n$ counts the list of $1,2$ with sum $n$. Is there a way to find the generating function using this model without using the recurrence?

$\endgroup$
3
  • $\begingroup$ @anon: I believe that Alex is asking whether it’s possible to derive the generating function for the solution to the sum problem without first determining that the solution is the Fibonacci sequence (offset by one term). $\endgroup$ Commented Oct 19, 2011 at 4:18
  • $\begingroup$ @Brian: Oh, you're right, I wasn't reading closely enough. $\endgroup$ Commented Oct 19, 2011 at 4:28
  • $\begingroup$ Using this recurrence I was able to calculate .... Could you please say more as to how you figured out this generating function based on F(0), F(1), and F(N)? $\endgroup$ Commented Oct 29, 2014 at 0:16

1 Answer 1

9
$\begingroup$

The coefficient of $x^k$ in $(x+x^2)^n$ gives the number of ways to reach a total of $k$ with $n$ terms, each of which is $1$ or $2$, so the coefficient of $x^k$ in $\sum_{n\ge 0}(x+x^2)^n$ gives the number of ways to reach a total of $k$ with any number of terms, each of which is $1$ or $2$. But formally $$\sum_{n\ge 0}(x+x^2)^n = \frac{1}{1-(x+x^2)} = \frac{1}{1-x-x^2},$$ which is your generating function.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.