23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

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.

for any real number 0 < a ≠ 1.<br />

Proposition A.14:<br />

for any real number 0 < a < 1.<br />

There is also a comb<strong>in</strong>ation of the two common forms, called the l<strong>in</strong>ear exponential<br />

summation, which has the follow<strong>in</strong>g expansion:<br />

Proposition A.15: For 0 < a ≠ 1, <strong>and</strong> n ≥ 2,<br />

The nth Harmonic number H n is def<strong>in</strong>ed as<br />

.<br />

.<br />

Proposition A.16: If H n is the nth harmonic number, then H n is ln n + Θ(1).<br />

Basic Probability<br />

We review some basic facts from probability theory. The most basic is that any<br />

statement about a probability is def<strong>in</strong>ed upon a sample space S, which is def<strong>in</strong>ed as<br />

the set of all possible outcomes from some experiment. We leave the terms<br />

"outcomes" <strong>and</strong> "experiment" undef<strong>in</strong>ed <strong>in</strong> any formal sense.<br />

Example A.17: Consider an experiment that consists of the outcome from flipp<strong>in</strong>g a<br />

co<strong>in</strong> five times. This sample space has 2 5 different outcomes, one for each different<br />

order<strong>in</strong>g of possible flips that can occur.<br />

Sample spaces can also be <strong>in</strong>f<strong>in</strong>ite, as the follow<strong>in</strong>g example illustrates.<br />

Example A.18: Consider an experiment that consists of flipp<strong>in</strong>g a co<strong>in</strong> until it comes<br />

up heads. This sample space is <strong>in</strong>f<strong>in</strong>ite, with each outcome be<strong>in</strong>g a sequence of i tails<br />

followed by a s<strong>in</strong>gle flip that comes up heads, for i = 1,2,3,….<br />

A probability space is a sample space S together with a probability function Pr that<br />

maps subsets of S to real numbers <strong>in</strong> the <strong>in</strong>terval [0,1]. It captures mathematically the<br />

notion of the probability of certa<strong>in</strong> "events" occurr<strong>in</strong>g. Formally, each subset A of S is<br />

915

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

Saved successfully!

Ooh no, something went wrong!