The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A350568 a(n)/n! is the average number of key comparisons required to perform an indirect sort of n records with distinct keys using a two-way merge (A. D. Woodall's mergesort). 2
 2, 19, 130, 992, 8145, 73665, 725630, 7840280, 92297011, 1176802235, 16129154724, 236335661166, 3685509077329, 60981635041557 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 COMMENTS There are six places in the Algol 60 procedure mergesort where the keys are compared. The sequence is the sum of the counts of these comparisons, taken over all n! possible orders of the records. The following table shows the maximum and average number of key comparisons. . n Worst case | A350567(n) | | Average | | a(n)/n! | | | Average/ | | | (n*log(n)) 2 1 1.000 0.721 3 4 3.167 0.961 4 6 5.417 0.977 5 10 8.267 1.027 6 13 11.313 1.052 7 17 14.616 1.073 8 20 17.997 1.082 9 25 21.606 1.093 10 29 25.435 1.105 11 34 29.481 1.118 12 38 33.672 1.129 13 43 37.953 1.138 14 47 42.276 1.144 15 52 46.634 1.148 REFERENCES D. E. Knuth, The Art of Computer Programming Second Edition. Vol. 3, Sorting and Searching. Chapter 5.2.4 Sorting by Merging, Pages 164-166. Addison-Wesley, Reading, MA, 1998. LINKS Table of n, a(n) for n=2..15. A. D. Woodall, An internal sorting procedure using a two-way merge, Algorithm 45, The Computer Journal, Volume 13, Number 1, February 1970, Algorithms Supplement, pp. 110-111. CROSSREFS Cf. A001768, A001855, A350567, A350569. Sequence in context: A082291 A055518 A289230 * A249690 A206948 A089364 Adjacent sequences: A350565 A350566 A350567 * A350569 A350570 A350571 KEYWORD nonn,more AUTHOR Hugo Pfoertner, Jan 09 2022 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 12 22:48 EDT 2024. Contains 371639 sequences. (Running on oeis4.)