Skip to content

Commit a785b32

Browse files
committed
feat: Asymptotic order of divide-and-conquer recurrences (Akra-Bazzi theorem) (#6583)
This PR proves the [Akra-Bazzi theorem](https://en.wikipedia.org/wiki/Akra%E2%80%93Bazzi_method), which gives the asymptotic order of divide-and-conquer recurrences of the form ``` T n = (∑ i in Fin k, a i * T (r i n)) + g n ``` where `T : ℕ → ℝ`, and where `r i n` is close to `b i * n` for a set of coefficients `b : Fin k → ℝ`. These recurrences arise mainly in the analysis of divide-and-conquer algorithms such as mergesort or Strassen's algorithm for matrix multiplication. Note that the traditional proof first proves a continuous version (i.e. for `T : ℝ → ℝ`) and then discretizes it to get a version that is relevant for algorithms. Here we prove the discrete version directly, which shortens the proof considerably.
1 parent 83613d2 commit a785b32

File tree

4 files changed

+2195
-0
lines changed

4 files changed

+2195
-0
lines changed

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,8 @@ import Mathlib.Combinatorics.SimpleGraph.Triangle.Basic
13531353
import Mathlib.Combinatorics.Young.SemistandardTableau
13541354
import Mathlib.Combinatorics.Young.YoungDiagram
13551355
import Mathlib.Computability.Ackermann
1356+
import Mathlib.Computability.AkraBazzi.AkraBazzi
1357+
import Mathlib.Computability.AkraBazzi.GrowsPolynomially
13561358
import Mathlib.Computability.ContextFreeGrammar
13571359
import Mathlib.Computability.DFA
13581360
import Mathlib.Computability.Encoding

Mathlib/Analysis/SpecificLimits/Basic.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,11 @@ theorem tendsto_nat_floor_atTop {α : Type*} [LinearOrderedSemiring α] [FloorSe
595595
Nat.floor_mono.tendsto_atTop_atTop fun x => ⟨max 0 (x + 1), by simp [Nat.le_floor_iff]⟩
596596
#align tendsto_nat_floor_at_top tendsto_nat_floor_atTop
597597

598+
lemma tendsto_nat_floor_mul_atTop {α : Type _} [LinearOrderedSemifield α] [FloorSemiring α]
599+
[Archimedean α] (a : α) (ha : 0 < a) : Tendsto (fun (x:ℕ) => ⌊a * x⌋₊) atTop atTop :=
600+
Tendsto.comp tendsto_nat_floor_atTop
601+
<| Tendsto.const_mul_atTop ha tendsto_nat_cast_atTop_atTop
602+
598603
variable {R : Type*} [TopologicalSpace R] [LinearOrderedField R] [OrderTopology R] [FloorRing R]
599604

600605
theorem tendsto_nat_floor_mul_div_atTop {a : R} (ha : 0 ≤ a) :

0 commit comments

Comments
 (0)