Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

Unit-3

Combinatorics
Basic Counting principles

The product rule

Suppose that a procedure can be broken down into a sequence of two


tasks. If there are N ways to do the first task and for each of these ways of
doing the task, there are M ways to do the second task, then there are MN
ways to do the procedure.

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 }

The sum rule:

If a task can be done either in one of M ways or in one of N ways, where


none of the set of M ways is the same as any of the set of N ways, then
there are M+N ways to do the task.

Ex 2 : Suppose that either a member of the mathematics faculty or a


student who is mathematics major is chosen as a representative to a
university committee. How many different choices are there for this
representative if there are 37 members of the mathematics faculty and
83 mathematics majors and no one is both a faculty member and a
student?
Soln : There are 37 to choose a member
of the maths
ways
faculty .

83 to choose student who is maths


ways
a a
major
since one cannot be both a student and a
faculty
member rule
.

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 ,

and sandwiches and


a a cold
beverages in 8×3
ways
Thus total lunch
,
no .

of ways she can


get her is

6×2+8+3 36
ways
= .

Definition [words]: Let A be a finite set (alphabet). A word is a finite


sequence of elements of A.
Ex : A =
f 112,3 ,
4 }

words
of length 3 : 112
,
333
,
432 ,
134, - - -

Theorem: The no. of words of length K in an alphabet consisting of NN

letters equals mi.

Pf : For the 1st letters there are n


possibilities
same for all other letters .

The total no . : n .
n n - .

. . .
.
n = Nk
-

K times

In other words, the number of linear ordering (ordered arrangement) of


k - element subset of n distinct objects with repetitions is NNK .

It is also called k - permutations with repetition.


Another interpretation
het X -
-

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 )

of length K in n letters where n is ill .


Proof follows

from above defn .

Ex 4: how many different bit strings of length seven are there?

Sdn Here A- fo } woods of length 27


: ,
i .
The number
of 7 is .

Or

consider t
ooo

✓ • o o o o 0

There possibilities for 1st and


are 2
position
2
possibilities for all other
positions .
Thus , total

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

we fix 1st position by 1


,
all other
positions can be filled
in 27
ways .

Case ii : O 0

Fix last 2 positions by 00 other can be filled in 26


, ways
Case iii : I 0 0

and others
Fix last 2
positions by o o 1st position by 1
,

can be filled in 25
ways
.

But case iii is in both case i and case ii.

bit 27+26-25
Total
stings
'

. .
is = 160

Note :
Principle used in the last Eris called inclusion - occlusion
this will be introduced later
principle ,
.

Ex 6: Each user on a computer system has a password, which is 6 to 8


characters long, where each character is an uppercase letter or a digit.
Each password must contain at least one digit. How many possible
passwords are there?

Sdn : we first find possible passwords of length six .

There are 26
uppercase letters
and to
digits .

No .

of passwords of length six that can


formed using 26+10=36
characters are 366 .

No .

of passwords formed using 26 letters are 266 .

possible passwords of length with atleast digit


'

one
.
. six are

366 -
266 .

1114 possible passwords of length 7 and 8 with at least one

digit 367 267 and 368 are - -


268
respectively .

36T 266 -1367-267+368-268


Total possible passwords
'

.
.
are -
.
Permutations

A permutation is a bijection from { 112 , 3,4 , - - .

,
n
} (n distinct objects)
to itself.

Equivalently, permutation is a linear ordering (ordered arrangement) of


n distinct objects.
f
For
example :

>
l
I
y
> 2
Z

3 > 3

Above
permutation is 213 .
MY other
permutations are

123 ,
132 231 312 321
, , , .

Total there are 6


permutations of fi , 2,3

Thm : The number of permutations of { 112,3 .


,
4, . . .

,
h } is n ! .

Pf : For the 1st element we have n choices ,

nd has
2. element ( n -

1) choices ,

K
? element has (n -
CK D) -
choices
:

nth element has 1 Choice .

-
: 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 -

possibilities for the 1st entry


