How much disorder is there in a descending run?
morwenn.github.io·12h·
Discuss: Hacker News
Flag this post

In a previous article, I introduced a new measure of disorder that I called (Amp), and attempted to determine whether it was a measure of presortedness. While trying to formally prove each of the 5 axioms required for a measure of presortedness, I discovered a counterexample showing that my measure did not satisfy the 4th axiom:

If every element of a sequence (X) is smaller than every element of another sequence (Y), then (M(XY) \le M(X) + M(Y))

A counterexample can be constructed as follows: (Amp) considers a single descending run to be sorted, but two descending runs, the second greater than the first, not sorted:

  • ‎(Amp(\langle 4, 3, 2, 1, 0 \rangle) = 0)
  • ‎...

Similar Posts

Loading similar posts...