Python implementation of the RMinimum algorithm.
A Python implementation of the RMinimum algorithm.
The algorithm is presented in the paper Fragile Complexity of Comparison-Based Algorithms by Prof. Dr. Ulrich Meyer and others in 2018.
A reworked version can can be found on arXiv.org.
It introduces the algorithms RMinimum and RMedian and also the concept of fragile complexity, i.e. the amount of times an element has been compared during the process of the algorithm.
Folder | Content |
---|---|
data | all experimental data as .csv files |
docs | scientific paper presenting the algorithm (old & new version) |
jupyter | Jupyter Notebook validation and test files |
src | Python source code |
tests | PyTest test files |
The package was published on PyPI and tested on Travis CI.
In the following we present RMinimum, a randomized recursive algorithm for finding the minimum among n distinct elements. The algorithm has a tuning parameter k(n) controlling the
trade-off between the expected fragile complexity fmin(n) of the minimum element and the maximum expected fragile complexity f_rem(n) of the remaining non-minimum elements; if n is clear from the context, we use k instead of k(n). Depending on the choice of k, we obtain interesting trade-offs for the pair
Given a total ordered set X of n distinct elements, RMinimum performs the following steps: