Unformatted text preview: he values in every ÝÞ -plane, alternating the order between planes (a ÝÞ -plane is the set of processors with
ﬁxed Ü, ´Ü
4.Do two steps of the 1-dimensional odd-even sort on each Ü-row (an Ü-row is the set of processors with ﬁxed Ý
and Þ , ´ Ý Þ µ ½
5.Sort the values in every ÝÞ -plane.
For each of the plane sorts in steps 1, 2, 3, and 5, we use the Æ ¢ Æ sort we discussed in class, which takes ¢´Æ µ
time. Step 4 only takes 2 time, so we have a total running time of ¢´Æ µ.
Now we need to argue correctness a bit. 1 We consider only 0-1 inputs as per the 0-1 lemma. After step 1, on each
ÜÞ -plane, the ¼’s are moved towards the smallest value of Ü. Since the values are sorted, there can be at most one
dirty Þ -column in each plane. Thus, every Ü-column within a single ÜÞ -plane has (almost) the same number of ¼’s (to
In step 2, we sort ÜÝ -planes. Thus, we pull one Ü-column from each of the ÜÞ -planes. Since each of the Ü-columns
in a given ÜÞ plane has within one the same number of ¼’s, the ÜÝ -planes differ by at most Æ ¼’s. Thus, after we sort
the values in each ÜÝ -plane, almost all the ÝÞ -planes are clean. In fact, we can only have two adjacent dirty ÝÞ -planes.
More speciﬁcally, all the ÝÞ -pla...
View Full Document
- Spring '07
- Graph Theory, Shortest path problem, µ, Comparator, comparators