Open
Description
#48 added a few measures of presortedness into the library, and there still hasn't been a problem having them around. The original measures of presortedness were the eight ones described in Right invariant metrics and measures of presortedness, but there are actually more of them in the litterature. We could complete the module with the measures of presortedness described in the following papers:
- A framework for adaptive sorting by Petersson and Moffat
- A New Measure of Presortedness by Estivill-Castro and Wood
- Computing and ranking measures of presortedness by Chen
- Encroaching lists as a measure of presortedness by Skiena
- Historical searching and sorting by Moffat and Petersson
- Local insertion sort revisited by Katajainen, Levcopoulos and Petersson
- On partitions and presortedness of sequence by Carlsson and Chen
- Roughly Sorting: Sequential and Parallel Approach by Altman and Igarashi
- Sort Race by Zhang, Meng and Liang
- Sorting Shuffled Monotone Sequences by Levcopoulos and Petersson
The following to-be-implemented measures of presortedness can be found in the aforementioned articles:
- Block(X): number of elements in a sequence that aren't followed by the same element in the sorted sequence
- Dist(X) and logDist(X)
- DS(X)
- Enc(X): number of encroaching lists extracted from X minus one
- Hist(X): something to do with historical insertion sort
-
Lads(X): minimum size of monotonic subsequence covering of a sequence X(computing it is NP-complete) - Loc(X): something to do with local insertion sort
- Mono(X): number of ascending and descending runs minus 1
-
Par(X) = min { p | X is p-sorted }(same as Dis(X)) -
Radius(X) = min { k | X is k-sorted }(same as Par(X)) - Reg(X): apparently a generalization of most of the other measures
- SMS(X): minimum number of non-decreasing and non-increasing subsequences (of possibly not adjacent elements) into which X can be partitioned
- Spart(T, X): minimal size of a specific type T of partitions on a sequence X
- SUS(X): minimum number of non-decreasing subsequences (of possibly not adjacent elements) into which X can be partitioned