What is it?
for . The one series everyone can sum in closed form — and the one behind dynamic arrays, divide-and-conquer recurrences and the discounted rewards of reinforcement learning.
Intuition
Multiply by and subtract: everything cancels except the 1, so . When : — the total is dominated by the first terms, which is why the last level of a halving recursion costs as much as all the rest.
Formulas
- discounted return in reinforcement learning
Example
A dynamic array doubles its capacity when full. Inserting elements copies at most elements in total — amortized per insertion. With growth factor 1.5 the bound is copies per element.
Where it shows up in computing
Amortized analysis of dynamic arrays and the master theorem cases are geometric sums.
In an M/M/1 queue the number of customers is geometric: .
Where it shows up in AI
Discounting with makes the infinite return a convergent geometric-type series.
Where is it used?
Computing topics reachable from here, through the chain of ideas that leads to them:
What depends on it
Exercises
An agent gets reward 1 every step forever, with . What is the return? What is the "effective horizon"?
Solution
. Rewards beyond about steps contribute little: the effective horizon is ~100 steps.