Discrete-math 11

Discrete-math 11

Pigeonhole principle

|A|>|B|f:ABa1a2A:f(a1)=f(a2)

Exercise

AZ,|A|=6Prove: a1,a2A:5(a1a2)Solution:Let B={Remainders of division by 5}={0,1,2,3,4}|A|>|B|f:ABf(a)=amod5a1,a2A:f(a1)=f(a2)=x{a1=5n+xa2=5m+xa1a2=5(nm)f(a1a2)=05(a1a2)

Exercise

n2 women shake handsProve: there are at least two women who shook the same number of handsProof:Let A={women},|A|=nLet B={possible numbers of handshakes}Case 1. One woman shook everybody’s handNo woman shook 0 handsPossible numbers of handshakes is from 1 to n1|A|>|B|=n1Case 2. No woman shook everybody’s handPossible numbers of handshakes is from 0 to n2|A|>|B|=n1Both cases lead to pigeonhole principle

Exercise

A=⊆{1,,100},|A|=51Prove: a,bA:abProof:xA:x=a2k,2aLet B={1,3,5,,99}f:AB,f(x)=f(a2k)=a|A|>|B|x1,x2A:f(x1)=f(x2)=a{x1=a2ix2=a2jx1x2=2ij,x2x1=2ji{ijx1x2j<ix2x1

Inclusion-Exclusion principle

|i=1nAi|=k=1n(1)k11k1<k2<<kkn|i{k1,k2,,kk}Ai|i=1nAic=(i=1nAi)c=Ui=1nAi

Exercise

80 balls5 boxesEach box has at most 24 ballsSolution:Total number of ways to divide balls into boxes:(80+5180)Let A={At least one box has 25 balls}Let Ai={Box i has at least 25 balls}|Ai|=(55+5155)|AiAj|=(30+5130)|Ai1Aik|=(8025k+518025k)=αk|i=15Ai|=k=15(1)k1(5k)αk=k=13(1)k1(5k)αkThe final answer is: (80+5180)k=13(1)k1(5k)(8025k+518025k)

Exercise

A={1,2,,n}f:AAxA is a called a fixed point of f if f(x)=xHow many invertible functions with no fixed points there are?Solution:Number of invertible functions on A is n!Let Ai={fAA|i is a fixed point of f}|Ai|=(n1)!|AiAj|=(n2)!αk=(nk)!|i=1nAi|=k=1n(1)k1(nk)(nk)!The final answer is: n!k=1n(1)k1(nk)(nk)!