Learn · Volume 1 · in the Volume 1 course
Section 1.2.10. Analysis of an algorithm
22 exercises: 22 with a written solution, 18 stated in Lean, 5 proved in Lean.
1. Read first
The companion chapter builds on these. Read the ones you do not know yet.
- P1. Proof, induction and invariants
- P2. Concrete mathematics
- P3. Generating functions and enumeration not written yet
- C1, Section 1.2.5. Permutations and factorials draft
- C1, Section 1.2.7. Harmonic numbers draft
- C1, Section 1.2.9. Generating functions draft
2. Read the section
Read Section 1.2.10 in your copy of the book. Then read the companion chapter Analysis of an algorithm (a draft): it explains each item in the words of the handbook, with examples and proofs. The items of the section and their status.
3. Work the exercises
The exercises of this section train the use of probability generating functions: the mean and the variance of a distribution, products of independent variables, semi-invariants, tail bounds and the limit to a normal law. They also give the model of Algorithm M with repeated keys and with other distributions of the input. A good order by rating is 1, 4, 5, 11, 3, 2, 10, 8, 12, 19, 21, 20, 22, 15, 16, 9, 17, 6, 7, 18, 14 and 13. Exercise 10 uses the results of Exercises 7, 8 and 9, so do it after them.
From the Solutions volume of the handbook. The source.
The list starts with the lowest rating. Try each exercise on paper first. Its page has the hints one at a time, the solution behind a click, and the Lean status.
| Exercise | Rating | Kind | Solution | Lean |
|---|---|---|---|---|
| 1.2.10-1 | 10 | K3 | written checked | proved |
| 1.2.10-4 | M10 | K3 | written checked | proved |
| 1.2.10-5 | M13 | K3 | written checked | proved |
| 1.2.10-3 | M15 | K3 | written checked | stated |
| 1.2.10-11 | M15 | K3 | written checked | stated |
| 1.2.10-2 | HM16 | K1 | written checked | not stated yet |
| 1.2.10-8 | M20 | K3 | written checked | proved |
| 1.2.10-10 | M20 | K1 | written checked | stated |
| 1.2.10-12 | HM21 | K1 | written checked | not stated yet |
| 1.2.10-19 | M21 | K1 | written checked | proved |
| 1.2.10-21 | HM21 | K1 | written checked | stated |
| 1.2.10-20 | M22 | K1 | written checked | stated |
| 1.2.10-22 | HM22 | K1 | written checked | stated |
| 1.2.10-15 | HM23 | K3 | written checked | stated |
| 1.2.10-9 | M25 | K3 | written checked | stated |
| 1.2.10-16 | M25 | K3 | written checked | not stated yet |
| 1.2.10-6 | HM27 | K3 | written checked | stated |
| 1.2.10-7 | M27 | K3 | written checked | stated |
| 1.2.10-17 | M27 | K1 | written checked | not stated yet |
| 1.2.10-18 | M28 | K3 | written checked | stated |
| 1.2.10-14 | HM30 | K1 | written checked | stated |
| 1.2.10-13 | HM38 | K1 | written checked | stated |
Something is wrong? Report it.