Skip to content

More measures of presortedness #62

Open
@Morwenn

Description

@Morwenn

#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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions