代写代考 PINS 1000 –

Ñ%oanting / Combinatorics
8-8 88 8-8 86 ••
• • 6Do •-8 6%Ho
↳6 8-6 8-00 66 66 μ66 68 •8 86

Copyright By PowCoder代写 加微信 powcoder

•F i• • . •too
•• 68 6• 6-8 6•
t÷o ** 8•••••
Lecture Notes
Northeastern
University

Permutations
= n. (n- 1).(n-2). – – . 3. 2. I
A n ordered arrangement of n objects
Kc permutation = n . In – 1) . . . . ( n – k t i )
Pln,k) = Ccn,k). K! = (1)K!
to choose, then order K of? objects
combinations
a n ,k)=(1)=μn
of unordered subsets of size k
from n objects
choose ) objets m akes n o difference
order in which
(n ?, ) = (? )
18.1–171=1]
(G) = choose 1 locations (§) = choose ¢ locations

: 6 heavy , 4
to packages
Choose 3 packages
Choose and Deliver 🙁 😉 3 : =
2 Choose 3 heavy a n d 3 light
deliver : 6
A ” byte” has How many
bytes have 3
1-bits , e.g
0 110 10 0 0
= ;¥¥¥¥¥→ =
How many bytes have exactly s o n e s ?
(F) = §÷ = 5 6 [ we a r e just flipping the b. ,
5 If 1A/= 10, How
8 elements
subsets h a v e a t least
-11%1+1 : )
= 10¥+ I+ I

6 – to characters : uppercase , Lowercase Digits
the steps The decisions AND
defining the PW ?
a ) Length
? 6,7, 8,90or 10 ⇒sumRule ,=
# Length 6 + # Length7 + . . . + # Length 10
b) Once I pick length ,
# Legal = # Possible – # illegal
.⇒nμ÷.,⇒,μ;#)
0 letters 109
1 letter ⇒ Pick Letter Pos ✗ Pick letter✗ digits 9.52.108
6 dist choices
d.get ⇒ Pick digit Position ✗ Pick Digit ✗
-‘ 2 letter ⇒ (?) 52′
digit 529 .
2 digit⇒(1)10’
there is no overlap among categories of illegals
soit 52.10 ‘t
=[(Gzi( i. (1)”” )
” i.io -‘+(1) 52+ .

More passwords : ?
How many 3 digit PINS
one even digit μ, many y.gg p ,
a) FAIL Argument choose e v e n digit
= 875 “”””
# of even digits
Possibilities fo r
remaining digits
b) E, = even digit in 1st location
500 ,UE-UE,/=/E, +Ez+
/E.ME/ /EVE} ,
/E, n Ez ME,
– /E,nEz/-
# Legal PINS = =
# PINS 1000 –
= 1000- 5.55

pigcontldepr.in#
Imagine you had 101 pigeons and a
wall with 100 slots for each
M your pigeons to rest in .
what can we about the occupancy of saythe holes ?
slot’ ! At least o n e has tw o pigeons
I flip a coin 5 times get H or T :
}Now my coin flies are the
pigeons and I have two
The Pigeon Hole Principle I k n o w
that I get at least, 3-1 Heads
or 3-1 Tails

