Newsgroups: comp.parallel
From: tridge@cs.cs.anu.edu.au (Andrew.Tridgell)
Subject: Re: Implied correctness of block-based parallel sorting
Organization: Australian National University
Date: 18 Sep 1995 14:36:27 GMT
Message-ID: <43k05b$27q@usenet.srv.cis.pitt.edu>

>   Given some comparison-exchange based parallel sorting algorithm operating 
>   with one item per processor (i.e. p=n), derive a block based sorting 
>   algorithm for p<n by 
> 
>   1. independently (in parallel) sorting the blocks assigned to each
>      processor once, at the start.
> 
>   2. replacing each compare-exchange with a block merge-split (i.e. 
>      merge the two sorted blocks and return lower and upper halves
>      to the two processors)
> 
> It seems intuitive that this should always work (i.e. for any underlying
> sorting algorithm on any machine model), but no one seems to state this
> as an explicit result. Has anyone come across such a result? Is it true
> at all?

Yes, its true, although I believe the restriction is that it must be a
fixed algorithm (ie. a sorting network). I don't think it applies to
adaptive algorithms (like quicksort etc).

You also have to have the same number of elements in each block. This
restriction can be removed using a technique called "infinity
padding". See ftp://nimbus.anu.edu.au/pub/tridge/sorting/par_sort/tech_report/

The proof is in Knuths "Sorting and Searching" in the solution to
problem 5.3.4. It is a very useful result for parallel sorting
algorithms. 

Andrew
--
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Andrew Tridgell                            Dept. of Computer Science
email: Andrew.Tridgell@anu.edu.au          Australian National University 
Phone: (06) 254 8209 or (06) 249 5691      Fax: (06) 249 0010
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