(n 2nd
.
-

D -

possibilities for the


entry
:

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,

Ex 7 :How many ways are there to select a first-prize winner, a second-


prize winner, and a third-prize winner from 100 different people who
have entered a contest?
Sdn number the
: the
of ways to pick three
prize winners
is
the number 3 elements
of ordered selection of from a set
100 elements
of .

The answer is
100103 = 100×99×98 .

Ex 8: How many permutations of the letters ABCDEFGH contain the


string ABC?
Sdn :
Let ABC be one character .
Then characters used in
the permutations are ABC ,
D
,
E, F, Er ,
H .

There are 6 characters .

Total permutations of these characters are 6 ! .

Foo instance DE ABC AHF


,
ABC Hor EFD are two Such
,

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 .

of ways three cards are chosen is 52×52×52=523 .

b) without replacement

This be done in 52×51×50 52


can =

pg ways .

Permutations with indistinguishable objects

The number of different permutations of n objects, where there are


hi indistinguishable objects of type 1

Nz indistinguishable objects of type 2,


:

and MK indistinguishable objects of type k,


where n n that th
ki is
= - r -

!
,
n

l l
hi ! nzl . B .
- r -

Ma .

Ex 10 : Find the number of possible arragements of the word


MASSASAUGA. In how many of these arragements A’s are together?
Sdn : In the word MASSASAUGA there are
,

l M The no of possible arrangements of these letters


-

4 -

A are
3 -

S lo ! '

I V 4! 3 !
-

l -

be
The no .

of possible arrangements in which A 's are


together
are
!
7
= 840 . ( because we consider AAAA as one

3 !
Single character in
arrangements)

Ex 11 : How many arrangements are there of the letters in


SOCIOLOGICAL?
(a) In how many of these arrangements A and G are adjacent?
(b) In how many of these arrangements all vowels are adjacent?
501h : the wood SOCIOLOGICAL as

I S No
of arrangements of these letters are 12 !
-

"

3- 0 3 ! 21.21.2 !
2 -

C
2- I a) No .

of arrangements in which A and G are


2- L

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

b) vowels in the wood are A ,


I
,
0 .

No .

of arrangements in which vowels are


together are

! 6 !
( because vowels
kept together in
)
7 ✗
are

2 ! 2 ! z , , ! and these vowels can be arranged


2¥ ,
ways .

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?

So/ n : Vowels in the wood LEADING are A. E. I .

-
: the no .

of required arrangements are 5! ✗ 3 ! .


Circular permutations
Ex 13: If six people, designated as A, B, C, D, E, F, are seated about a
around table, how many different circular arrangements are possible, if
arrangements are considered the same when one can be obtained from
the other by rotation?
ca ) and (b) are considered identical
The
following arrangements three ,

whereas (b) , (c) and (d) are distinct arrangements .

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 )

Sdn : It is clear that

Each circular arrangement corresponds to 6 linear


arrangements
Foo Gc : The
following six linear arrangements -

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 .

Foo instance , following arrangements of 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 .

Circular beads done ! ways


arrangements of can be in (7-1) ! =6

Two
the other
circular
arrangements are same
,
if one is obtained from
by flip .

Total of necklaces formed


÷
'

.
. 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

The of combinations with elements denoted


no .
K -

of a set h is

by hck or Ccn ,
K ) of
(7) ,
dead as n choose k .

( Ya ) is also called binomial co -

efficient .

Theorem: The number of k-combinations of a set with n elements, where


n is a nonnegative integer and k is an integer with OE KEN equals

( (n K) =
n !
,

K! (n -
K) !

Pt Pcn ordered elements from


k) is
arrangement of the
: K -

set elements
of n -
.

Ccn ,
K ) is unordered Selection
of K -
elements from the

set of n -
elements .

P Chik ) Chik) K! ( because ordering of 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?

Sohn : five cards from a Std deck


of 52 coeds can be selected

in
Cf) ways .

47 cards can be selected in


(542 ) ,
ways .

selected from the deck


