Thumbnail
Access Restriction
Subscribed

Author Bron, C.
Source ACM Digital Library
Content type Text
Publisher Association for Computing Machinery (ACM)
File Format PDF
Language English
Subject Keyword Merge ♦ Sort
Abstract Sorting by means of a two-way merge has a reputation of requiring a clerically complicated and cumbersome program. This ALGOL 60 procedure demonstrates that, using recursion, an elegant and efficient algorithm can be designed, the correctness of which is easily proved [2]. Sorting n objects gives rise to a maximum recursion depth of [log2(n - 1) + 2]. This procedure is particularly suitable for sorting when it is not desirable to move the n objects physically in store and the sorting criterion is not simple. In that case it is reasonable to take the number of compare operations as a measure for the speed of the algorithm. When n is an integral power of 2, this number will be comprised between (n × log2n)/2 when the objects are sorted to begin with and (n × log2n - n + 1) as an upper limit. When n is not an integral power of 2, the above formulas are approximate.
Description Affiliation: Technological Univ., Eindhoven, The Netherlands (Bron, C.)
Age Range 18 to 22 years ♦ above 22 year
Educational Use Research
Education Level UG and PG
Learning Resource Type Article
Publisher Date 2005-08-01
Publisher Place New York
Journal Communications of the ACM (CACM)
Volume Number 15
Issue Number 5
Page Count 2
Starting Page 357
Ending Page 358


Open content in new tab

   Open content in new tab
Source: ACM Digital Library