09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

330 GENERATING FUNCTIONS<br />

nice property of t2 by retain:ing z2 when we factor the denominator: We need<br />

not take 1 - 4z2 + z4 all the way to a product of four factors (1 - pkz), since<br />

two factors of the <strong>for</strong>m (1 - ()kz’) will be enough to tell us the coefficients. In<br />

other words if we consider the generating function<br />

W(z) =<br />

1<br />

l-42+z2<br />

= w()+w,z+w22+-. ,<br />

we will have V(z) = zW(z’) and U(z) = (1 - z2)W(z2); hence Vzn+l = W,<br />

and U2,, = W,, -W,.- 1. We save time and energy by working with the simpler<br />

function W(z).<br />

The factors of 1 -4z+z1 are (2-2-d) and (z-2+&), and they can<br />

also be written (1 - (2+fi)z) and (1 - (2-fi)z) because this polynomial<br />

is its own reflection. Thus it turns out that we have<br />

VZn+l = wn =<br />

U2n = w, -w,_, =<br />

3-2~6<br />

qq2+J3)“+-(2-ti)“;<br />

3+J3 3-d<br />

-+2+&)?-(2-\/5)n<br />

(2+&l” + (2-m”<br />

= 3 - a 3td3<br />

(7.37)<br />

This is the desired closed <strong>for</strong>m <strong>for</strong> the number of 3 x n domino tilings.<br />

Incidentally, we can simplify the <strong>for</strong>mula <strong>for</strong> Uzn by realizing that the<br />

second term always lies between 0 and 1. The number l-lz,, is an integer, so<br />

we have<br />

(7.38)<br />

In fact, the other term (2 -- &)n/(3 + A) is extremely small when n is<br />

large, because 2 - & z 0.268. This needs to be taken into account if we<br />

try to use <strong>for</strong>mula (7.38) in numerical calculations. For example, a fairly<br />

expensive name-brand hand Icalculator comes up with 413403.0005 when asked<br />

to compute (2 + fi)‘O/(3 - a). This is correct to nine significant figures;<br />

but the true value is slightly less than 413403, not slightly greater. There<strong>for</strong>e<br />

it would be a mistake to tak.e the ceiling of 413403.0005; the correct answer,<br />

U20 = 413403, is obtained by rounding to the nearest integer. Ceilings can I’ve known slippery<br />

be hazardous.<br />

floors too.<br />

Example 4: A closed <strong>for</strong>m <strong>for</strong> change.<br />

When we left the problem of making change, we had just calculated the<br />

number of ways to pay 506. Let’s try now to count the number of ways there<br />

are to change a dollar, or a million dollars-still using only pennies, nickels,<br />

dimes, quarters, and halves.

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

Saved successfully!

Ooh no, something went wrong!