5 Assignment 5

5.1 Problem 1

claim

the number of surjective mappings from [n] to [k] is given by

i=0k(1)i(ki)(ki)n

Proof

denote

fx={f:f1[C] s.t [C][k],|C||kx|}

to be the set of all function from [n] to subset of [k] where at least x element of k is not in the image of fx. let look at f1, we can choose 1 from k element to not be part of the image, it is (k1). now we have k1 elements to choose from n items, i.e which item from nin will map to kjk. Hence we looking at total (k1)(k1) functions. and for general x it is |fx|=(kx)(kx)n. now lets f0=S to be the set of all function from [n] to [m], since fxfy for 0xyk then :

fontoi=1kfi|i=1kfi|=\footnoteDeMorgan|Si=1kfi|

using inclusion exclusion principle we get that.

(k0)kn(k1)(k1)n+(k2)(k2)n±(kk2)2n(kk1)1n±(kk)0n

that is

i=0k(1)i(ki)(ki)n

Proposition 5
i=0n(1)i(ni)(ni)n=n!

Proof

using the result above, for k=n its following that :

i=0n(1)i(ni)(ni)n=n!

the number of onto function from [n] to [n] is equivalence to to the number of ways to arrange n distinct elements in row , that is

n!=i=0n(1)i(ni)(ni)n

Proposition 6
i=0k(1)i(ki)(ki)n=0when k>n.

Proof

using the result above, for k>n its following that :

i=0k(1)i(ki)(ki)n=0

assume we have k pigeons, we need to find in how many ways we can place them all in n holes, when each one of them in different hole. after placing nk of them the all the holes are full and we left with kn>0 pigeons. following the Pigeonhole principle there are is-no option to do so, or equivalence to 0 ways.

Proposition 7
S(n,k)=1k!i=0k(1)i(ki)(ki)n

where S(n, k) are the Stirling numbers of the second kind

Proof

its immediate from the definition of S(n,k) :

S(n,k)=1k!i=0k(1)i(ki)(ki)n

we can consider the the set Sk:

Sk:={{f1(x)},xk}

we are looking at total of k non-empty sets. the amount of subjective function from [n] to [k] is number of ways to distribute the elements of n into these sets, let S(n,Sk) be the number of ways to partition a set of n objects into Sk=|k| non-empty subsets. now we can notice that any kik can be associated with any of these sets i.e total of k!. and in total we get:

S(n,Sk)k!=S(n,k)k!=k!1k!i=0k(1)i(ki)(ki)n=i=0k(1)i(ki)(ki)n

5.2 Problem 2

claim

the number of ways of coloring the integers {12n} using the colors red/blue in such a way that if i is colored red then so is i1, is:

k=0n(1)k(2nkk)22n2k=2n+1

Proof

I will use counting in two ways method to deduce the identity
we can consider the problem as placing 2n items in a row and choose spot to place separator s.t any item to its left are red and all the other are blue. we looking at total of 2n2 in between any two adjacent numbers from 1 to 2n. by including 2 more additional option that all of them red or blue, we get that the total of number of ways to place the separator is given by 2n+1 .
There are in total S=22n ways of coloring the integers. with same idea as above, we can consider the separator as choose pair of adjacent integers the first will be coloring with R and the second B and rest dont care, it is:

22n2(2n11)

now same idea for 2 paris

22n4(2n12)

and in general :

22n2i(2nii)

Using Inclusion exclusion principle we get that

22n22n2(2n11)+±(2nnn)22n2n

that is :

k=0n(1)k(2nkk)22n2k

5.3 Problem 3

Proposition 8

Let N be a set, then any kN have bijection such that k{0,1}|N|

let define the following mapping

f:{kxN{0, if xN1, if xNf1{{0,1}N{xN s.t. f(x)=1}

we can consider it as binary encode of the subset indicate \mathds1 if the given integer in the subset and 0 otherwise

claim

the number of subsets of size k of {1,n} which contain no pair of consecutive integers is given by (nk+1k)

Proof

using Proposition 8. subset k can represented as some binary string of length n, its yield that if in some string have two consecutive appearances \mathds1 then this subset contain pair of consecutive integers. moreover we can notice that if n<2k1 then its can not contain pair of consecutive integers.

For given k let f(k) define the bijection of subset k for some n2k1. if we assume its not have any consecutive numbers, then its have k \mathds1’s and nk 0’s. since we know k1 from the 0’s must be followed by the first k1 of \mathds1’s. hence the following problem becomes, how many ways could we distribute the remaining element i.e

n(kk×\mathds1s+(k1)(k1)×0s)=n2k+1

it is n2k+1 number of 0’s in the k+1 optinal positions and. that is "Stars and bars" 2 problem :

(n2k+11k+11)=(n2kk)

5.4 Problem 4

Lemma 5.1
1m(m2)m1,mN

Proof
1m(m2)1mm2m2m23m+20(m1)(m2)0

And the right hand size grater then zero for any m2

Lemma 5.2
1m(m2)+(m3)m1,mN

Proof
1m(m2)+(m3)1mm2m2+m32m22m60m36m2+11m60(m3)(m2)(m1)

The right hand size grater then zero for any m3, and equal 0 for m{1,2} since m is an integer.

Let A1,A2An be a family of n sets.

claim 5.3
|i=1nAi|1in|Ai|1ijn|AiAj|

Proof

to prove the following claim I will use "Donation to the Argument" 3 method. let assume that exists some aAi. this a adding at most 1 to the left hand side. now consider a is part of some other m1 sets, then at the right hand side its count (m1) times at the first argument, and (m2) in the second. Hence using Lemma 5.1 the inequality hold for any aA. and that lead to finish the proof

claim 5.4
|i=1nAi|1in|Ai|1ijn|AiAj|+1ijkn|AiAjAk|

Proof

using same idea described above, let aAi then a count once on the left hand-sid. At the right hand-side a count (m1) on the 1nd term. (m2) on the 2nd and (m3) at the 3nd term. Hence using Lemma 5.3 the inequality hold for any aA. and that lead to finish the proof.

  1. De Morgan
  2. Not sure if saw in class -"Stars and Bars from Wikipedia"
  3. To be honest I am not really sure what the name of this technique, Its kind of similar to "Counting derangements" I think