Note : Once 5 cards
of cards, 47
are 52

selected on the other side


cards will be
automatically .

Therefore , (1) =

Inn .
.
) .

Ex 16: How many bit strings of length n contain exactly r 1s?

So In : For instance let n


-

- 8 8=4 .

, ,

Yo
.

of bit string of length 8


Containing exactly 4 l 's

possible selection of positions from


-

No .

of 4 8
positions
= = 8 .

4! 4 !

This can also be analysed


where
as no .

of possible arrangements
8
object there
of are

4 indistinguishable objects of type 1


(4 I 's
)
4 ' ' m
type 2
( 40 's)

= 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

a) Total possible outcomes = Total no of ways .


we can

fill this 10 positions Head CH)


or tail ( T) .
by
do
Coney;d*fft¥F* )
=
.

b) Total possible outcomes =


No .

of ways of selecting
two heads
containing exactly 2
positions of lo position .

( 9) L÷,
'
= =
= 45 .

c) Total possible outcomes = possible outcomes


containing
3-tails
containing at most tails 3

+
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 ) -

Ex 18: In how many of the possible arrangements of the word


TALLAHASSEE have no adjacent A’s?

Sdn : The word t ALL A HA S S E E

fnE÷ei÷÷
'

¥ :p.mn?knuh;ni:onn:sissia:ted
.
in
(g) ways .

And other letters T L L H S S E E can


be in
arrangement 81 . .

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 .

possible ways of selecting 5 cards from 52 Cards with


no clubs
is same as

no .

of ways of selecting 5 cards foom (52-13)=39


cards which is
,

⇐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 )

a) Three books can be


given
to c
,
in
( 23) ways .

books
After this event,
only 9 remain .
Then 3 books

can be
given to Cz in
§) ways .

Later books to and Cy in


,
3 can be
given Cz

(g) and
(3) ways respectively .

total books distributed among


Thus
,
no .

of ways 12 can be

that each
4 children such
get 3 books are

④ x x
x⑦ .

b) Let C, and Cz be two oldest, and ↳ and Cy be two


youngest .

x x
④ x
(z ) ways
we can

distribute books such that C , and Cz 4 books


get
each and Cz and Cc, get 2 books each .

,
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

element subsets contain


K -

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 .

of ways this can be done is

4,7 ) ways .

thus ⑦ =
Hi:) this ) .
The Pascal 's
triangle
1 I

z (b) l l l!)
3 (3) i (7) 2
(3) i

4 (3) I (7) s (3) 3 (3) I

5 Coli (4) 4 (4) 6 (4) 4


'
(E)
'
• Coli 475 co Ello 475 tell
From Pascal triangle and induction itis to see that
easy

=⇐'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 .

of all subsets of 442,3 ,


. . .

,
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

Compute the fo out of an kbk


-

co -
eff in

It is equal to the no .

of K -

element subsets of 412,3 ,


- - -
in }

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

¥ path made individual



v is

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

binomial weft . with Same IC 's

put n mtn Ken


-

.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 .

For instance RURUURRUURR .

#mtn
Select n letters .

08
No .

of ways of doing this is


fmtnh) .

No .

of ways this mtn letters can be


arranged is

( mtn ) !
( )
mtn
= .

n
n ! m !
combination
k -

with ne
petition
consider k balls ( identical ) and n boxes ( distinct) .

K balls . . .

h boxes .
. .

In how can put k balls in n boxes ?


many ways we

)
i
If maximum capacity of each box is 1
,
the answer

is

{ (4) ' if Ken

o ,
otherwise .

ii ) what if there are no restrictions on the capacity of


the boxes ?

If this the case , then no .

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 .

For instance , let us consider k= 5 balls and n


-

-
4 boxes

5 balls

4 boxes
I 2 3 4
Let us
represent as follows :

↳and separator between 2 boxes

configuration of balls in boxes


corresponds to the configuration
of bars and balls .

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
-

Thm : K identical balls can be put into n distinct boxes in

THE )
'
ways .

