Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mmintl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!cmcl2!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang Subject: Re: Efficiency of Languages ? Message-ID: <753@mmintl.UUCP> Date: Fri, 1-Nov-85 18:01:43 EST Article-I.D.: mmintl.753 Posted: Fri Nov 1 18:01:43 1985 Date-Received: Mon, 4-Nov-85 03:21:12 EST References: <15100004@ada-uts.UUCP> <15100007@ada-uts.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 39 [Not food] In article <15100007@ada-uts.UUCP> richw@ada-uts.UUCP writes: >Apparently my original point about Turing machine implementations >increasing the run-time order of an algorithm didn't sink in. >YES, expensive features can be done in hardware. The proof >that I know of that no sort can run faster than O(n log n) >is based on an analysis of possible decision trees [...] >The important point >is that this proof relies on assumptions about ARCHITECTURE. >It assumes that more than one comparison will NOT be done at >the same time. Next time you come across an algorithms text, >think twice why they talk so much about RAM (random-access machines). > >I believe that one can find the N-th highest number in an >unsorted list in less than O(n log n) time You can. >Throw n different >processors at an unsorted array, one looking for the first >highest, the second looking for the second highest, etc. >Have these processors work concurrently. Voila! Actually, the proof relies on only being able to do a finite (bounded) number of comparisons at a time. In practice, you only have a finite amount of processing power available. Of course, in practice, you only have a finite number of objects to sort, too. So, at least theoretically, you have a valid point. But I know of no machine with more than ~100 processors, whereas it is not uncommon to have ~100,000 items to be sorted. Given those kind of numbers, sorting is O(n log n). (By the way, if you have n processors to sort n numbers, sorting is O(log n). Just do a shell sort.) Frank Adams ihpn4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108