# Algorithms

> The methods Knotkit's structures are built to serve, with their bounds, guarantees, and the measured workload behind each claim.

An algorithm page exists where a *method* — not a data structure — is the thing worth explaining, and where the choice between two correct implementations of it is a decision a caller has to make. Each page states the bound, the guarantee, the structure the method leans on, and the workload that measured it.

| Method                                                                | Guarantee                                      | Knotkit                    | Measured in                                                                                                       |
| --------------------------------------------------------------------- | ---------------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [Monotone submodular maximization](/algorithms/submodular-selection/) | `1 − 1/e` for greedy under a cardinality limit | `heap`, `prng`, `sampling` | [`problems/budget-allocation`](https://github.com/jkomyno/knotkit/blob/main/problems/budget-allocation/README.md) |

## Why these are not module pages

A module page answers “how do I call this and what does it cost”. An algorithm page answers “which of these two correct methods should I run, and what do I give up”. Lazy greedy and full-scan greedy are the same module call in a different shape; the difference is one comparison and an enormous constant.

The mapping from method to module is the same mapping the [router](/choosing/) performs in the other direction.