Equivalently ,
the number of K - combinations from a

set with n elements when uepetition of elements


is allowed is
(
ht

,
}
-
l
) .

Ex 23 : Suppose that a cookie shop has four different kinds of cookies.


How many different ways can six cookies be chosen?
Sdn : There are 4 different kinds of cookies .
Let n = 4 .

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 .

Sdn One Sohn of this is 04=2 I 2=4 13=0


eqn
:
,
, ,

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 .

of integer so 1ns of the


eqn
I t
, Xzt . . -
t In = K
,
Xi 70 ,
I si En

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 ,

Solis : Note that there is a


correspondence between the
Solus
nonnegative integer of
34 tcztcztcc test If
,
< to ①
and the solar of
integer
X
, tdztcgt 14 tds 1- If + 34=10 ,
X
; 30 ,
l E i Eb
,

3470 . ②
The no .

of solutions of ② is same as 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 .

We the notation an to denote the the


use
image of
integer n .

call nth term the


We an of sequence Can ) .

Ex :
Consider the sequence fan )
,
where an =
In -

The list of the terms of the sequence ,

Al , Az , 93 in -

are
,

\
, I '
¥ 14 ,
,
¥ ,
- - -

Linear recurrence deletion


Liber Abair
about rabbits ( Leonardo from
Fibonacci 's
problem 1202
Pisa known ,
as
Fibonacci )
Notation : ¥81 -

baby rabbits

- adult rabbits

Assume that after month


onebaby rabbits will be fully grown
and month adult rabbits
up every
other
give birth to
baby 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

Let Fn be the of pairs of nth month


no . rabbits
during .

Then Fn = Fn i
t Fn z
F =L
, Fz = I
, ,
- -

- -
Recurrence relation Initial conditions
for Fn

List of terms of the sequence Fn is

1 ,
I ,
2
,
3
,
5, 8 13
,
21 34 55
89,1424=52 - - .

,
, , , ,

This called Fibonacci


sequence is
sequence .

Fibonacci numbers and Pascal


triangle
Pascal
triangle consider swallow diagonals .

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 -

( (1) (E) Hi:))


'

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

So In Let an denote the number


strings
:

do not have consecutive 0 's


of
.
bit of length n that

No .

of bit
string of length n with no consecutive 0 's .

such bit with


No
of string ending 0
.
.

+
with
such
string ending
bit 1
No .
of .

the bit strings do not have


consecutive 01s
of length ending with
n 1 that

the bit strings of length In -


1) with no consecutive 0 's .

the bit strings do not have


consecutive 01s
of length n
ending with 0 that

the bit strings of length In 2) - with no consecutive 0 'S .

( because In Dst- bit must be


1) .

.
! An = An -1 + an -2

For instance , when n=4 the bits with no .


consecutive 01s are
,

⑤ 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

Linear Recurrence relation

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

Items and to the 1st


power .

Homogenous because no terms occur that are not


multiple
the
of aj 's .

degree terms the precious


K because an is
expressed in of
-

K terms of the sequence


-
Coefficients c,
,
Cz ,
. - .

,
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

is called recursive definition of the


sequence an .

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

satisfy the uelatn ¥1 , then

aotao ,
a
, tai ,
aztaz ,
.
. .
also satisfies ⑦ .

And so does Cao ,


Cai , Caz , in .

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

then 8 us a root of the characteristic soon


't ' Z
tk Cz Ak
-

= 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 #-)

e) Suppose that ✗ and u are tools of #-) ( ✗ =/ M )

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

Thm : Let an = 4am 1- Gan , -


z
t . . .
+ Gaan -
k
be an recurrence 1dam
of degree K .

Suppose the characteristic equation


ok = Cik
-1
+ czik
-2
+ . . .
1- Ck

has t distinct roots ×,


, 42,43 , . . .

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 .

the form of general Solh

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

Eel : Find the solution of the recurrence relation


An =
an it -
2 an -
z
with 90=2 and a ,=7 .

Sdn : characteristic eqn .


