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.

312 GENERATING FUNCTIONS<br />

Now we have three equations in three unknowns (U, V, and A). We can solve<br />

them by first solving <strong>for</strong> V and A in terms of U, then plugging the results<br />

into the equation <strong>for</strong> U:<br />

v = (I - Q)-ml, A = (I-g)-‘ou;<br />

u = I + B(l-B,)-‘ml + B(I- gyou + pJu<br />

And the final equation can be solved <strong>for</strong> U, giving the compact <strong>for</strong>mula<br />

u = 1 - B(l-@)-‘[I -<br />

I<br />

B(I-gJ-‘o - R’<br />

(7.8)<br />

This expression defines the infinite sum U, just as (7.4) defines T.<br />

The next step is to go commutative. Everything simplifies beautifully<br />

when we detach all the dominoes and use only powers of II and =:<br />

u =<br />

1<br />

1 - O&(1 - ,3)-~’ - Po(l - ,3)-l - ,3<br />

l-o3<br />

= (I- ,3)2 -20%;<br />

(1 - c33)-’<br />

-<br />

= l-202o(1<br />

- &:I+<br />

1 2020 404 02<br />

=m+<br />

80603 ~-<br />

(1 - ,3)3 + (1 - ,3)5 + (1 - ,3)7 +...<br />

= t (m;2k)2’.,,2kak+h.<br />

k,m>O<br />

(This derivation deserves careful scrutiny. The last step uses the <strong>for</strong>mula<br />

(1 - ,)-2k--1 = Em (m+mZk)Wm, identity (5.56).) Let’s take a good look at<br />

the bottom line to see what it tells us. First, it says that every 3 x n tiling<br />

uses an even number of vertical dominoes. Moreover, if there are 2k verticals,<br />

there must be at least k horizontals, and the total number of horizontals must<br />

be k + 3m <strong>for</strong> some m 3 0. Finally, the number of possible tilings with 2k<br />

verticals and k + 3m horizontals is exactly (“i2k)2k.<br />

We now are able to analyze the 3 x 4 tilings that left us doubtful when we<br />

began looking at the 3 x n problem. When n = 4 the total area is 12, so we<br />

need six dominoes altogether. There are 2k verticals and k + 3m horizontals,<br />

I /earned in another<br />

class about “regular<br />

expressions.” If I’m<br />

not mistaken, we<br />

can write<br />

u = (LB,*0<br />

+BR*o+H)*<br />

in the language of<br />

regular expressions;<br />

so there must be<br />

some connection<br />

between regular<br />

expressions and generating<br />

functions.

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

Saved successfully!

Ooh no, something went wrong!