Skip to content

Commit 22b86c6

Browse files
committed
Document the measure disorder SMS
1 parent bffea67 commit 22b86c6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/Measures-of-disorder.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ Spearman's footrule distance: sum of distances between the position of individua
402402
#include <cpp-sort/probes/sus.h>
403403
```
404404

405-
Computes the minimum number of non-decreasing subsequences (of possibly not adjacent elements) into which $X$ can be partitioned, minus 1. It happens to correspond to the size of the [longest decreasing subsequence][longest-increasing-subsequence] of $X$ minus 1.
405+
Computes the minimum number of non-decreasing subsequences (of possibly non-adjacent elements) into which $X$ can be partitioned, minus 1. It happens to correspond to the size of the [longest decreasing subsequence][longest-increasing-subsequence] of $X$ minus 1.
406406

407-
*SUS* stands for *Shuffled Up-Sequences* and was introduced in *Sorting Shuffled Monotone Sequences* by C. Levcopoulos and O. Petersson.
407+
*SUS* stands for *Shuffled UpSequences* and was introduced in *Sorting Shuffled Monotone Sequences* by C. Levcopoulos and O. Petersson.
408408

409409
| Complexity | Memory | Iterators | Monotonic |
410410
| ----------- | ----------- | ------------- | --------- |
@@ -448,8 +448,20 @@ In their subsequent papers, those authors consistently use *Dis* instead of *Par
448448

449449
T. Altman and Y. Igarashi mention the concept of *k*-sortedness and the measure *Radius*($X$) in *Roughly Sorting: Sequential and Parallel Approach*. However *k*-sortedness is the same as *p*-sortedness, and *Radius* is just another name for *Par* (and thus for *Dis*).
450450

451+
### *SMS*
452+
453+
*SMS* stands for *Shuffled Monotone Sequences* and was introduced in *Sorting Shuffled Monotone Sequences* by C. Levcopoulos and O. Petersson. It computes the minimum number of increasing or decreasing subsequences (of possibly non-adjacent elements) into which a sequence $X$ can be partitioned, minus 1.
454+
455+
The concept in itself is fiarly straightforward, yet the problem of computing $\mathit{SMS}(X) \le k$ in NP-complete, as shown by K. Wagner in *Monotonic coverings of finite sets*. For this reason, the library does not provide an implementation. It is technically possible to compute an approximation of $\mathit{SMS}(X)$ by repeatedly removing the longest monotonic subsequence from $X$.
456+
457+
Nevertheless we do know a few of the measure's properties:
458+
* $1 \le \mathit{SMS}(X) \le \min {\mathit{SUS}(X), \mathit{SDS}(X)}$, where $\mathit{SUS}$ and $\mathit{SDS}$ respectivey standard for [*Shuffled UpSequences*][probe-sus] and *Shuffled DownSequences*, the first being a measure of presortedness that we provide.
459+
* $\mathit{SMS}(X) \le \lfloor \sqrt{2n + \frac{1}{4}} - \frac{1}{2} \rfloor$, as proven by A. Brandstädt and D. Kratsch in *On partitions of permutations into increasing and decreasing subsequences*.
460+
461+
451462

452463
[hamming-distance]: https://en.wikipedia.org/wiki/Hamming_distance
453464
[longest-increasing-subsequence]: https://en.wikipedia.org/wiki/Longest_increasing_subsequence
454465
[original-research]: Original-research.md#partial-ordering-of-mono
466+
[probe-sus]: Measures-of-disorder.md#sus
455467
[sort-race]: https://arxiv.org/ftp/arxiv/papers/1609/1609.04471.pdf

0 commit comments

Comments
 (0)