If asihtbxtc = o
,

t2 = t + 2 then I = -
b ITH
2 a
'
t -
t -

2=0

1- = I
-
± Ft
Z

= I I 3
-

t
'

.
.
=
2 -1
, .

Sequence hanh is the Sdn ift


"
an = A , 2h + AID A, and Az are some
;
constant .

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 .

IC 's are Fo=o , F, =/ we have


,

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
-

tr ( II) hrs ( II)


" "
Fn -

-
' -
'

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 -

Ic 's are 90=1 91=6


,

Sub in ①, do = I = A ,

a
,
= 6 = A, 3 + Az 3

Az = I

the Sdn to the relation with Ic 's is


'

- .
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 .

Use Ic 's to find constants Ai ,


Az and Az .

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 .

Sdn to the recurrence adam with Ic 's is


given
an = I t C- D 2h t 23h

Linear relations with constant


non
homogenous recurrence

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 .

Thm : General solar of linear non


homogenous relation ④
the froom
is of
an = ante ' tanh ' ,

where anlh) is a Sdn of the associated homogenous neuroma


relation, and

and
"
is a
particular Sdn of the
nonhomogeneous recurrence
relation ⑧ .

Pf : Because fan his a


particular solar of ④ ,
we know
that

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 )

subtracting 1st Sqn from the 2nd


,

bn and" -
= c
, ( bn -
i
-

anni ) ) + Cz (bn -
z
-
anti ) t . .
.

+
Ck ( bn -
K
-

antis )
It follows that
{ bn -

and" } satisfies (F) ,


associated
homo . hearten Ce ne lath .

If bn -
and" = and)
bn = and" tanh) for all n .
Thm :
Suppose
an = C
, an -
i t Cz an -
z t - - -

tckannk + Fln ) is

lineal relation and


non
homogenous recurrence
,

Fn =
( bo t b, n + bzn2 t - r .

tbpnt ) s
"

where bo ,
bi ,
. . .

, bt and S are real hors .

i ) when s is not a foot of the characteristic Eqn of the


associated linear homo recurrence telok then particular .

solar is of the form

( 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

(Pot Pin + Pan ) 2h

iii ) when Fln ) =


( Mtl ) 3h
particular solar is
of the
,

form
NZ ( Potp, ntpzn ) 3h
Ex : solve
an =3 An -
, + 2h
,
IC is do =3 .

Sdn : General Sdn of the recurrence eelam

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

Ex : Find all Solus of the neuroma relation


"
an = 5am -
i
-
ban -
z +7

Sdn : Let an be all Solus of the


given recurrence uelam .

Then
an = denn tan ' .

To find alnh) .

Consider associated homo . leeuwen a uelath


,

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
'

. . All one of the

"

¥g 7h
"
C 2 TD 3 t
an =

Esc : i ) Find all Solus of the decurrent elation

an = 4 an -
I
-

4 an -
z t ( htt ) 2h .

ii ) Find the son of the recurrence uelah in Ci ) with


IC 90=0 and a , =L .

Sdn : i) Let an be all Solus


of the decuooence team ,

an = and't and?
find and
)
To

consider associated Homo .


uecuorena relation ,
An =
4am , -

4 an -2 .

Chae EUN .

t2 = 4T -4

or t2 -
4T -14=0

boots are t = 2,2 .

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

2410 , t 4=0 -8 Po +2410 , +4=0


,

( 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
"

we use IC 's to find C and D ,

Given Ic 's 90=0 and 91=1

put n =D in his
c
o =

put net in G 's


, = c. z + D. 2 -1
( Hlf ) 2

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 .

Sometimes we can treat ace ) as a fn .


of some values of x

and
study convergence .

For instance 4 = its + It . . .

Converges when $161 .

In "
"
Ex :
an =nn
g. f
a = X does not converges
,
h=o

for Ito but it is still a formal power series .

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 .

Ed : Arf for the .

Seq i ,
I
, ! l, I ut

Sdn : G =
It x -1×2-1×3 -1×4 txt

