Mathematics for Computer Science

(avery) #1

15.6. References 651


LetTnbe the number of different combinations ofnmishaps that Dan can suffer
in one day (where we regard different sequences ofbreaksas different combina-
tions). For example,T 0 DT 1 D 0 , since there are always two or more breaks. On
the other hand,T 3 D 36 ; the reasoning is that there can be three breaks (which can
happen in 33 D 27 different combinations), or a spill and two breaks (which can
happen in 32 D 9 different combinations).


(a)Express the generating function

T.x/WWDT 0 CT 1 xCT 2 x^2 CT 3 x^3 C

as a quotient of polynomials andexplain your derivation.


(b)T.x/can be written in the form

T.x/D

9x
2




1


1 3x


1


1 x




:


Using this fact, show that forn 2 ,


TnD

3 nC^1  9
2

:


Exam Problems


Problem 15.12.
T-Pain is planning an epic boat trip and he needs to decide what to bring with him.


 He must bring some burgers, but they only come in packs of 6.

 He and his two friends can’t decide whether they want to dress formally or
casually. He’ll either bring 0 pairs of flip flops or 3 pairs.

 He doesn’t have very much room in his suitcase for towels, so he can bring
at most 2.

 In order for the boat trip to be truly epic, he has to bring at least 1 nautical-
themed pashmina afghan.

(a)LetB.x/be the generating function for the number of ways to bringnburgers,
F.x/for the number of ways to bringnpairs of flip flops,T.x/for towels, and
A.x/for Afghans. Write simple formulas for each of these.

Free download pdf