06.03.2017 Views

Mathematics for Computer Science

e9ck2Ar

e9ck2Ar

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.

“mcs” — 2017/3/3 — 11:21 — page 699 — #707<br />

16.6. References 699<br />

Exam Problems<br />

Problem 16.11.<br />

T-Pain is planning an epic boat trip and he needs to decide what to bring with him.<br />

He must bring some burgers, but they only come in packs of 6.<br />

He and his two friends can’t decide whether they want to dress <strong>for</strong>mally or<br />

casually. He’ll either bring 0 pairs of flip flops or 3 pairs.<br />

He doesn’t have very much room in his suitcase <strong>for</strong> towels, so he can bring<br />

at most 2.<br />

In order <strong>for</strong> the boat trip to be truly epic, he has to bring at least 1 nauticalthemed<br />

pashmina afghan.<br />

(a) Let B.x/ be the generating function <strong>for</strong> the number of ways to bring n burgers,<br />

F .x/ <strong>for</strong> the number of ways to bring n pairs of flip flops, T .x/ <strong>for</strong> towels, and<br />

A.x/ <strong>for</strong> Afghans. Write simple <strong>for</strong>mulas <strong>for</strong> each of these.<br />

(b) Let g n be the the number of different ways <strong>for</strong> T-Pain to bring n items (burgers,<br />

pairs of flip flops, towels, and/or afghans) on his boat trip. Let G.x/ be the<br />

generating function P 1<br />

nD0 g nx n . Verify that<br />

(c) Find a simple <strong>for</strong>mula <strong>for</strong> g n .<br />

G.x/ D<br />

x7<br />

.1 x/ 2 :<br />

Problem 16.12.<br />

Every day in the life of Dangerous Dan is a potential disaster:<br />

Dan may or may not spill his breakfast cereal on his computer keyboard.<br />

Dan may or may not fall down the front steps on his way out the door.<br />

Dan stubs his toe zero or more times.<br />

Dan blurts something foolish an even number of times.

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

Saved successfully!

Ooh no, something went wrong!