# Algorithms

The subpackage that contains all implemented algorithms in `andz`.

A few interesting algorithms which may be implemented in the future. It excludes the sorting algorithms, which you can find under [`sorting/README.md`](./sorting/README.md).

## Combinatorial Algorithms

### Pseudo-random Number Generators 

- [Mersenne Twister](https://en.wikipedia.org/wiki/Mersenne_Twister)

## Cryptography

### Asymmetric Public Key Encryption

- [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) (Rivest–Shamir–Adleman)

## Geometry

### [Line-Segment Intersection](https://en.wikipedia.org/wiki/Line_segment_intersection)

- [Bentley–Ottmann algorithm](https://en.wikipedia.org/wiki/Bentley%E2%80%93Ottmann_algorithm)

### Convex Hull

- [Graham's scan](https://en.wikipedia.org/wiki/Graham_scan)
- [Gift wrapping](https://en.wikipedia.org/wiki/Gift_wrapping_algorithm) (or Jarvis march)
- [Chan's algorithm](https://en.wikipedia.org/wiki/Chan%27s_algorithm)
- [Kirkpatrick–Seidel algorithm](https://en.wikipedia.org/wiki/Kirkpatrick%E2%80%93Seidel_algorithm)
- [Quickhull](https://en.wikipedia.org/wiki/Quickhull)
- Divide and conquer

## Graph Algorithms

### Search

- [Breadth-first search](https://en.wikipedia.org/wiki/Breadth-first_search)
- [Depth-first search](https://en.wikipedia.org/wiki/Depth-first_search)
- [Iterative deepening depth-first search](https://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search)
- [Best-first Search](https://en.wikipedia.org/wiki/Best-first_search)
- Uniform-Cost Search
- [A* search algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm)
- [Beam search](https://en.wikipedia.org/wiki/Beam_search)
- [Monte Carlo tree search](https://en.wikipedia.org/wiki/Monte_Carlo_tree_search) (MCTS)

### Shortest Path

- [Dijkstra's algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)
- [Bellman–Ford algorithm](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm)
- [Floyd–Warshall algorithm](https://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm)

### Minimum Spanning Tree

- [Kruskal's algorithm](https://en.wikipedia.org/wiki/Kruskal%27s_algorithm)
- [Prim's algorithm](https://en.wikipedia.org/wiki/Prim%27s_algorithm)
- [Reverse-delete algorithm](https://en.wikipedia.org/wiki/Reverse-delete_algorithm)

### Strongly Connected Components

- [Kosaraju's algorithm](https://en.wikipedia.org/wiki/Kosaraju%27s_algorithm)
- [Tarjan's algorithm](https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm)

### Network Theory

#### Network analysis

- [PageRank](https://en.wikipedia.org/wiki/PageRank)

##### Flow Networks

- [Edmonds–Karp algorithm](https://en.wikipedia.org/wiki/Edmonds%E2%80%93Karp_algorithm)

### Partitioning

- [Kernighan–Lin algorithm](https://en.wikipedia.org/wiki/Kernighan%E2%80%93Lin_algorithm)
- [Inertial Partitioning Algorithm](http://people.eecs.berkeley.edu/~demmel/cs267/lecture18/lecture18.html)
- [Spectral Bisection Algorithm](http://people.eecs.berkeley.edu/~demmel/cs267/lecture18/lecture18.html)

### Travelling Salesman Problem (TSP)

- [Nearest neighbour algorithm](https://en.wikipedia.org/wiki/Nearest_neighbour_algorithm)
- [Christofides algorithm](https://en.wikipedia.org/wiki/Christofides_algorithm)

## Number Theory

### Multiplication

- [Karatsuba algorithm](https://en.wikipedia.org/wiki/Karatsuba_algorithm)

### Greatest Common Divisor

- [Euclidean algorithm](https://en.wikipedia.org/wiki/Euclidean_algorithm) (or Euclid's algorithm)

### Primality Tests

- [AKS primality test](https://en.wikipedia.org/wiki/AKS_primality_test)
- [Miller–Rabin primality test](https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test)
- [Sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)
- [Sieve of Atkin](https://en.wikipedia.org/wiki/Sieve_of_Atkin)

## Numerical algorithms

### Differential Equations

- [Runge–Kutta methods](https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods)

### Interpolation

- [Divided Differences](https://en.wikipedia.org/wiki/Divided_differences)
- [De Casteljau's algorithm](https://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm)
- [De Boor algorithm](https://en.wikipedia.org/wiki/De_Boor%27s_algorithm)

### Linear algebra

#### Linear System of Equations

- [Jacobi method](https://en.wikipedia.org/wiki/Jacobi_method)
- [Conjugate gradient method](https://en.wikipedia.org/wiki/Conjugate_gradient_method)
- [Guassian elimination](https://en.wikipedia.org/wiki/Gaussian_elimination)
- [Guassian elimination with pivoting](https://en.wikipedia.org/wiki/Pivot_element)
- [Gauss–Seidel method](https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method)
- [LU decomposition](https://en.wikipedia.org/wiki/LU_decomposition) (or factorization)
- [Cholesky decomposition](https://en.wikipedia.org/wiki/Cholesky_decomposition)

#### Sparse Matrix Algorithms

- [Cuthill–McKee algorithm](https://en.wikipedia.org/wiki/Cuthill%E2%80%93McKee_algorithm)

#### Matrices

##### Multiplication

- [Strassen algorithm](https://en.wikipedia.org/wiki/Strassen_algorithm)
- [Cannon's algorithm](https://en.wikipedia.org/wiki/Cannon%27s_algorithm)
- [Coppersmith–Winograd algorithm](https://en.wikipedia.org/wiki/Coppersmith%E2%80%93Winograd_algorithm)
- [Block matrix multiplication](https://en.wikipedia.org/wiki/Block_matrix#Block_matrix_multiplication)

##### Eigenvalues

- [Rayleigh quotient iteration](https://en.wikipedia.org/wiki/Rayleigh_quotient_iteration)
- [Power Method](https://en.wikipedia.org/wiki/Power_iteration)
- [QR algorithm](https://en.wikipedia.org/wiki/QR_algorithm)
- [Inverse iteration](https://en.wikipedia.org/wiki/Inverse_iteration)

#### Orthogonalization

- [Gram–Schmidt process](https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process)

### Roots Finding

- [Bisection method](https://en.wikipedia.org/wiki/Bisection_method)
- [Secant method](https://en.wikipedia.org/wiki/Secant_method)
- [Halley's method](https://en.wikipedia.org/wiki/Halley%27s_method)

## Optimization Algorithms

### Meta-heuristics

- [Simulated annealing](https://en.wikipedia.org/wiki/Simulated_annealing)

### 2-player games

- [Alpha-beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning)
- [Min-max](https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with_alternate_moves)

### Evolutionary computation

#### Genetic Algorithms

- [Fitness proportionate selection](https://en.wikipedia.org/wiki/Fitness_proportionate_selection)
- [Truncation selection](https://en.wikipedia.org/wiki/Truncation_selection)
- [Tournament selection](https://en.wikipedia.org/wiki/Tournament_selection)

#### Swarm Intelligence

- [Ant colony optimization](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms)
- [Bees algorithm](https://en.wikipedia.org/wiki/Bees_algorithm)
- [Particle swarm optimization](https://en.wikipedia.org/wiki/Particle_swarm_optimization)

### Non-linear Least Squares

- [Gauss-Newton algorithm](https://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_algorithm)

## Machine Learning

### Unsupervised

- [k-means](https://en.wikipedia.org/wiki/K-means_clustering)

## Supervised

- [k-nearest neighbors algorithm](https://www.youtube.com/watch?v=UqYde-LULfs)

## Reinforcement

- Tabular Q-Learning
- Tabular SARSA

## Programming Language Theory

### Parsing

- [CYK algorithm](https://en.wikipedia.org/wiki/CYK_algorithm)
- [LL parser](https://en.wikipedia.org/wiki/LL_parser)
- [LR parser](https://en.wikipedia.org/wiki/LR_parser)
- [Earley parser](https://en.wikipedia.org/wiki/Earley_parser)
- [Recursive descent parser](https://en.wikipedia.org/wiki/Recursive_descent_parser)

## Sequence Algorithms

### Approximate Sequence Matching

#### String Metrics

- [Levenshtein edistance](https://en.wikipedia.org/wiki/Levenshtein_distance) (or edit distance)
- [Hamming distance](https://en.wikipedia.org/wiki/Hamming_distance)

### Sequence Permutations

- [Fisher–Yates shuffle](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle)

----

An article listing other possibly interesting algorithms can be found at the 
following URL [https://en.wikipedia.org/wiki/List\_of\_algorithms](https://en.wikipedia.org/wiki/List_of_algorithms).

---