The population of Boston 600 Thousand . A human
has 90 -950,000 hairs
Even ignoring bald people and
allowing for u p to 500,000
hairs on a
around w ith exactlythe same # of hairs!
(600,00%00,000)
general , when we have n objects
to k “slots”
slots w ill
one the have
fn/KY objects .
← ” ceiling” round
next – highest integer
(Objects are discrete
No splitting the poor

many spins guaranteed
the sam e # 5 times ?

# appears 4 times .
I n only requires I
11%-7=14.027–1

O P T IO N A L
Theorem : n objects in K boxes .
Let X, , ✗z , . . . . XK be
integers . ( nonnegative) EX;=n
At least one X; must be atI least as large as
;?I ( Cant have all values < |Proetbycontradiction Assume That no X; zI Then all X; C X for all i ( contradiction Binomial Theorem :(✗ + y )" (✗+g)2 = (✗+g)(✗+g)= X'+ zxy+y choose choose FFirst✗ory XorJ→✗2 { ✗✗'" Outer ✗ →xy ⇒✗+zxyty Inner y ☒ →gx, Lasty y→y it: Each Term s c a n involve 0 , I , o r 2 think about choice is How many ys we want Another way to : do expand by ? )'(✗✗ City = +g)(✗+g)(+g) For each term I choose ✗ or The resultant terms 111 have expansion . ✗3 ✗'y✗y'y3 Q : How many y's do I choose ? (Dictates term) How many ways can you do that ( Dictates coefficient) Ogs " s 🙂 3 (?) ✗' y }✗' +3×23+3×5.ly' ( ✗ + g) = ( ✗ + g) ( ✗ + g) City ) ( ✗ 1-g) City) t-t-E-way-ei.no (8) =L ✗ s I (F) = s ✗ " y 2 (E)=co ✗3yz ✗5+5×4] -110×3,2 + ioxzjstsxjltys c×+yY=*§f?)×" 8Application from algebra (✗ +2g- 2) Q: term includes g-8 ? - 2) (xtzy-2) 2g -12g - . - . = (✗+ - 2)(x Twant to this term we expand by ✗2(-2)" 2" 2g = is✗ 2 (✗+y)= (✗1- (✗+ = + " g) g)' (✗ 1-g)1×3+3×23 ✗4 -13×39-13×2y? + ✗y} txsytsxhg2-3xyty.tl/4+4x3y+6x2y't4xy3tyY Coefficients I need two gs , so expand by ✗ and choose zys or expand by y = (2)+(?) : a n d choose with the binomial theorem coefficients ! = 121 113 = I 3 3 11" = 1 4641 11= I+to= 1 lo " ( )" §(F)""" (1) 10^+12,110 a= = 10+10+ + ' (1+10) > (3) > (E) ‘ (g) n’ (1) 10°
1 . 1000 1- 3-100 + 3.10 1- 1 . I
breaks down for nzs . Why?

Suppose I n e e d t o choose 3 o f 8 people
we line up the
8 people .
(3)=/3)+ (Z)
1st person
b) # of lengths bit strings with exactly 3
00—01—

total paths
= = # paths through A -1 # Paths throughB
=/E) +1¥:)
This recursive formula leads to

O P T IO N A L
( Xty) 2 2
5 I 5 10 10 5 I
1:14:/ + – – – +1%1+11)=Éti
” É (1) ” ” ” (✗+g)= ✗y
Let ✗ = ‘ (1+1)” = .EE
y=/” (7) i
I “=É(1) 4=0

4 bins &s balls.
The balls a re
indistinguishable .
! I :|1 :& L I
00|1|1/0⇒00101010
← # balls -1 # dividers
# dividers
(#balls -1# bins

8 balls At least one in each bin
0 I 00 I 1 0 (4 balls
” consumed )
(4-1,3)=1:/

arrangements of
balls into
-=(- -i =(n+K 1)ntkl =/ntk)
K- l ^-1k-i-G.,g)n
choosing choosing bin divider ball
5 brands of soda , buy 1I5 cans
bins balls
+s-t)=)= S-I

How many ways to distribute 13 cookies to s kids
bins = kids
(¥) /000 /00000 / I 00000
a) what if every kid gets 1 cookie ? Imagine w e
e.SI/oooot1oooo—
distribute the cookies , leaving 8 left
2 o r m ore cookies each ? Pre – distribute the to
just 3 to distribute to s
solutions t o the
equation :
This is the same
✗z + ✗s + ✗y t ✗s = 13
the cookies & kids
balls= units ofone 13 total

Arrangements :
Roses Daisies
Carnation Irises
– 12 flow e s
Anycombination-5.gl
‘ 23+3 ) =/ %) =
Atleas-onecfe.ae#flower-
Distribute
(9+3)=1 ; )
11%4%0-1=165

3 . At least Yz the flowers
areroses-D-is-r.be/-e
Now choose 6 m ore flowers
)=É;É=8″
(• I2)=/E)=8÷=

with 0,1 , 2 o r 3 Roses
66 + 55 = 290

Bouquet saw – Bouquet? ,3,y
(1+3)-(8-1,3)

Roses a n d
Carnations
Max 8 Roses
8 Carnations c-
set aside 4R, 4C
D i s t r i b u t e Remaining 4 i n (41+1)=1,5)=s
18 flowers has 3 R I
1tyre 4 cCR
I tyre has
ltyrehas5 DD
ltypehas6 ¥IR Tg
4 ! possibilities = 4

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com