Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP
Path: utzoo!linus!philabs!cmcl2!harvard!think!mit-eddie!barmar
From: barmar@mit-eddie.UUCP (Barry Margolin)
Newsgroups: net.lang
Subject: Re: Time complexity of sort
Message-ID: <334@mit-eddie.UUCP>
Date: Thu, 7-Nov-85 02:39:30 EST
Article-I.D.: mit-eddi.334
Posted: Thu Nov  7 02:39:30 1985
Date-Received: Fri, 8-Nov-85 21:23:48 EST
References: <4516@alice.UUCP>
Reply-To: barmar@mit-eddie.UUCP (Barry Margolin)
Organization: MIT, Cambridge, MA
Lines: 16

In article <4516@alice.UUCP> ark@alice.UucP (Andrew Koenig) writes:
>If I remember right, even though the time complexity of sort is O(log n)
>on a single processor,

You remember wrong, it is O(n log n) on a uniprocessor.  With enough
processors (either n or log n, I'm not sure) it becomes O(log n).

>the median of a set can be found in O(n).
>It is hard to imagine how this might be done, but...

You don't have to imagine, you can read the Programming Pearls column of
the latest CACM, in which this very problem is discussed.
-- 
    Barry Margolin
    ARPA: barmar@MIT-Multics
    UUCP: ..!genrad!mit-eddie!barmar