Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: Asymptotic order of divide-and-conquer recurrences (Akra-Bazzi theorem) #6583

Closed
wants to merge 48 commits into from

Conversation

dupuisf
Copy link
Contributor

@dupuisf dupuisf commented Aug 15, 2023

This PR proves the Akra-Bazzi theorem, 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.


Open in Gitpod

@dupuisf dupuisf added awaiting-review The author would like community review of the PR awaiting-CI labels Aug 15, 2023
@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:26
@semorrison semorrison changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 12:12
Copy link
Contributor

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks! Sorry for the delay with the review.

Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean Outdated Show resolved Hide resolved
@sgouezel sgouezel added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Oct 3, 2023
@sgouezel
Copy link
Contributor

sgouezel commented Oct 3, 2023

Another question I forgot to mention is if it should be in the Computability folder, or if there should be a Complexity folder. For now, I'd keep it in Computability until there is enough material to warrant a split. Maybe in Computability.Complexity?

@dupuisf
Copy link
Contributor Author

dupuisf commented Oct 6, 2023

Another question I forgot to mention is if it should be in the Computability folder, or if there should be a Complexity folder. For now, I'd keep it in Computability until there is enough material to warrant a split. Maybe in Computability.Complexity?

I agree that filing this under "computability" is a bit of a stretch but yes, let's wait until there is a bit more material about complexity and algorithms!

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Oct 13, 2023
@dupuisf
Copy link
Contributor Author

dupuisf commented Nov 17, 2023

Thanks again for the review -- it took me more time than I thought to get around to implementing the changes, but this is now ready for another round of reviews!

Copy link
Contributor

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!
bors d+

Mathlib/Computability/AkraBazzi/GrowsPolynomially.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
Mathlib/Computability/AkraBazzi/AkraBazzi.lean Outdated Show resolved Hide resolved
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 23, 2023

✌️ dupuisf can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Nov 23, 2023
@dupuisf
Copy link
Contributor Author

dupuisf commented Nov 24, 2023

bors r+

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Nov 24, 2023
mathlib-bors bot pushed a commit that referenced this pull request Nov 24, 2023
…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.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 24, 2023

Build failed:

@dupuisf
Copy link
Contributor Author

dupuisf commented Nov 24, 2023

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Nov 24, 2023
…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.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 25, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Asymptotic order of divide-and-conquer recurrences (Akra-Bazzi theorem) [Merged by Bors] - feat: Asymptotic order of divide-and-conquer recurrences (Akra-Bazzi theorem) Nov 25, 2023
@mathlib-bors mathlib-bors bot closed this Nov 25, 2023
@mathlib-bors mathlib-bors bot deleted the dupuisf/akra_bazzi branch November 25, 2023 00:05
awueth pushed a commit that referenced this pull request Dec 19, 2023
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants