Riemann Greedy Rearrangement
Steer a conditional series by choosing from its positive and negative queues.
By Riano · Published · Updated · Report a correction
Riemann Greedy Rearrangement
The alternating harmonic series converges conditionally to ln(2). Riemann's Rearrangement Theorem states that by rearranging its terms, we can make the series converge to any finite real number, or diverge. The greedy algorithm provides a concrete way to construct such a rearrangement by taking from the positive and negative subseries.
Why does this work? The positive terms (1, 1/3, 1/5, …) and the negative terms (-1/2, -1/4, -1/6, …) each form subseries that diverge to positive and negative infinity respectively. This divergence means that no matter what finite target we choose, we can always reach or pass it by taking enough terms from the appropriate queue. Furthermore, because the individual term sizes (1/n) tend to zero as we progress down the queues, the "overshoot" error gets smaller and smaller each time we cross the target, yielding a rearrangement that converges exactly to any fixed finite target. A finite partial sum does not equal its intended limit.
Worked Example
Let's target a sum of 1. We start with a sum of 0. The positive terms are 1, 1/3, 1/5, … and the negative terms are -1/2, -1/4, -1/6, ….
- Current sum is 0 ≤ 1. Take positive term 1. New sum: 1.
- Current sum is 1 ≤ 1. Take positive term 1/3. New sum: 1.333.
- Current sum is 1.333 > 1. Take negative term -1/2. New sum: 0.833.
- Current sum is 0.833 ≤ 1. Take positive term 1/5. New sum: 1.033.
- Current sum is 1.033 > 1. Take negative term -1/4. New sum: 0.783.
The chosen terms' denominators are 1, 3, -2, 5, -4. The rearranged partial sum is 0.783, and it oscillates around the target value of 1, eventually converging to it.
Experiment
You can interactively explore the greedy rearrangement process.
- Open the Riemann Greedy Rearrangement module.
- Select a Target value (e.g., 1 or 0) and the number of Terms to process.
- Observe how the algorithm picks from the positive or negative queues based on whether the current sum is less than or equal to the target.
- Compare the rearranged partial sum to the original alternating partial sum for the same number of terms.
Limitations
The greedy rearrangement is an explicit construction for Riemann's theorem, but it converges slowly for some targets. Because the harmonic series diverges logarithmically, reaching large positive or negative targets requires an exponentially growing number of terms from one queue before taking from the other. Our visualizer uses a finite maximum number of terms to remain responsive.
References
To learn more about the formal proof of Riemann's Rearrangement Theorem and conditionally convergent series, you can consult standard real analysis materials.
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Riemann Greedy Rearrangement module.
Try Riemann Greedy Rearrangement on Riano →