🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4682

Re: Information on order(N) sort

#4682
From: stephen
Date: Thu, 26 Feb 1987 17:44
18 lines
1567 bytes
> Note that the more objects you have, the larger the field needed to
> describe them.  In fact the number of bits needed to number N items is
> log N.  So I claim that a radix sort is in some general sense N log N.
> Of course people often use larger fields than they really need to
> number the set of items that they have, which is why the thing looks
> constant.  But in the long run as you increase the number of items
> being sorted you're going to have to increase the size of the field.

This is absolutely wrong. The size of the key associated with an item
is entirely independent of the number of bits required to address that
item. The radix sort is O( n log M ) in time, where log M is the size
of the key in bits. It is easy to envision sorting an array of 1 million
8 bit keys, in which case the algorithm would be O( 8*n ), not O(20*n).


Stephen Watkins                    UUCP: ihnp4!datacube!stephen
Datacube Inc.; 4 Dearborn Rd.; Peabody, Ma. 01960; 617-535-6644
Technical Details
Message-ID: <103100001@datacube>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!ima!mirror!datacube!stephen
References: <814@fmsrl7.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!ima!mirror!datacube!stephen
From: stephen@datacube.UUCP
Newsgroups: comp.lang.misc
Subject: Re: Information on order(N) sort
Message-ID: <103100001@datacube>
Date: Thu, 26-Feb-87 12:44:00 EST
Article-I.D.: datacube.103100001
Posted: Thu Feb 26 12:44:00 1987
Date-Received: Sun, 1-Mar-87 07:51:42 EST
References: <814@fmsrl7.UUCP>
Lines: 18
Nf-ID: #R:fmsrl7.UUCP:-81400:datacube:103100001:000:982
Nf-From: datacube.UUCP!stephen    Feb 26 12:44:00 1987