Svoboda | Graniru | BBC Russia | Golosameriki | Facebook

To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Sorting number

From Wikipedia, the free encyclopedia

In mathematics and computer science, the sorting numbers are a sequence of numbers introduced in 1950 by Hugo Steinhaus for the analysis of comparison sort algorithms. These numbers give the worst-case number of comparisons used by both binary insertion sort and merge sort. However, there are other algorithms that use fewer comparisons.

YouTube Encyclopedic

  • 1/5
    Views:
    3 646
    7 651
    753 762
    1 345 307
    77 843
  • Discrete Math - 3.1.3 Sorting Algorithms
  • Discrete Math 3.1.3 Sorting Algorithms
  • Introduction to sorting algorithms
  • Bubble sort algorithm
  • Bubble Sort Algorithm (Tutorial 2) D1 EDEXCEL A-Level

Transcription

Formula and examples

The th sorting number is given by the formula[1]

The sequence of numbers given by this formula (starting with ) is

0, 1, 3, 5, 8, 11, 14, 17, 21, 25, 29, 33, 37, 41, ... (sequence A001855 in the OEIS).

The same sequence of numbers can also be obtained from the recurrence relation[2],

.

It is an example of a 2-regular sequence.[2]

Asymptotically, the value of the th sorting number fluctuates between approximately and depending on the ratio between and the nearest power of two.[1]

Application to sorting

In 1950, Hugo Steinhaus observed that these numbers count the number of comparisons used by binary insertion sort, and conjectured (incorrectly) that they give the minimum number of comparisons needed to sort items using any comparison sort. The conjecture was disproved in 1959 by L. R. Ford Jr. and Selmer M. Johnson, who found a different sorting algorithm, the Ford–Johnson merge-insert sort, using fewer comparisons.[1]

The same sequence of sorting numbers also gives the worst-case number of comparisons used by merge sort to sort items.[2]

Other applications

The sorting numbers (shifted by one position) also give the sizes of the shortest possible superpatterns for the layered permutations.[3]

References

  1. ^ a b c Ford, Lester R. Jr.; Johnson, Selmer M. (1959), "A tournament problem", American Mathematical Monthly, 66 (5): 387–389, doi:10.2307/2308750, JSTOR 2308750, MR 0103159
  2. ^ a b c Allouche, Jean-Paul; Shallit, Jeffrey (1992), "The ring of -regular sequences", Theoretical Computer Science, 98 (2): 163–197, doi:10.1016/0304-3975(92)90001-V, MR 1166363. See Example 28, p. 192.
  3. ^ Albert, Michael; Engen, Michael; Pantone, Jay; Vatter, Vincent (2018), "Universal layered permutations", Electronic Journal of Combinatorics, 25 (3): P23:1–P23:5, arXiv:1710.04240, doi:10.37236/7386, S2CID 52100342
This page was last edited on 8 June 2024, at 22:43
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.