Sorting number

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.

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-insertion 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

Read other articles:

Emilio Gutiérrez Fernández Alcalde de León 11 de junio de 2011-13 de junio de 2015Predecesor Francisco Javier Fernández ÁlvarezSucesor Antonio Silván Rodríguez Información personalNacimiento 29 de abril de 1956 (67 años) Santa Olaja de la Varga, (León)Nacionalidad EspañolaEducaciónEducación Universidad de OviedoInformación profesionalOcupación Funcionario y políticoPartido político Partido Popular[editar datos en Wikidata] Emilio Gutiérrez Fernández (Santa Ol...

 

В Википедии есть статьи о других людях с фамилией Дзангара. Джузеппе Дзангараитал. Giuseppe Zangara Дата рождения 7 октября 1900(1900-10-07) Место рождения Ферруццано, Калабрия, Италия Гражданство  Италия →  США Дата смерти 20 марта 1933(1933-03-20) (32 года) Место смерти Рейфорд, Флорида, С

 

60 Seconds! Розробник Robot GentlemanВидавець Robot GentlemanДистриб'ютор Steam, Good Old Games[1], Humble Store[d][2], Nintendo eShop, Microsoft Store і PlayStation StoreЖанр(и) Пригодницький бойовикПлатформа Windows, Nintendo Switch, PlayStation 4, Xbox One, macOS, Android, iOSДата випуску Windows25 травня 2015 рокуNintendo Switch18 грудня 2017 рокуPlayS...

Landmark textbook in classical mechanics by E. T. Whittaker A Treatise on the Analytical Dynamics of Particles and Rigid Bodies Cover of 1989 printingAuthorE. T. WhittakerCountryEnglandLanguageEnglishSubjectMathematical physicsAnalytical dynamicsGenreNon-fictionAcademic historyScientific writingPublisherCambridge University PressPublication date 1904 (1st ed.) 1917 (2nd ed.) 1927 (3rd ed.) 1937 (4th ed.) Pages456ISBN0-521-35883-3OCLC629676472Dewey Decimal531LC ClassQA845Identifiers refer...

 

Опис обкладинка альбому гурту Listen_loud! 2014 року Джерело http://www.ex.ua/312763299536 Час створення 2014 Автор зображення Микола Колков (користувач 93.157.115.114) Ліцензія Це зображення є обкладинкою музичного альбому або синглу. Найімовірніше, авторськими правами на обкладинку володіє видав...

 

Topik artikel ini mungkin tidak memenuhi kriteria kelayakan umum. Harap penuhi kelayakan artikel dengan: menyertakan sumber-sumber tepercaya yang independen terhadap subjek dan sebaiknya hindari sumber-sumber trivial. Jika tidak dipenuhi, artikel ini harus digabungkan, dialihkan ke cakupan yang lebih luas, atau dihapus oleh Pengurus.Cari sumber: Universitas Buddhi Dharma – berita · surat kabar · buku · cendekiawan · JSTOR (Pelajari cara dan kapan saatn...

此條目没有列出任何参考或来源。 (2017年4月5日)維基百科所有的內容都應該可供查證。请协助補充可靠来源以改善这篇条目。无法查证的內容可能會因為異議提出而被移除。 德川十六神將(日语:徳川十六神将/とくがわじゅうろくしんしょう Tokugawajūrokushinshō)是為了彰顯仕於徳川家康,並有創立江戶幕府最大功績的16位武將,而出現的稱呼。在江戶時代,德川家康及...

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Rajabhat University system – news · newspapers · books · scholar · JSTOR (January 2017) (Learn how and when to remove this template message) Emblem of Rajabhat University system The Rajabhat Universities (มหาวิทยาลัยราชภัฏ, RTG...

 

Diagram formasi Chakrabyuha. Cakrabyuha (Dewanagari: चक्रव्यूह; ,IAST: Cakravyuha, चक्रव्यूह) atau Padmabyuha (Dewanagari: पद्मव्यूह; ,IAST: Padmavyuha, पद्मव्यूह) adalah salah satu bentuk formasi militer dalam peperangan India Kuno yang disebutkan dalam kitab Mahabharata. Sesuai dengan namanya (Cakra bermakna roda atau lingkaran), formasi ini tersusun dari ribuan prajurit yang membentuk lingkaran besa...

1995 play written by David Hare SkylightFaber and Faber first editionWritten byDavid HareDate premiered1995Place premieredCottesloe TheatreLondonOriginal languageEnglishSubjectMatters of life, love and circumstance between an older man and a younger womanGenreDramaSettingPresent day flat in northwest London Skylight is a play by British dramatist David Hare. The play premiered in the West End at the Cottesloe Theatre in 1995, moving to the Wyndham's Theatre in 1996. After opening on Broadway ...

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Super Thunder Blade – news · newspapers · books · scholar · JSTOR (February 2007) (Learn how and when to remove this template message) 1988 video gameSuper Thunder BladeDeveloper(s)SegaPublisher(s)SegaProducer(s)Yuji NakaComposer(s)Sachio OgawaPlatform(s)Mega D...

 

Football competition Football matchJohan Cruijff Schaal XXVIJohan Cruyff Arena in Amsterdam hosted the match. Ajax PSV Eindhoven 3 5 Date30 July 2022VenueJohan Cruyff Arena, AmsterdamRefereeDennis HiglerAttendance52,000← 2021 2023 → The 2022 Johan Cruyff Shield was the 26th edition of the Johan Cruyff Shield (Dutch: Johan Cruijff Schaal), an annual Dutch football match played between the winners of the previous season's Eredivisie and KNVB Cup. The match was contested by Ajax, win...

Bruno Gudelj (Zagreb, 8 mei 1966) is een voormalig Kroatisch handballer. Op de Olympische Spelen van 1996 in Atlanta won hij de gouden medaille met Kroatië. · · Kroatisch olympisch handbalteam Olympische Zomerspelen 1996 Patrik Čavar · Valner Franković · Slavko Goluža · Bruno Gudelj · Vladimir Jelčić · Božidar Jović · Nenad Kljaić · Venio Losert · Valter Matošević · Zoran Mikulić · Alvaro Načinović · Goran Perkovac · Iztok Puc · Zlatko Saračević · Irfan Smajlag...

 

Battle during World War II For the first battle during World War II, see Battle of Kiev (1941). This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Battle of Kiev 1943 – news · newspapers · books · scholar · JSTOR (March 2013) (Learn how and when to remove this template message) Second Battle of KievPart of...

 

Common St. John's-wort, Hypericum perforatum There are at least nine members of the St. Johnswort and Waterwort order: Theales found in Montana.[1] Some of these species are exotics (not native to Montana).[2] St. John's wort Family: Clusiaceae Hypericum anagalloides, tinker's-penny Hypericum majus, larger Canadian St. John's-wort Hypericum perforatum, common St. John's-wort Hypericum scouleri, western St. John's-wort Hypericum scouleri subsp. nortoniae, western St. John's-wor...

Artikel ini perlu diwikifikasi agar memenuhi standar kualitas Wikipedia. Anda dapat memberikan bantuan berupa penambahan pranala dalam, atau dengan merapikan tata letak dari artikel ini. Untuk keterangan lebih lanjut, klik [tampil] di bagian kanan. Mengganti markah HTML dengan markah wiki bila dimungkinkan. Tambahkan pranala wiki. Bila dirasa perlu, buatlah pautan ke artikel wiki lainnya dengan cara menambahkan [[ dan ]] pada kata yang bersangkutan (lihat WP:LINK untuk keterangan lebih lanjut...

 

Place in Burgenland, AustriaJennersdorf Coat of armsLocation within Jennersdorf districtJennersdorfLocation within AustriaCoordinates: 46°56′N 16°8′E / 46.933°N 16.133°E / 46.933; 16.133CountryAustriaStateBurgenlandDistrictJennersdorfGovernment • MayorReinhard Deutsch (JES)Area[1] • Total37.92 km2 (14.64 sq mi)Elevation242 m (794 ft)Population (2018-01-01)[2] • Total4,096 •...

 

Trezaise Trezaise is a hamlet south of Roche, Cornwall, England, United Kingdom.[1] References ^ Ordnance Survey Landranger 200: Newquay, Bodmin & Surrounding Area; 1:50 000. 1980 vte Ceremonial county of CornwallCornwall PortalUnitary authorities Cornwall Council Council of the Isles of Scilly Major settlements(cities in italics) Bodmin Bude Callington Camborne Camelford Falmouth Fowey Hayle Helston Hugh Town Launceston Liskeard Looe Lostwithiel Marazion Newlyn Newquay Padstow P...

zastava reda parada reda godine 2010 Oranski red (engl. Orange Order) je protestantsko bratstvo sa sjedištem u Belfastu, u Sjevernoj Irskoj. Osnovano je 1796. u čast englesko-irsko-škotskog protestantskog kralja nizozemskog podrijetla Vilima Oranskog, koji je porazio vojsku katoličkog kralja Jakova II. u bitci kod Boyne 1690. Iako mu je sjedište u Sjevernoj Irskoj, red je prisutan u Škotskim niskim zemljama nizini i ima lože diljem Commonwealtha i SAD-a. Politički, oranski red je poli...

 

coat of arms Guarbecque is a commune. It is found in the region Nord-Pas-de-Calais in the Pas-de-Calais department in the north of France. This short article about a place or feature in France can be made longer. You can help Wikipedia by adding to it.

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!