08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

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.

f(n) is O(n) but in bounding the lower order term, we write f(n) = 2n + o(n). Finally,<br />

f(n)<br />

f(n)<br />

we write f(n) ∼ g(n) if lim = 1 and say f(n) is ω(g(n)) if lim = ∞. The<br />

n→∞ g(n)<br />

n→∞ g(n)<br />

difference between f(n) being Θ(g(n)) and f(n) ∼ g(n) is that in the first case f(n) and<br />

g(n) may differ by a multiplicative constant factor.<br />

12.2 Useful relations<br />

Summations<br />

n∑<br />

a i = 1 + a + a 2 + · · · = 1 − an+1<br />

1 − a , a ≠ 1<br />

∞∑<br />

a i = 1 + a + a 2 + · · · = 1<br />

1 − a , |a| < 1<br />

∞∑<br />

ia i = a + 2a 2 + 3a 3 a · · · =<br />

(1 − a) , |a| < 1<br />

2<br />

∞∑<br />

i 2 a i = a + 4a 2 + 9a 3 a(1 + a)<br />

· · · =<br />

(1 − a) , |a| < 1<br />

3<br />

n∑ n(n + 1)<br />

i =<br />

2<br />

n∑<br />

i 2 n(n + 1)(2n + 1)<br />

=<br />

6<br />

∞∑ 1<br />

i = π2<br />

2 6<br />

i=0<br />

i=0<br />

i=0<br />

i=0<br />

i=1<br />

i=1<br />

i=1<br />

We prove one equality.<br />

∑<br />

Write S = ∞ ia i .<br />

Thus,<br />

i=0<br />

∞∑<br />

ia i = a + 2a 2 + 3a 3 · · · =<br />

i=0<br />

S − aS =<br />

aS =<br />

∞∑<br />

ia i+1 =<br />

i=0<br />

∞∑<br />

ia i −<br />

i=1<br />

a<br />

, provided |a| < 1.<br />

(1 − a)<br />

2<br />

∞∑<br />

(i − 1)a i .<br />

i=1<br />

∞∑<br />

(i − 1)a i =<br />

i=1<br />

∞∑<br />

a i =<br />

i=1<br />

a<br />

1 − a ,<br />

from which the equality follows. The sum ∑ i 2 a i can also be done by an extension <strong>of</strong> this<br />

i<br />

method (left to the reader). Using generating functions, we will see another pro<strong>of</strong> <strong>of</strong> both<br />

376

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

Saved successfully!

Ooh no, something went wrong!