-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
71 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
# Divide and conquer algorithms | ||
# [Divide and conquer algorithms](https://en.wikipedia.org/wiki/Divide_and_conquer_algorithm) | ||
|
||
- [https://en.wikipedia.org/wiki/Divide\_and\_conquer\_algorithms](https://en.wikipedia.org/wiki/Divide_and_conquer_algorithms) | ||
A divide and conquer algorithm works by _recursively_ breaking down a problem into | ||
two or more _sub-problems_ of the same or related type, until these become simple | ||
enough to be solved directly. | ||
|
||
The solutions to the sub-problems are then combined to give a solution to the | ||
original problem. | ||
|
||
The correctness of a divide and conquer algorithm is usually proved by | ||
_mathematical induction_, and its computational cost is often determined by | ||
solving _recurrence relations_. | ||
|
||
## Important concepts | ||
|
||
- [Recursion](https://en.wikipedia.org/wiki/Recursion_(computer_science)) | ||
- Sub-problems | ||
- [Mathematical induction](https://en.wikipedia.org/wiki/Mathematical_induction) | ||
- [Recurrence relations](https://en.wikipedia.org/wiki/Recurrence_relation) | ||
- [Master theorem](https://en.wikipedia.org/wiki/Master_theorem) | ||
|
||
### Resources | ||
|
||
- [https://brilliant.org/wiki/master-theorem/](https://brilliant.org/wiki/master-theorem/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
# Greedy Algorithms | ||
# [Greedy Algorithms](https://en.wikipedia.org/wiki/Greedy_algorithm) | ||
|
||
Note that algorithms that you might find under [graphs](../graphs), such as [Kruskal](../graphs/kruskal.py)'s and [Prim](../graphs/prim.py)'s or the [Reverse-delete algorithm](Reverse-delete algorithm) algorithms to find minimum-spanning are greedy algorithms. Dijkstra's shortest path algorithm is also a greedy algorithm. | ||
|
||
## TODO | ||
|
||
## References | ||
|
||
- [https://en.wikipedia.org/wiki/Greedy_algorithm](https://en.wikipedia.org/wiki/Greedy_algorithm) | ||
|
||
- [Introduction to Algorithms](https://mitpress.mit.edu/books/introduction-algorithms) (3rd edition) by CLRS | ||
- [Reverse-delete algorithm](https://en.wikipedia.org/wiki/Reverse-delete_algorithm) to find a minimum spanning tree. | ||
|
||
## TODO | ||
|
||
- Greedy graph coloring (does not produce an optimal solution!) | ||
|
||
- Change making, which does not produce always an optimal solution. I have already implemented a change making algorithm, which produces an optimal solution, using dynamic programming. | ||
|
||
- [Reverse-delete algorithm](https://en.wikipedia.org/wiki/Reverse-delete_algorithm) to find a minimum spanning tree. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
# Numerical Algorithms | ||
|
||
## TODO | ||
|
||
- Bisection method | ||
- Fixed-point iteration | ||
- Secant method | ||
- Neville's algorithm (for polynomial interpolation) | ||
|
||
- Guassian Elimination | ||
- LU Decomposition (or Factorization) | ||
- Guassian Elimination with Pivoting | ||
- Cholesky Decomposition (for symmetric positive definite matrices) | ||
# Numerical Algorithms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
# Parsing | ||
|
||
Read the [this article](https://en.wikipedia.org/wiki/Parsing) if you want to know more about parsing. | ||
# [Parsing](https://en.wikipedia.org/wiki/Parsing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# Recursion | ||
# [Recursion](https://en.wikipedia.org/wiki/Recursion_(computer_science)) | ||
|
||
|
||
Algorithms which are, in my opinion, good and simple examples to show how recursion works. | ||
|
||
There are other recursive algorithms in this project that would also be good examples to show how recursion works (for example [`quick_sort`](../sorting/quick_sort.py)), but I thought they would be better examples of other concepts. | ||
|
||
|
||
## Possibly useful resources | ||
|
||
- [https://en.wikipedia.org/wiki/Recursion_(computer_science)](https://en.wikipedia.org/wiki/Recursion_(computer_science)) | ||
## Resources | ||
|
||
- [https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion](https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters