Hand-In HW 2 due 2/25
Centrality of Generating Functions

Consider the following generating function, whose coefficients ak are tribonacci numbers:

f(x)   =   ∑k≥0 ak xk   =   1(1 − x − x2 − x3) .

This is the most essential way to encode these numbers: as Taylor coefficients of the rational function f(x). In this assignment, you will deduce other ways of defining and computing an, which are "hidden" in the generating function.
  1. Compute a0, a1, a2 directly using Taylor's coefficient formula (record your computations). Then use Wolfram Alpham or other software to find the Taylor series up to order 20: f(x) = a0 + a1x + ··· + a20x20 + higher terms (include an image with the explicit coefficients, or copy them by hand).
  2. In the equation (1−x−x2−x3) ∑k≥0 ak xk = 1, expand the left side and equate the xk coefficients with those on the right side: 1 + 0x + 0x2 + 0x3 + ···. Use this to find a recurrence equation for ak with k ≥ 3. Use the recurrence to compute a3, a4, . . . , a20, and compare with the computer values from Prob 1.
    Extra Credit: Recall the delayed reproduction model for Fibonacci numbers: Start with 1 newborn pair of rabbits at month 1, which mature during month 2, then they reproduce 1 new pair at month 3, and so on for the offspring, with no mortality; then Fk is the number of pairs at month k. Give a similar model for the tribonacci numbers, explaining why it works. Draw an analog of the Fibonacci tree from the previous HW.
  3. Here is the graph of the generating function:

    To accurately find the vertical asymptote, the roots of the denominator polynomial

    g(x) = 1 − x − x2 − x3 = 0,

    recall Newton's Method from calculus: to accurately approximate the solution of an equation g(x) = 0, start with an initial guess x0, and repeatedly refine it using the recurrence:

    xk  =  xk−1g(xk−1)g' (xk−1) .

    That is, the tangent line to y = g(x) at (xk−1, g(xk−1)) intersects the x-axis at xk.

    Problems

  4. Given the roots x = α, β, γ of the denominator, we have

    1 − x − x2 − x3  =  (1 − xα)(1 − xβ)(1 − xγ),

    and we know there must be a partial fraction decomposition of the form:

    f(x)   =   A(1 − x/α) + B(1 − x/β) + C(1 − x/γ) .

    Problem: Find the coefficient A of the dominant term using the residue method: clear denominators, substitute x = α, and solve for A in terms of α, β, γ, then compute the result numerically using software or other methods.
    Hint: You can compute with complex numbers just as with real numbers: all algebraic laws hold. During the computation, work with the letters α, β, γ. Once you have a simplified algebraic answer, only then substitute the numerical values from the previous problem. Use a few extra decimal places of accuracy for α, β, γ, then round the final answer to 5 places.
  5. The first term in the decomposition must be dominant in the Taylor series of f(x) since x = α is the vertical asymptote closest to x = 0. Expand this geometric series to deduce a formula of the form ak ≈ A rk, approximating by an exponential sequence with appropriate values of A and r, rounded to 5 decimal places. Compute this formula numerically for n = 0, . . . , 20, and compare to the known values of a0, . . . , a20 . What accounts for the error?
    Extra Credit: Estimate the error in the approximation ak ≈ A rk, assuming exact values of A and r. Is it true that ak = round(A rk)? How many decimal places of accuracy would you need for α and A to compute a100 exactly? Which is more compuationally efficient to find large an exactly, the exponential approximation or the recurrence formula?
  6. Expand f(x) as:

    f(x)   =   1(1 − (x+x2+x3))   =   ∑ℓ≥0 (x + x2 + x3),

    and translate this algebraic expression into a logical choice algorithm. That is, find a family of combinatorial objects A = A0 ∪ A1 ∪ A2 ∪ ··· such that ak = |Ak|, counting the objects of size k.
    After defining your combinatorial interpretation, illustrate it by listing the 7 objects corresponding to a4 = 7.
    Hint: x + x2 + x3 can be interpreted as choosing the number 1 or 2 or 3.