{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

problemset6 solutions

# Since each of the columns in a given plane has within

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

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 within one). 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

{[ snackBarMessage ]}

Ask a homework question - tutors are online