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.

Justification: It is enough to show that ab < c 2 /4. We can write<br />

ab = a 2 + 2ab + b 2 − a 2 + 2ab − b 2 /4<br />

= (a + b) 2 − (a − b) 2 /4 ≤ (a + b) 2 /4 < c 2 /4.<br />

The natural logarithm function lnx = log e x, where e = 2.71828…, is the value of the<br />

follow<strong>in</strong>g progression:<br />

e = 1 + 1/1! + 1/2! + 1/3! + ···.<br />

In addition,<br />

e x = 1 + x/1! = x 2 /2! + x 3 /3! + ···<br />

ln(1 + x) = x − x 2 /2! + x 3 /3! + x 4 /4! + ···.<br />

There are a number of useful <strong>in</strong>equalities relat<strong>in</strong>g to these functions (which derive<br />

from these def<strong>in</strong>itions).<br />

Proposition A.2: If x > − 1,<br />

x/1 + x ≤ ln(1 + x) ≤ x.<br />

Proposition A.3: For0≤x > 1,<br />

1 + x ≤ e x ≤ 1/1 − x.<br />

Proposition A.4: For any two positive real numbers x <strong>and</strong> n,<br />

Integer Functions <strong>and</strong> Relations<br />

The "floor" <strong>and</strong> "ceil<strong>in</strong>g" functions are def<strong>in</strong>ed respectively as follows:<br />

1. x = the largest <strong>in</strong>teger less than or equal to x.<br />

2. x = the smallest <strong>in</strong>teger greater than or equal to x.<br />

The modulo operator is def<strong>in</strong>ed for <strong>in</strong>tegers a ≥ 0 <strong>and</strong> b > 0 as<br />

.<br />

912

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

Saved successfully!

Ooh no, something went wrong!