The repertoire method
The repertoire method is a method of finding closed-form solutions to recurrence relations and sums of a series. The method is introduced in Chapter 1 of ConMath but most readers at first seem to struggle with it. Throughout the book, especially Chapters 1 and 2, the repertoire method demonstrates its ability to solve many sums and recurrences. However, I honestly admit that it is quite difficult to apply and fully understand how it works. In this note, I try to figure the way to effectively apply the method for solving recurrences.
Definition
In essence, the main goal of the method is to find coefficients for a linear
combination of a set of recurrences. This method works very well on linear
recurrences, in the sense that the solutions can be expressed as a sum of
coefficients multiplied by functions of
The method is not described clearly in ConMath because the authors always come up with a set of recurrences and get their coefficients but they do not mention how they figure it out. Regarding this aspect, Sedgewick’s book provides accessible clarification and systematic examples. Therefore, I use the procedure in Sedgewick’s book as a recipe for the repertoire method:
- Relax the recurrence by adding an extra function term.
- Substitute known functions into the recurrence to derive identities similar to the recurrence.
- Take linear combinations of such identities to derive an equation identical to the recurrence.
At first glance, it is quite abstract. However, some examples carried out
in the book illustrate how we manipulate the steps. Suppose that we have
recurrence
For more details and explanations, I strongly recommend reading Markus Scheuer’s answer. Of course, ConMath (Chapter 1, 2, 6) is a good material for practicing the method for understanding purposes. Section 2.5 from Sedgewick’s book summarizes some approaches to finding the closed-form, including the repertoire method. Examples in the book are recommended reading.
The best way to fully understand the method is to work through examples.
Examples
Closed-form of sums
We can easily convert the sum of a sequence into a linear recurrence. Let’s begin
with the first example, which only contains the term
$ S_{n} = \sum_{k=0}^n k^3$
This sum can be seen as:
$ a_{0} = 0
Next, we build a table of
| 1 | 0 |
| n | 1 |
How can I fill
The solution is $(\alpha, \beta, \lambda) =({1\over 4}, {1\over 2}, {1\over 4}) $
and hence
Let’s try another example, this time we use an exercise in ConMath:
The solution is
Linear Recurrences
Based on the table we built in previous examples, we can construct a linear combination for the recurrence:
The solution is
Exercise 1.16 (ConMath)
Related Materials
After hours searching on the Internet, I found some useful links which actually help me understand the method:
- Wakatta’s post
- Math stackexchange answer: this one is damn good.
- Pindancing’s post
- Sedgewick, Robert, and Philippe Flajolet. An introduction to the analysis of algorithms. Pearson Education India, 1996. [IMO, the explanation in this book is much better than in ConMath.]
- Graham, Ronald L., et al. “Concrete mathematics: a foundation for computer science.” Computers in Physics 3.5 (1989): 106 – 107.