17.01.2013 Views

Algorithms and Data Structures for External Memory

Algorithms and Data Structures for External Memory

Algorithms and Data Structures for External Memory

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.2 Lower Bounds <strong>for</strong> Sorting <strong>and</strong> Other Problems 61<br />

back on disk. There<strong>for</strong>e, we get the following lower bound on the number<br />

O of output operations:<br />

O ≥ 1<br />

�<br />

�<br />

�<br />

bi . (6.5)<br />

B<br />

1≤i≤I<br />

Combining (6.2), (6.3), <strong>and</strong> (6.4), we find that<br />

� �I+O N(1 + logN)<br />

�<br />

� �<br />

M<br />

≥<br />

N!<br />

,<br />

(B!) N/B<br />

(6.6)<br />

1≤i≤I<br />

where O satisfies (6.5).<br />

Let ˜ B ≤ B be the average number of items input during the I input<br />

operations. By a convexity argument, the left-h<strong>and</strong> side of (6.6) is maximized<br />

when each bi has the same value, namely, ˜ B. We can rewrite (6.5)<br />

as O ≥ I ˜ B/B, <strong>and</strong> thus we get I ≤ (I + O)/(1 + ˜ B/B). Combining<br />

these facts with (6.6), we get<br />

� N(1 + logN) � I+O<br />

� N(1 + logN) � I+O<br />

bi<br />

� �I M<br />

˜B<br />

� � (I+O)/(1+ B/B) ˜<br />

M<br />

˜B<br />

≥<br />

≥<br />

N!<br />

; (6.7)<br />

(B!) N/B<br />

N!<br />

. (6.8)<br />

(B!) N/B<br />

By assumption that M/B is an increasing function, the left-h<strong>and</strong> side<br />

of (6.8) is maximized when ˜ B = B, soweget<br />

� �<br />

� � (I+O)/2<br />

I+O M<br />

N(1 + logN) ≥<br />

B<br />

N!<br />

. (6.9)<br />

(B!) N/B<br />

The lower bound on I + O <strong>for</strong> D = 1 follows by taking logarithms of<br />

both sides of (6.9) <strong>and</strong> solving <strong>for</strong> I + O using Stirling’s <strong>for</strong>mula. We<br />

get the general lower bound of Theorem 6.1 <strong>for</strong> D disks by dividing the<br />

result by D.<br />

6.2 Lower Bounds <strong>for</strong> Sorting <strong>and</strong> Other Problems<br />

Permuting is a special case of sorting, <strong>and</strong> hence, the permuting lower<br />

bound of Theorem 6.1 applies also to sorting. In the unlikely case that<br />

B logm = o(logn), the permuting bound is only Ω(N/D), <strong>and</strong> we must

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!