24
DISCRETE MATHEMATICS

DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

DISCRETE MATHEMATICS

Page 2: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

LECTURE 4-

Reference :Plan :

sections 8-5 and 8 - b of

- Principle of Inclusion - Exclusion book:

- Applications of this principle DISCRETE MATHEMATICS

AND ITS APPLICATIONS- No - of onto functions

( 7th edition)- derangement by Kenneth Rosen

Page 3: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

I Ai U Azl :n

t~"

*

'

,

-

IA , v Aal = IA , I + I Aal - I Ain Aal

↳ seen earlier as subtraction rule

Page 4: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

I Ai U Aau Azl :

1

A Az

*¥ ox

As1 .

I t.

= IA , It IAZI + last - I Ain Aal - 1172nA> I - lash Aili r

p la T t IA , naan Asl

Page 5: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

AE Ain Azn Ashby/ Ai U Az Vaz UA4 ) :

l l.

l l - 4

= 1 Ail t Hilt last tael

- b- IA , ? Az) - I Ain Az) - I Ain Aal

- - - - l Ash Aal

4. + I Ain Ash Azl + I Ain Asn Agl t 1 Azn Ash Ace )'

t 1 AT AznAal- IA, h Azn Az n Aa)

Page 6: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

IA , v Az u - - - VAN l

why is this correct?

= £, I Ail -

every element at Awaz"-- uan

[ =p -

is counted exactly once- § Lain Aj)

A.

E Ai n Azn - . . Aj( Eicjsn III.JEN it;

1- 2, I Ain Agnate)a ¢ other Aa's .

is isjensn"d ' " i-tj.ae - tail - tj times

"

!I Ain 't;) - (t )

2

+ (- l )""

IA , naan . . - n An l thinkin And + ( Ig )I

←DJ't '

Page 7: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Contd . from previous slide :- -

In all intersections of more than jti Seti ,'a'

-is not counted .

- Expression giving the count of'a'is :

( I) - (E) +4 ) ... . . + rising ;)

- What is the value of this expression ?

- I Cvilhy ? )

Page 8: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

( n +y )"= ¥; ( 7.) nnigi

N=l, y = - I

° = E:( 7) e. hi-- (on ) -(7) + ( z) - c ;) . . .

⇒ (7) - Indy ;) . ..

" Inn ) - I

Page 9: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

IAI U Az U . . . VAN ) :

Page 10: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Principle of Inclusion - Exclusion :-- -

Let Ai , Az , . . . , An be finite sets

n

IAIUAZU - -- van ) = I taili=i

- §;I Ain Ail

+ E, I Ain Ajnttkli.jik

-

-- - a

+ I - I )""IA , n Azn . . . n Anl

Page 11: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Examine I : How many bit strings of length 8- centringfs?

PAUSE

Page 12: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

-

Bit strings of lengths jbIHT:-/with 6 consecutive zeroes . x'T'

II

:-.

A , = { strings of length 8 that start with 6 consecutive zeroes }

Az = { strings - that have 6 consecutive zeroes

starting from position 23

As = {--

starting from position 33

Required answer = / A, U Aau As I = 4+4+4 - z- I -2+1In m - - -

IA , I = 4 LAI n Azl = 2 (Ain Azn Az) = 1

IAI = 4 I Ain As) it= 8

IA, I = 4 (Azn Az ) - 2

Page 13: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Number of onto functions :B-

1/1/1,set of all function

Yunnan.ms .

* in;;:÷.mg?mt9'' has

-

Page 14: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Ci = { functions where element i has no pre - image }

/ Ci Ucav - - - U Cn ) =Si Ici ) ( I ) In - 1)

m

- S. Icing. ) (nz ) Cn-2)m

+ E Icing- neap ( 3) In -37M'

.

M

i ( nm ,)(n- in - s))

:

+ C- l)"" I Goczn . - - n Cn ) O

Kil - in - in f- -

TajT

Icing ) = In -27M

(Cin cjnck) = ( n - 3)m

Page 15: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

i'

.No . of onto functions :'

h-

"

nm .- fan) In - in + ( 2) In - 2)m - . . .

t C-is"

(n!) In - en-mm-

Page 16: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Derangement:-A permutation of objects so that no object is in its original position .

Examples : I 2 3-

-

t,

① 3 2.

2 I 13J2.3€ - de

3€-

tanganents .

3 ② I

Page 17: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Question : What is the number of derangement of a set-

with n elements ?

Page 18: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

No . of derangement :#I 2 3 n - -

n

a::÷::.ftoriginal position derangement .

#

No - of permutations=n !

Ai = set of permutations where i is in its original position( ith )

IA , uh - -- u Ail = green part .

Page 19: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

I Ail = ( n - i ) !

I Ain Ail = (n - z) !

:

#

IA, u Az . . want = ( Y ) ( n- i) !

- (2) In-4 !

+ (3) In -37!-

:

+ c-IT"

t !

# derangement = n ! - larvae "- - van)

Page 20: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

No . of derangement of a set with n elements is :

Dna n ! - (7) Cn - D! + ( 2) In - z) ! - . . . + c- it (g) o!

Page 21: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

non -negative integralExample : find the no. of solutions to n, t Mz t nz = 15- n

s -t . n , E 4 and nz E 8 and as E F

Page 22: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

non -negative integralExample : find the no. of solutions to n, t Mz t as = 15- n

s -t . n , E 4 and nz E 8 and as E F-

" (l , 1,13 ) Solutions to Mit Nz -123=15- -

r

.

" " or:÷:

Nz E 8

Nz EF

Regd . answer = Total no. Of solutions

A , = set of solutions with Nc >4 - IA , uAzUA3 )

Az =- Nz > 8

Az = - n, > 7

Page 23: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

NI t Mzt Nz = 15

Total no . Of solutions: 2 bars And It stars

= 17 Cz

# solutions with RI 34 . IAI )

n, = 95 -1N,') 5th! + nun , = is = 12 Czun

U,'t net n , = 10

IANMi + ni en> = 6 = 802

# solutions with me 78

IAS )# solutions with My> 7 M t na ng

'= 7 = 9 Cz

IA , n Azl . . .. - - (continue the calculation?

Page 24: DISCRETE MATHEMATICSsri/Courses/DMATH/2020/DMATH2020...DISCRETE MATHEMATICS LECTURE 4-Reference: Plan: sections 8-5 and 8-b of-Principle of Inclusion-Exclusion book:-Applications of

Summary:-

- Principle of Inclusion- Exclusion

- # of onto functions

-

# of derangement .