=
It -
I

Addition and multiplication


O
of formal power series .

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
= ; -

Elio ) ' "

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
-

Defn BG ) is the inverse AG ) ,


: =
of

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#
= =
, ,
-

. . .
,
,

we can find all bi 's and


they are
uniquely determined .

Binomial theorem for negative integer exponents


§ (
+ K

1) "
(n ol
-

>
n
= $ .

k
1<=0

Thm can be proved by differentiating ① and mathematical


using
.

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 ' '

¥n= II. ft : Jock


thus -
'
,

Using g. f to solve recurrence relation

Ex : Solve the recurrence relation Ak =3 ah , ,


K 31

and IC 90=2 .

Soh : Let a be the


gf for the
sequence fan }
G = aota , * +
asset . . .

= 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
,
,

Useful generating functions


A kG #

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
'

) -14 )xt( ht 't,


' 't . -

=¥n

6) I
sets
"
it t t - - -
= e
K ! ,

KH
7) I
I Iz If + =
logfitx)
- . . .
-
-

Ex : Solve the clearance relation


""
an =
8am ,
t 10 ; 90=1

Solin Let h be the


g f of the
far }
sequence
: -
.

Then G④= aota.sc + asset . . -

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 .


Using partial fraction we see that

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

1) Let A- and B be two finite sets .

No .

of elements in AUB
,
i.e IAUBI is

B IAUBI = IAI TIBI -


IAAB )
A

q
2) Let A
,
B, c be finite sets

A B

IAUB.ve/=IAltlBltlc1-IAnBl-IAncl-lBncl-IAABscl .

Mm Let Ai , Az An be finite subsets of V Then


.

. . . .

, ,
.

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 , ,
. .
.

This element is counted


(? ) l times by E) Ail
It is counted
(E) times by Effi AA; I
In
general ,
cities counted
( Pm ) times by the summation

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

This the thin


proves .
Ex : In a class of 50 college freshmen, 30 are studying C++, 25 are
studying Java, and 10 are studying both languages. How many
freshmen are (a) not studying C++ (b) studying either computer
language? (c) studing C++ but not Java

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 .

of students studying either language is

KUJI = 14+151 -

KATI
= 30 +25
-

to = 45

c) Studying Ctt but not JAVA is 14 -

KAJI = 20 .

Ex : A total of 1232 students have taken a course in Spanish, 879 have


taken a course in French, and 114 have taken a course in Russian.
Further, 103 have taken courses in both Spanish and French, 23 have
taken courses in both Spanish and Russian, and 14 have taken courses
in both French and Russian. If 2092 students have taken at least one of
Spanish, French, and Russian, how many students have taken a course
in all three languages?
Sdn : 1st = 1232
, 1121=114 IFI = 879
,

ISAF 1=103 ,
151121=23 ,
I FAR ) =
14

ISU FUR 1=2092 ,


I SAFARI =
?
We have
S R

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

Ex : In a survey of 120 people, it was found that: 65 read Newsweek


magazine, 45 read Time, 42 read Fortune, 20 read both Newsweek
and Time, 25 read both Newsweek and Fortune, 15 read both Time
and Fortune, 8 read all three magazines. (a) Find the number of
people who read at least one of the three magazines. (b) Find the
number of people who read exactly one magazine.
Soln : 1-01=120 ,
IN / = 65
,
11-1=45 , 11=1--42

/ 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

Ex : A computer company receives 350 applications from computer


graduates for a job planning a line of new Web servers. Suppose that
220 of these applicants majored in computer science, 147 majored in
business, and 51 majored both in computer science and in business.
How many of these applicants majored neither in computer science nor
in business?.
Sdn : of applications deceived 101=350
No .

. Let ICI be no .

of
applicants majored in CS
,
and 1131 be no .

of applicants
majored in Business

No .

of applicants majored neither in CS nor in business is

ICUBI =
IV -

( CUB) ) c B
350

= 350 -

(220+147-51) 169 51 96

= 34

You might also like