Professional Documents
Culture Documents
Sessions 25-35 Combinatorics PDF
Sessions 25-35 Combinatorics PDF
Combinatorics
Basic Counting principles
Ex 1: You have 5 shirts and 3 pants. How many different outfits can you
put together?
Soln: we can select a shirt in 5 different ways and for each shirt, we
have 3 choices to select a pant.
Therefore, the total no. of different outfits is 5×3=15. Inches
•
Si 52 55
Sz 54
•
•
• •
P, Pz Pz Pi P2 P3 P, Pz Pz P2 P, P2 B
p, pg
Thus , possible outfits are
{ SIP , , 51Pa Sps
, ,
Sap, , 5212,5313 , i
-1,5513 }
By the
sum
,
there are 37+83=120
possible
ways
to
pick representative .
Ex 3: The menu at the restaurant is limited: six kinds of rice, eight kinds
of sandwiches, and five beverages (hot coffee, hot tea, iced tea, cola,
and orange juice) miss Preethi went to the shop to get a lunch – either a
rice and a hot beverages or a sandwiches and a cold beverages. In how
many ways Preethi can purchase her lunch?
Soh Preethi get and hot 6×2
: can a rice a
beverages in
ways ,
6×2+8+3 36
ways
= .
words
of length 3 : 112
,
333
,
432 ,
134, - - -
The total no . : n .
n n - .
. . .
.
n = Nk
-
K times
fi , 2,3, - - -
is }
Y =
{ I , 2,3 , . -
in }
The number
of maps from X to X is nk .
Let f: X → y
,
f corresponds to the word ( fi ) ,
f-② .
. . .
, flies )
Or
consider t
ooo
✓ • o o o o 0
27
there are
possibilities .
Ex 5: How many bit strings of length 8 either start with a 1 bit or end
with the two bits 00?
Sdn : Consider
case i ;
I
Case ii : O 0
and others
Fix last 2
positions by o o 1st position by 1
,
can be filled in 25
ways
.
bit 27+26-25
Total
stings
'
. .
is = 160
Note :
Principle used in the last Eris called inclusion - occlusion
this will be introduced later
principle ,
.
There are 26
uppercase letters
and to
digits .
No .
No .
one
.
. six are
366 -
266 .
.
.
are -
.
Permutations
,
n
} (n distinct objects)
to itself.
>
l
I
y
> 2
Z
3 > 3
Above
permutation is 213 .
MY other
permutations are
123 ,
132 231 312 321
, , , .
,
h } is n ! .
nd has
2. element ( n -
1) choices ,
K
? element has (n -
CK D) -
choices
:
-
: the total no . is rich 1) ( n 2)
- -
. . . 2. I = n ! .
Convention : O! =L .
k-permutation: ( OE Ksn )
A k-permutation is a linear ordering (ordered arrangement) on a
k-element subsets of { 112,3 in } ,
. . -
.
Ex : n =3
, 4112,3 }
I -
permutation : l
,
2
,
3
2-
permutations : 12
,
13 , 21,23 ,
31,32 .
Thm : The number of k - permutations of { 112 , 3
,
. . .
n
} is
n (n -
t ) ( n 2) -
- - -
(n -
K -
D) = n ' .
(n -
K) !
Pt : There are n -
D -
n -
Ck -
i ) possibilities for the Kth entry
The total
permutation (n D ( n 2) (n )
'
-
.
no .
of K -
is n -
-
. . -
-
Ck -
n
= n (n D
- - - -
(n -
Ck D )
-
(n -
K ) (n -
( KH)) . . .
2.1
(n -
) (n
K -
( Ktm ) - n . 2 .
I
= n !
(n -
K) !
It is denoted
by hp, on p ( no) .
Another interpretation
het X -
-
fi , 2,3, - - -
is }
Y =
{ I , 2,3 , . -
in } ( K En )
The number
of injective maps from X to X is
hp,
The answer is
100103 = 100×99×98 .
permutations .
Ex 9: Three cards are chosen one after the other from a 52-card deck.
Find the no. of ways this can be done
a) with replacement. b) without replacement.
Sdn : a ) with
replacement
No .
b) without replacement
pg ways .
!
,
n
l l
hi ! nzl . B .
- r -
Ma .
4 -
A are
3 -
S lo ! '
I V 4! 3 !
-
l -
be
The no .
3 !
Single character in
arrangements)
I S No
of arrangements of these letters are 12 !
-
"
3- 0 3 ! 21.21.2 !
2 -
C
2- I a) No .
1 -
G
adjacent are
1- A
3
11 !
! 21.21.21
✗ 2 '
( here
AG as
we
single
consider
character and
)
.
Ah can be
arranged in 2 ways
No .
! 6 !
( because vowels
kept together in
)
7 ✗
are
Ex 12 : In how many different ways can the letters of the word ’LEADING’
be arranged in such a way that the vowels always come together?
-
: the no .
A C A D
D A
D F D B B
B
A C C
C E E E E
F B F B
(a) ( b) ( c) (d )
ABC DEF ,
FABCDE ,
EF ABCD
,
DEF ABC
,
CDEFAB ,
BC DEFA ,
to circular
-
Correspond same
arrangement .
6 X ( No of circular
arrangements A B F)
i
-
.
.
of , , C.
D E, ,
=
( NO of linear
.
arrangements of A, B ,
C
,
D, E , F)
= 61
8
i .
No .
of circular
arrangement of A B , ,
C
,
D, E
,
F are
661=51 .
.
In general
ri seated about table
If people are a round
,
then
Mn In D ! -
arrangements are
possible .
Ex 14: How many necklaces can be formed of 7 distinct beads?
Note :
Necklace can be rotated oof and flipped over ; all beads
are same .
/ - r
-
n
l l l l l l
v v u
N, NZ N3
obtained
Nz is
by violating Ni .
Nz obtained
flipping Ni
is
by .
Two
the other
circular
arrangements are same
,
if one is obtained from
by flip .
.
. no .
=
.
k- combination
An k-combination of elements of a set is an unordered selection of k
elements from the set.
Thus, an k-combination is simply a subset of the set with k elements.
Ex : S =
f 1,2 , 3,4 }
2 -
combination : 12 , 23
,
34 , 41 ,
13
,
24
3- combination : 123
,
234 ,
341 , 124
of a set h is
by hck or Ccn ,
K ) of
(7) ,
dead as n choose k .
efficient .
( (n K) =
n !
,
K! (n -
K) !
set elements
of n -
.
Ccn ,
K ) is unordered Selection
of K -
elements from the
set of n -
elements .
. .
= ( X K
in each K -
combination can
Ccn ,
K ) = pln ,
k )
be done in t!
ways )
KT
Ot ( (n ,
K ) = n ! .
K ! (n -
K )!
Ex 15: How many poker hands of five cards can be dealt from a standard
deck of 52 cards? Also, how many ways are there to select 47 cards from
a standard deck of 52 cards?
in
Cf) ways .
Therefore , (1) =
Inn .
.
) .
- 8 8=4 .
, ,
Yo
.
No .
of 4 8
positions
= = 8 .
4! 4 !
of possible arrangements
8
object there
of are
= 8I .
41.4 !
Note : No .
of K -
combinations from a set of n objects
=
No .
of permutations of n
objects where there are
k
indistinguishable objects of type ) and
n -
k
indistinguishable objects of type 2 .
Ex 17: A coin is flipped 10 times where each flip comes up either heads or
tails. How many possible outcomes
(a) are there in total?
(b) contain exactly two heads?
(c) contain at most three tails?
(d) contain the same number of heads and tails?
So In : Consider
of ways of selecting
two heads
containing exactly 2
positions of lo position .
( 9) L÷,
'
= =
= 45 .
+
possible outcomes
containing
2- tails
+
possible outcomes
containing
t -
trail .
+
possible outcomes
containing
o - tails
= t + ④ Coo ) + .
d) possible
same no
outcomes
of heads
.
containing
and tails
=
( 105 ) -
fnE÷ei÷÷
'
¥ :p.mn?knuh;ni:onn:sissia:ted
.
in
(g) ways .
2 ! 2 ! 2 !
By product rule
, required possible arrangements are
(93 ) x 8! .
2 ! 2! 2 !
Ex 19: Suppose that Ellen draws five cards from a standard deck of 52
cards. In how many ways can her selection results in a hand with no
clubs?
Sdn : There are 13 clubs .
no .
⇐s .
Ex 20: In how many ways can 12 different books be distributed among
four children so that
(a) each child gets three books?
(b) the two oldest children get four books each and the two youngest get
two books each?
Solh : there are 12 books and 4 Children ( say 4 ,
Cz, b
,
Cy )
books
After this event,
only 9 remain .
Then 3 books
can be
given to Cz in
§) ways .
(g) and
(3) ways respectively .
of ways 12 can be
that each
4 children such
get 3 books are
④ x x
x⑦ .
x x
④ x
(z ) ways
we can
,
properties of binomial co -
efficient
i ) ( no ) =
Cnn ) = I
iil
In ) Inn ) n
-
= -
, .
.
iii )
4×1=4*1
in =
In ,
+
Cia 's
Pf of iv ) :
(2) → No .
of K -
element subsets of fi , 2,3 , . . -
in }
No .
of K -
element subsets
( Ya )
X element
element No of K
ofk
-
.
No
-
.
'
containing subset not
containing ,
subsets
containing 1
,
Since it
already 1,
we have to choose (K -
i ) from (n -
i ) elements that can be
done in
( 7,7 ) ,
ways .
If K -
et .
subsets do not contain 1
, then K have to be chosen
in ( n ) elements
-
i .
The no .
4,7 ) ways .
thus ⑦ =
Hi:) this ) .
The Pascal 's
triangle
1 I
z (b) l l l!)
3 (3) i (7) 2
(3) i
=⇐'d -14¥ )
(no ) (7)
"
)
v
+ +
(2) t - - -
tfnn ) = 2
of
E. ⑦ =zn .
Pt :
( Ya ) is the no .
of K -
et . Subsets of 4h43 ,
- - r
,
n }
,§o( Ye ) =
no .
,
n }
= no .
of maps ( { 1. 2,3, . - -
in } →
40,14 )
(
)
elements to subset
belong maps
b- 1
others too
maps
= 2 ?
Thm ( Binomial thin )
( no ) ( ) tf )
" '
an
'
an b' aobn
(
-
atb) an bot n
-
= b t . . -
t
,
§zo an kbk
-
h
Pf :
(at b) =
(atb ) ( atb) n . .
(atb )
-
n factors
co -
eff in
It is equal to the no .
of K -
property d) can
proved using
be this thm
,
put a =L b
get I we
-
,
,
n
{ (Ya )
"
Cti ) = .
KIO
( vi ) put a -_ i
,
b= -
I
c- it o ( no ) (7) +
(H ⑦ t
fun)
. . .
- -
=
-
.
-
Multinomial theorem
XY ¥3 nett
'
F- on tue integer n
,
t
,
the co -
efficient of -
"
in the
expansion of ( X
, teztlzt - r -
tf) is
n !
hi ! ha ! - r -
ht !
O E ni En
,
1=1,2 , 3, . . . t ,
and n, that . - -
tht -_ n .
Ex 21 : Obtain the co -
eff of a5b2 in the
expansion of
Ga -
Sb )?
Solh : Let 1=2 a
y= -
3b
The co -
eff of X5y2 in the
exp KtyY is
⑦
and
⑦ x5y2 =
(2) Gaff-342
254372
=
⑦ a5bb
Thus , to -
eff of a5b2 in the
exp of Ga -
347 is
(2) 254312
Ex 22 : obtain co -
eff of a2b3Ed5 in the
exp .
of
-1241-5/6
( at 2b -
3C .
Sdn : Let I
,=a ,
dz=2b , Xz = -
3C ,
14=2 d , 15=5
Coefficient of 42%315×54%4
and
f !! !
, :S ,
42%3×55*4
= 16 ! AZ 2353 C-312T 251554
21.372.514 !
't"I:3:¥: .. .
.
Cab driver
problem
!.it
gg#FBItoomhowaTfYpw?ayscanweget
R R
unit
up of steps
to the
i
A R
V
going one
unit
right or
R u
one
upward .
• •
Pm from Ato
u
Ane
-
the no .
of paths B .
n
,
M blocks
PA → B
=
Pa Bt PA"→B
'
→
Ex : It n= '
l
•
l l l l l 9
Pm In
-
= mtl
,
,
If n=o
A B
• • a co co •
Pm ,
o
= I
If M=n=2 •
13,2=6 •
Sohni :
Recurrence relation on Pm ,n :
Pm , n
=
Pm ,
n -
it Pm - i
, n .
We have
(71--4,21) -14k )
.
1
relation
satisfy
-
It recurrence as
.n=fntn )
-
: Pm
fmtnnf-fmntn.IT/mtnn-YSolnz
.
Paths A-
correspond to
sequences of
: → B R 's
and U 's
of length mtn with m R 's
and n U 's .
#mtn
Select n letters .
08
No .
No .
( mtn ) !
( )
mtn
= .
n
n ! m !
combination
k -
with ne
petition
consider k balls ( identical ) and n boxes ( distinct) .
K balls . . .
h boxes .
. .
)
i
If maximum capacity of each box is 1
,
the answer
is
o ,
otherwise .
of ways can we
put balls k
in n boxes is equal to the of K no .
-
combinations of
a set with n
objects when repetition of elements is
allowed .
-
4 boxes
5 balls
4 boxes
I 2 3 4
Let us
represent as follows :
b- balls
The no .
of ways and 4 -
I =3 bars can be configured
"
Is; ;!
! or
ft ) 's
ways
k balls and
If there are n boxes ,
then
corresponding k balls
configured
fhtak )
and Ch 1) bars -
can be in l
ways
-
THE )
'
ways .
Equivalently ,
the number of K - combinations from a
,
}
-
l
) .
6 cookies be
( tuk )
t
chosen in
can
ways
-
Here 12=6 .
Ans :
(4+8-1) =
(g)
Ex 24 : Determine all integer solutions to the
equation
dit ez t Iz where for all si E4
t
14=7 ,
I
; >o I .
14=1 ,
this is different from 34=0 , 12=4 , 13=2
14=1 .
A
possible interpretation is the no .
of ways we
balls boxes
can put 7 in 4 .
n
: answer is
(4+4-1) =
(g)
Remark : The no .
is
Inti: -
t
) .
How Solms
Ex 25 :
many integer are There to the
inequality
dit Iz L 10 Xi 30 , I Ei Eb
-1×3+14 + If +
If ,
3470 . ②
The no .
of
Solus of
nonnegative integer
34+12+13+14 test Ift y here
1=10
y= Xp I 70
-
I 9
,
t
Xztxzt $4 t
E- + If Ty
=
,
No .
of non
negative sobs is
(7+99-1) =
(f) .
Sequence : It is a real / complex valued function on the positive
integers .
Ex :
Consider the sequence fan )
,
where an =
In -
Al , Az , 93 in -
are
,
\
, I '
¥ 14 ,
,
¥ ,
- - -
baby rabbits
- adult rabbits
month rabbits No .
of rabbit pairs
to '
2 I
3 ¥ 2
4 ¥ 3
5 ¥ 8¥ 5
÷
Question : How rabbits will after
many pairs of year ?
have
you
a
Then Fn = Fn i
t Fn z
F =L
, Fz = I
, ,
- -
- -
Recurrence relation Initial conditions
for Fn
1 ,
I ,
2
,
3
,
5, 8 13
,
21 34 55
89,1424=52 - - .
,
, , , ,
n sum
up no s .
in swallow diagonals
l l ,
l
Z l l Z
z
Fibonacci numbers
3 I 2 I 5
4 I 3 3 I 813
'
I 6
i
5 4 4 I
6 I 5 10 10 5 I
7 1 6 15 20 15 6 7
Here Fz =
(f) ,
Fz =
(3) t ) +
Fa = +
(3) , Fs =
140 ) t +
( z)
Fo = +
(4) (2) +
, E- (8) (9) ④ + + t
4=1
general =§=o ( E- 1)
In ,
Fn -
Moreover
,
Fn =
Fm , +
Fn -2 : = +
and F, =
1--2=1
Ex : Find the no. of bit string of length n that do not have two
consecutive 0’s
No .
of bit
string of length n with no consecutive 0 's .
+
with
such
string ending
bit 1
No .
of .
.
! An = An -1 + an -2
⑤ consider the
strings that end with 1
,
that is Equal
to
011 0 of bit
strings of length
me .
3 .
④ 010
10 10 01 I
④ 101
④ 110
1110 I 1 I
①
Connick the
strings that end with 0
,
that is equal to
strings of length 2 .
%
11
Defn : A linear
homogenous recurrence relation of degree K
with constant coefficients is a recurrence relation
of the form
an =
4 An -
, + Czan zt -
- i -
+
ckan -
K ⑤
linear because an -1 an -2 an appear in
separate
-
. . -
, , , -
k
,
Ck are constant .
Remember : A
sequence defined linear
by determined a recurrence
relation uniquely 1st
K terms
is
Ai
by its
Ao , , 92 , i - i
, AK -
1 .
relation
And ,
recurrence (A) along with K Ic 's
Ed :
1) Fn =
Fn -
,
+ Fn -2 is Linear Homo . RR
of deg 2
2) Pn = (1-11) Pn -1 "
degli
3) an = an -
, tanz is not linear .
4) Hn = 2 Hn -1+1 ,
is Linear but not
homogenous
5) bn = Cbn -6 Linear Homo .
RR
of deg 6
Solution E)
of
A Seqence do ,
a , .az , . . .
is said to be Sdn of E) if it
salsifies # .
Note : If ao
,
a, .az , . . . and do ,
ai ,
and .
. - r
aotao ,
a
, tai ,
aztaz ,
.
. .
also satisfies ⑦ .
Method to solve #
when 1<=1
.
An = Can - i
a ,
=
Cao
Az = Ca , = day
Az =
Caz = Gao
.
: tan = Chao -
geometric progression .
Assume that an
-
- oh is a Sdn of .
then ,
this has to satisfy # .
Z K
fh tczfh Ck yn
I -3
th Czyh
-
- -
= C t t .
. .
t
,
both sides
by oh
-
K
÷
ghn÷
yn
4 Cz
Omagh
TI Ck
t t t
-yn*=
. . .
, K K
yn
- -
8k ok
'
Iz 8k
Z
-
-
= C
,
t t . . .
t Ck
= C
,
t t t . . .
t
Ck .
Consider the uecuioence relation of degree 2 .
An = c
, an -1 1- Cz an -2 . ( * * )
characteristic eqn
th = c
,
t + cz #-)
501ns of (* *
) are
1
,
X
,
H, X ? - . .
and 1, n
,
n ? u3 ,
. . . .
General Sohn :
an = CX
"
+ Deen
ii ) IfX=u(sayo),mensoln-
1 X H ✗3 ( (XY ) ,
, , ,
. . . .
and
0
,
×
,
2×2
,
31 ? . . .
( (nM) )
General Solis is
" "
an = C X + Dnt
it with
multiplicities
Mi , Mz , .
.
.
, Mt , respectively ,
so mi 31 and mitmzt . . -
+ M+=k .
soln
Then a
sequence hanh is a
of the recurrence relation
" ft
an =
µ ,
+ ✗
µ
n +✗ ,zn2 + . . .
+
4. m -
,
nm '
-
1) I
,
+
¢2,0 -142, , n t - - . +
dz.mg nm " )Ñz
,
+ ( nmt 1) It
-
+ ✗
at ,m+
+4 n + +
- - .
to
. . .
, , ,
for n=o
,
1,2 ,
. . .
,
where ✗i
,j are constants for kist and o£j Emi -1 .
Ex :
Suppose 2,2 ,
2 , 5,5 and 9 are roots
of the
characteristic linear relation What is
eqn of a recurrence .
Sohn :
Independent Solus of the deceit ounce relation are
2h n 2h n' 2h 5h n 5h and 9h .
General Sohn
, , , ,
" "
2h Az n22 AL, 5h
"
Al
"
2 t Az n t t + As n5 t Af 9
t2 = t + 2 then I = -
b ITH
2 a
'
t -
t -
2=0
1- = I
-
± Ft
Z
= I I 3
-
t
'
.
.
=
2 -1
, .
Ft om IC :
do = 2 = A , t Az
a
,
= 7 = 2A , -
Az
9 =3 A, of A , =3
and Az = -
I
-
: the solar of the recurrence relation with IC 's is
"
An = 3. 2h -
fl ) .
Eez : Find an
explicit formula for the Fibonacci no .s .
Solis : Fibonacci
sequence Fn satisfies the recurrence
relation
Fn = Fn -
i t Fn -
z
and Ic 's are Foto ,
Ffl
characteristic
eqn
.
1-2=1-+1
'
t -
t -
1=0
t =
-
I II.
Z
t = It RE
-
ie t =
Itf ,
1-15
2
Fibonacci
by
'
given
. . no .s are
( II)
"
( II)
"
' '
Fn = Ai t Az A , and Az
,
are constants .
to = A, t Az = O -
①
F, Ai
( II) (II ) ②
' '
=
+ Az = I -
A, = -
Az ( from ① )
Sabin ② .
A
,
fitz) -
A.
( III ) =L
A, ( Fb ) =/ or A, =
¥
'
Fibonacci
The are
given by
.
nos
-
-
' -
'
Ex 3 : Solve an = 6 an -
i
-
9 an -
z Ic 's
,
90=1 91=6 .
Sohn : Chai .
eqn
1-2=61--9
t -
Ot -19=0
ft -35=0
t
'
. .
=
3,3
If tanh is a
seq
that satisfy given recurrence adak ,
" "
an = A, 3 t Az n 3 -
Sub in ①, do = I = A ,
a
,
= 6 = A, 3 + Az 3
Az = I
- .
neurone
" "
an = 3 + n3 .
Ese 4 : Solve :
an =
6am , -119ns to an -3
,
IC 's 90=2 ,
91=5 ,
92=15 .
Sdn : characteristic
eqn
1-3=61-2 -
lit -16
t3 -
61-2+111--6=0 - ①
f- I satisfies ① .
We use
synthetic division method
l l -
b l l -
b
:
o
is si
-
,
①
ft -
D ft -
5ft 6) = 0
Consider 1-2-51--16=0
,
t= 2
,
3
I .
Toots of ① one 1
,
2
,
3
So In : an = A, M t Az 2
"
t Az 3h .
do = 2 = A + Azt Az
,
a
,
= b- = A, t 2 Az -13 Az
Az = 15 = A, t 4 Azt 9 Az
solving three
eqns for Ai , Az and Az ,
we
get
A , =L , Az = -
I
,
and As = 2 .
coefficients
A recurrence relation of the form
an = C
, ah -
i
t Cz ah -
z
t - - -
t Ck an -
k
t Fcn ) .
-
④
where Ci , Cz , Cz ,
r - r
,
Ck are real nos and Fln ) fo ( fn
a
of n )
The recurrence relation
an = C
, an -
,
t Cz an -
z
t ' "
t Ck an - k ⑤
called associated relation
is
homogenous recurrence .
and
"
is a
particular Sdn of the
nonhomogeneous recurrence
relation ⑧ .
and" = c
, and? ! + czdnizt . -
it ↳ anklet Fcn )
Now
suppose fbn } is a second soln of ⑧ ,
then
bn = c
, bn -
,
t iz bn -
z
t - - -
t Ck bn -
k t Fcn )
bn and" -
= c
, ( bn -
i
-
anni ) ) + Cz (bn -
z
-
anti ) t . .
.
+
Ck ( bn -
K
-
antis )
It follows that
{ bn -
If bn -
and" = and)
bn = and" tanh) for all n .
Thm :
Suppose
an = C
, an -
i t Cz an -
z t - - -
tckannk + Fln ) is
Fn =
( bo t b, n + bzn2 t - r .
tbpnt ) s
"
where bo ,
bi ,
. . .
( Po t p, n + Pant . - -
tpfnt ) Sh
ii ) when s is a loot
of the characteristic son of
multiplicity m
, and ')
is
of
the form
nm ( Potts Pant)
"
,
n t . - r
t S .
Ex :
If the recurrence elelation is
An = ban -
i
-
9 an -
z
t Fcn )
Associated deletion
homogenous recurrence is
An =
fan -
i
-
9 An -2
Chao .
Sqn
fr -
ft t 9 = 0
root are
t =
3,3
i
) when Fln ) =3
"
An = ban -
I
-
9 an -
z t 3h
-
:
particular solar is
of the form
( char
'
Po 3h 3 is the root the
n
of
'
sqn
with
multiplicity 2)
ii
) when Fcn ) = n2zn , particular Sohn is of the
form
form
NZ ( Potp, ntpzn ) 3h
Ex : solve
an =3 An -
, + 2h
,
IC is do =3 .
an = an tank?
To find anlh )
consider the associated relation
homogenous recurrence
,
an =3 An - I
char .
eqn
t =3
.
: ahhh ) = C 3h .
To find and) .
Here Fcn ) = 2n
,
therefore a is
of the form
and" =
( Pot Pin )
Then eqn an = 3am, tzn becomes
,
Pot P, n = 3 ( Pot P , (n D )
-
+ 2n
Potti = 3 Pot 3¥ -
3D , +21
( P, -
3D , -
2) n +
( Po -
3 Po +3 P, ) = O
-
2P , -2=0
,
-2 Pot 3D , = O
Solve for Po and P
,
P, = -
l Po = -
3g
,
: .
all" = -
3g
-
n
That ,
3h
an = C
312 n
- -
Use Ic ao =3 to find C .
do = 3 = C -
312
or c =
3+312 =
9/2
'
Solar of the relation with Ic
.
.
given recurrence
is
An =
9-2 .
3h -
312 -
n
Then
an = denn tan ' .
To find alnh) .
An = 5 an -
I
-
6 an -2 .
Chas is
eqn
.
t2 = 5 t -
b
or t2 -
5t +6 = 0
boots are t = 2
,
3
i .
an = c I + D 3h .
To find afp )
Here FG = 7
"
. .
'
.
and" is of the form ,
an
=
Poth ,
it follows that
a = b- and" -
6 an +7
"
Z
Po 7h Do 7h
I
7h 7h
-
Do
-
Ot = 5 - 6 +
÷
by 7h -2 ,
49 Po = 5 . 7 Po -
O Po t 49
\
(49-35+6) Po = 49
or Po =
LI
20
Solms form
'
"
¥g 7h
"
C 2 TD 3 t
an =
an = 4 an -
I
-
4 an -
z t ( htt ) 2h .
an = and't and?
find and
)
To
4 an -2 .
Chae EUN .
t2 = 4T -4
or t2 -
4T -14=0
Hence ,
and ' = c. 2
"
t D . n2
"
( Ceo affords me
)
To find an ,
Here Fn = ( htt) 2h .
-
'
. and" is
of the form ,
an =n2(pot P
,
n ) 2h
It follows that
an = 49mi) -
Hantz + Cnn) 2h
n' ( Potts ) 2h (n D2 ( Pot P, Ch D) 2h I
-
,
n = 4 -
-
4)
" -2
(
2
-
4 (n -
2) Pot D , (n - 2
"
+ @ ti) 2
h2 Cpotp ) 2h ( h2 ) ( P )2h I
-
,
n = 4 -
anti Pot ,
n -
D
,
-2
( -214 ) 2h
'
-
4 n -
4nt4 ) ( Po trip ,
t n 2h + 2h
-2
zh
÷
by
(Pod tpf ) 4=8 ( Pod tP¥n - 2 Pon -
2h12PM
+ Pot P , n -
D, )
-
4 ( Pott -
2PM -
4 Pon -
4PM -1813N
+ 4 Po -1417, n -
813 )
+ 4h -14
o = 8 ( -
2Pot3P , ) n t 8 ( Po -
Pi ) -
4 f -
4 Po +1214 ) n
8D , )
-
4 ( 4 Po -
t 4nt4
f +2410 , -116/13-4810,1-4 ) n t (
8 Po -
OP , -1013+3213+4)
= O
( g)
'
p, =L
,
Po = 24 t4 = I
6 -
Thus ,
and" =
n2( it
f- n
) 2
"
General Sdn is
an = czn + Dn 2
"
t h2( It
Ygn ) 2
"
put n =D in his
c
o =
I 2 D
7
=
t
3
08 D=
(1-713)/2 =
-61 =
-43
"
" '
( Itf ) 2n
"
t NZ
an =
43 n z n
-
Generating functions ( offs)
Defn : het Cao , 91,92 , - r .
) be a
sequence of nos ( ai EIR ) .
The
g. f of Cao ,
ai , 92 , . . .
) is the
following formal
series
power
O
G I =
aota , * + azjctaz t -
r -
:= Z an en
NIO
X is a formal variable ,
we do not
assign
values .
and
study convergence .
In "
"
Ex :
an =nn
g. f
a = X does not converges
,
h=o
Exit :
Suppose ( ao ,
a,
, az ,
- r .
) = ( 111,1 ,
. - r
) ,
then
g. f vis Cr = It etch t .
-
tent . . .
= I 1×121
1
I -
Ex 2 :
If Cao ,
a
, , az ,
. . .
) =
( I, d
, 12,13, . . .
) ,
G = It Xx theft .
. .
lick
=
¥ ,
'
Ex 3 : Let Cao ,
a, .az , .
. .am ) be the mm tow of the
Pascal ate .
C.tn .
=
( Mn ) ; an -_ o
,
n . > m .
hey =
(F) (7) + x +
( ma ) set . . -
tfmmsem
= Ctx )m .
Seq i ,
I
, ! l, I ut
Sdn : G =
It x -1×2-1×3 -1×4 txt
=
It -
I
is
Let A =
Jansen ,
B # =
{ birch .
n=o n=o
Then
it
Z fan
"
A- 4) 1- Bec ) = tbn ) x
h=O
A- ④ .
BG ) = (aotasetazc target ) . . .
x
( botbsctbzctbzct . . .
)
= aobo + (aob ,
ta
,
bo ) x + (aobzta ,
b
, tazbo )I2
+ . .
.
n§ ,
Chen ,
where
Ck=§!oaj by j -
That is Also .
Bee ) =
§ ( ⇐oajbn )
,
-
j
In
Example :
Let
A④=f→ ,
B
=¥
We have
$2 sit
÷ =
I txt t - r -
-
①
,
¥2
. : ACD .
BG) =
2
=
( ti tht - - -
) ( it sets 't . . .
)
n€o ( § a )
"
bn j x
= ; -
P
"
= E ( htt ) x
h IO
= I t 2 I
t 3×2 t . . .
This obtained ①
can also be
by differentiating .
Differentiate ① on B. S , we
get
¥32 = It 21+3×2 t . . .
Inverse
Let A = aotaictazc
'
target . . .
I
(ACH ) if
-
AG ) -
1343=1
Ex : AH ) = It x. txt -
r .
I
inverse CAG)
-
It's is = I -
X
Since
Ctx + $2 t . . .
) (i -
x ) = Itc + sit
$2
. . .
-
I -
- n . .
=/
So
, ( Its + sit - r .
) =
I
l -
X
Tim : Adc ) has an inverse ift ao -1-0 ,
where A- (d) =
dotage + azsit . . .
Pf :
Suppose that 1344=(1-44)-1 =
botbsctbzoiht . . -
AID 13*7=1.
§ and
"
.
Ibn $
"
= I
n=o n=o
É
n=o(j=o £
;)
"
ajbm X = I
or
Aobotfaobitaiboslt@obz-aibytazboScZt.r . = I
aobo -_ 1 ,
I ajbia
j - =o for 1<21
j=o
if ao -1-0
bo
atg
b
bz
=ai÷ aibia.az#
= =
, ,
-
. . .
,
,
1) "
(n ol
-
>
n
= $ .
k
1<=0
induction .
Combinatorial
pf .
( -1×2 + )n
⇐ yn = Itc . . .
=
Ctx + It . . .
) ( I tsetse 't . . .
) .
. .
( t tsetse 't . . .
)
-
n times
'd
I. oil II. een
'
.
= -
. . .
p
tdn
I gcditdzt
. - -
d , .dz
,
. . .dn=0
P
= I ar Ik
K=o
where ak is the no .
of ways to
present K as
d , tdztdzt . . -
tdn
( )
and it is ht ' '
and IC 90=2 .
= I aksck
K=o
Consider
9k =3 Ak KZI
-
I ,
ock
multiply B.s
by
akxk = 3 Ak -
idk ,
KZ 1
{ sanity
III.
A
,
I =3 do I " ""
:3 ? :L :c;
÷
+
P
p
Eakxk = 3 I am , ok
15=1 KII
§!o9k Ik -
do = 3
II. a ,exkt
'
is
= 3 X E akxk
K=o
GG ) -
ao = 3$ GG )
a (l -
3$ ) = do
(90--2)
G =
2-
+542
÷ =
I told
I -
3$
, , 1- . -
-
£
K "
= 2 E@ x ) = @x)
,
15=0
p
k k
= 2
I 3 I
15=0
But a =
I akek
KIO
Thus 9k =
2.3k K > 0
,
,
DHJCDH.ktn.tn/en=Ct#
2) I l t X + sit . . .
= I
I -
I
3) XK It xx + Xd 't - -
-
= I
1- ax
-133ft
4)
¥2
Ktl It 21 -
- -
=
5)
( HE ) '
(mo
'
=¥n
6) I
sets
"
it t t - - -
= e
K ! ,
KH
7) I
I Iz If + =
logfitx)
- . . .
-
-
Zane
"
= .
n=O
t
Given
" -
an =
8am , to NZ I
;
"
multiply B.s
by x .
"
8am , Sen Ion tch
-
t
An X =
£ ,
an och =
£ ,
8am , en t
€ ,
Ion
-
'
x
"
( Replace n
by htt) ( Replace n
by htt)
O O p
I an Seh E
'
E ion sent
htt
-
do =
g an * t
h=0
h=0
n=o
947
Ioan Iolo
" "
-
do = 8$ x t X In
( axr-E.am)
GG) -
I = 8$ a t x I
1- 10X
( €010
"
Sch = It 10$ -11025k . . .
=
Hose )
GG ) -
8$ hi ) = I t
I
I -
10$
a ( t -
six ) =
the
µfjg#,o
G this
g. f of
= is
,
, )
Seg .
tanh .
✓
⑦
I -91
¥ #
= +
LTE -
lose ) , ox
I -91 = A ( I -
lose ) + B ( I -81 )
-
-
G-wD 4-8x7(i-#
=) I -
93C = A -
lo Ase t B - 813$
Comparing co -
eff of od : -9 =
-
10A -813
Xo A -113
Comparing eff : I
co
of
- =
Solving ,
we
get A -_
Yz , 13=112
( Fox Fox )
I 91
I
'
+
-
. . =
Isi -
ios ,
Sub in E)
G =
E ( Fios ) Is ,
+
III. * Ioann ) +
ft @ )
"
ion en
=
I +
Zane
"
But
,
G =
n=o
)
Iz
"
an
'
.
.
= +10
principle of inclusion - occlusion
No .
of elements in AUB
,
i.e IAUBI is
q
2) Let A
,
B, c be finite sets
A B
IAUB.ve/=IAltlBltlc1-IAnBl-IAncl-lBncl-IAABscl .
. . . .
, ,
.
IA , UAZUAZU . - -
U An / = IA , Itt Az ) t . - .
HANI
-
E Air Ail
I
Eigen
+
E # AAJA AKI
IEILJLK En
IA
""
f- ) i
, A Azn Azn . . -
Attn )
Let VAN
Pf : X E A , VAZU . -
r
does
many times
How it in RHS ?
appear
Suppose I t A , A Az A Az A A and X F Apte Aptz An
. . .
Ap , ,
. .
.
involving m
of the sets Ai .
contributes
I to the RHS with
multiplicity
-
.
.
p
-
(E) t
(3) (g) - t . . .
t
A'
(Pp ) -
⑦
-2
xp 't
XP
() XP
(§)
P
(E)
-
'
⇐ g) + = t P
, y y t . . .
t
yp
put se = I
,
y
= - i
o = I -
fly ) t
(E ) -
(g) t -
- r t
C DP-
(pp )
(E) (3) §)
'
tf DP
-
i +
t
p
= -
i - -
-
-
-
-
= I -
( I -
p +
(E) § ) - t .
. .
+ f- DP 4,3 ) )
= I -
= 1
Sohn 4 of students
: Let
Let J
be set
is
studying Ctt
JAVA
.
Given 141=30 ,
151=25 and IC AJ 1=10
Total no .
of students I -01=50
C J
10 15
20
a) No .
of students not
studying Ctt is IE ) =/ u -
c )
150-301=20
b) No .
KUJI = 14+151 -
KATI
= 30 +25
-
to = 45
KAJI = 20 .
ISAF 1=103 ,
151121=23 ,
I FAR ) =
14
i. / SVFUR / =
151+1121+11=1
F
-
ISAF ) -
KARI -11=1121
+ ISAFAR )
2092=12321-1141-879 -
103-23-14-1 /SAFARI
/ SAFARI =
2092-1232-114 -8791-103+23+14
= 7
/ NAT / = 20
,
INAF 1=25 ,
11-11--1=15 , INATAF )=8
a) INUTUFI -_
IN / +11-1+11=1
120
N
/ NATI -1mF / ITAFIYNATAF / 28
If
-
18T
-
" 7
= 65-145+42 -20-25-15+8
10
100 F 20
=
b) No
.co/-peoplewhoueadeeacHyonemagajineis
28+181-10=56
. Let ICI be no .
of
applicants majored in CS
,
and 1131 be no .
of applicants
majored in Business
No .
ICUBI =
IV -
( CUB) ) c B
350
= 350 -
(220+147-51) 169 51 96
= 34