58
Choose Multichoose Garth Isaak Lehigh University 47th SEICCGTC at FAU, March 2016 Acknowledgements to: Math 90 Class, Daniel Conus

# Choose Multichoose - Lehigh Universitygi02/Boca16b.pdf · Choose Triangle Recall ‘Pascal’s Triangle’ 1650 Kayyam’s Triangle 1000; Yang Hui’s Triangle 1350, ..... Display:

others

• View
14

0

Embed Size (px)

Citation preview

Choose Multichoose

Garth Isaak

Lehigh University

47th SEICCGTC at FAU, March 2016

Acknowledgements to: Math 90 Class, Daniel Conus

Notation(nk

)= number of k element sets from [n](

[n]k

)= collection of k element sets from [n]

((nk

))= number of k element multisets from [n]((

[n]k

))= collection of k element sets from [n]

Will avoid using(nk

)= n!

k!(n−k)!((nk

))=(n+k−1

k

)(later)

Choose TriangleRecall ‘Pascal’s Triangle’ 1650

Kayyam’s Triangle 1000; Yang Hui’s Triangle 1350, .....

Display: left justified (left) rather than the typical way (right)

11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 1

11 1

1 2 11 3 3 1

1 4 6 4 11 5 10 10 5 1

1 6 15 20 15 6 11 7 21 35 35 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 1 11 2 31 3 6 11 4 10 4 11 5 15 10 5 11 6 21 20 15 6 11 7 35 35 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 1 1 11 2 3 41 3 6 101 4 10 20 11 5 15 35 5 11 6 21 15 6 11 7 35 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 1 1 1 11 2 3 4 51 3 6 10 151 4 10 20 351 5 15 35 11 6 21 6 11 7 21 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 1 1 1 1 11 2 3 4 5 61 3 6 10 15 211 4 10 20 351 5 15 351 6 21 11 7 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 0 01 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 211 4 10 20 351 5 15 351 6 211 7 1

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

1 0 0 0 0 0 0 01 1 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 211 4 10 20 351 5 15 351 6 211 7

Mulitchoose Array

Shift columns of Choose Triangle up or use multichoose recursion

k 0 1 2 3 4 5 6n0 1 0 0 0 0 0 01 1 1 1 1 1 1 12 1 2 3 4 5 6 73 1 3 6 10 15 21 284 1 4 10 20 35 56 845 1 5 15 35 70 126 2106 1 6 21 56 126 252 462

Choose Triangle

Hockey Stick Formula

11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 1

11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 1

[Left](n0

)+(n+1

1

)+(n+2

2

)+ · · ·+

(n+rr

)=(n+r+1

r

)[Right]

(nn

)+(n+1

n

)+(n+2

n

)+ · · ·+

(n+rn

)=(n+r+1

n+1

)

Mulitchoose ArrayHockey Stick Formula

1 0 0 0 0 0 01 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 21 281 4 10 20 35 56 841 5 15 35 70 126 2101 6 21 56 126 252 462

1 0 0 0 0 0 01 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 21 281 4 10 20 35 56 841 5 15 35 70 126 2101 6 21 56 126 252 462

[Left]∑ki=0

((mi

))=((m

0

))+((m

1

))+((m

2

))+ · · ·+

((mk

))=((

m+1k

))Condition on number of (m + 1)’s

[ Right]∑mj=1

((jk

))=((

1k

))+((

2k

))+((

3k

))+ · · ·+

((mk

))=((

mk+1

))Condition on largest element

Choose Triangle

Anti-diagonal sums are Fibonacci numbers

1 = 11 = 1 12 = 1 2 13 = 1 3 3 15 = 1 4 6 4 18 = 1 5 10 10 5 1

13 = 1 6 15 20 15 6 121 = 1 7 21 35 35 21 7 134 = 1 8 28 56 70 56 28 8 1

Fn =(n−1

0

)+(n−2

1

)+(n−3

2

)+ · · ·+

(n−kk−1)

+ · · ·

Fn = number of 1,2 strings with sum n − 1

Condition on # 2’s

Choose Triangle

Shallow diagonal sums are Fibonacci numbers

1 = 11 1 = 11 2 1 = 21 3 3 1 = 31 4 6 4 1 = 51 5 10 10 5 1 = 81 6 15 20 15 6 1 = 131 7 21 35 35 21 7 1 = 211 8 28 56 70 56 28 8 1 = 34

Fn =(n−1n−1)

+(n−2n−3)

+(n−3n−5)

+ · · ·+( n−kn−2k+1

)+ · · ·

Fn = number of 1,2 strings with sum n − 1

Condition on # 1’s

Recall:The Fibonacci numbers Fn (for n ≥ 2) count each of the following:

(Also Pingali 200 BCE)

A: The number of strings of 1’s and 2’s with sum n − 1.B: The number of strings of odd positive integers with sum n.C: The number of strings of integers greater than 1 with sum n+ 1.Illustrate with n = 6, where F6 = 8.

A B C

11111 111111 72111 3111 251211 1311 341121 1131 431112 1113 52221 51 223212 33 232122 15 322

Multichoose Array

Steep anti-diagonal sums are Fibonacci numbers

1 0 0 0 0 0 01 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 21 281 4 10 20 35 56 841 5 15 35 70 126 2101 6 21 56 126 252 4621

Fn =((n

0

))+((

n−21

))+((

n−42

))+ · · ·+

((1n2

))[n even]

Fn = number of strings of odd positive integers with sum n

Condition on string length

13 = F7 =((

70

))+((

51

))+((

32

))+((

13

))e.g., String length 3, Sum 7:

* * * ** , **

3 bins, 7 *’s - odd number of *’s/bin

331, 313, 133, 511, 151, 115

Multichoose Array

Shallow anti-diagonal sums are Fibonacci numbers

1 0 0 0 0 0 01 1 1 1 1 1 11 2 3 4 5 6 71 3 6 10 15 21 281 4 10 20 35 56 841 5 15 35 70 126 2101 6 21 56 126 252 462

((1

n−1

))+((

2n−3

))+((

3n−5

))+ · · ·+

((n+120

))[n odd]

Fn = number of strings of integers greater than 1 with sum n + 1

Condition on string length

13 = F7 =((

16

))+((

24

))+((

32

))+((

40

))e.g., String length 3, Sum 8:

** ** ** * *

3 bins, 8 *’s - fill with at least 2 *’s/bin

224, 242, 422, 233, 323, 332

Catalan Numbers1

n+1

(2nn

)= 1

n+1

((n+1n

))Catalan counts we will refer to:Ballot Lists: n 0 ’s; n 1’s, # 0’s ≥ # 1’s in initial segmentsParentheses: n ( , n ) , well formed pairs(n)-Multisets from {0, 1, . . . , n}: 0 ≤ a1 ≤ a2 ≤ · · · ≤ an ≤ n withai ≤ i − 1Proof versions:

• Reflection: count bad lists and substract

• Recursion and generating functions

• Partitions (n-multijections?)

Choose not multichooseCatalan sequence: (()())(())

(()())(()) (()())(()) (()())(()) (()())(()) (()())(())

))(()((()) )())(((()) )()()((()) (()())))(( (()()))()(

Map between each Catalan string and n ‘bad’ strings

⇒ 1n+1

(2nn

)

1n+1

(2nn

)= 1

n+1

((n+1n

))= 1

2n+1

(2n+1n

)= 1

2n+1

((n+1n+1

))Ballot Lists: n + 1 0 ’s; n 1’s, # 0’s > # 1’s in initial segments

(n+1)-Multisets from {0, 1, . . . , n}: 0 ≤ a0 ≤ a1 ≤ · · · ≤ an ≤ nwith a0 = 0 and ai ≤ i − 1 for i ≥ 1

Cycle Lemma (Dvoretzky and Motzkin 1947):Write Ballot List cyclically and cut 2n + 1 places

Translate Cycle Lemma to multiset version

122255 Good lists dominated by 001234

If smallest is 0⇒ n If not −1 from all

122255011144111445000334003345033455334555223444112333001122012223

122255

n = 5, size 6 multisets from {0, 1, 2, 3, 4, 5}

rules partition((

66

))multisets

into classes of size 2 · 5 + 1 = 11

with exactly one good multiset

partition((

n+1n+1

))into size 2n + 1 classes

1n+1

(2nn

)= 1

n+1

((n+1n

))= 1

2n+1

(2n+1n

)= 1

2n+1

((n+1n+1

))

(([n]k

))with # i ≤ ci

= number of solutions to x1 + x2 + · · ·+ xn = k such that xi < ciVia generating functions or inclusion-exclusion

Choose version: ∑S⊆[n]

(−1)|S|(k − c(S) + n − 1

n − 1

)

Multichoose version:∑S⊆[n]

(−1)|S |((

n

k − c(S)

))

c(S) =∑

i∈S ci

Vandermonde’s Identity (1789) (Chu Shih-Chieh 1303)(n + m

r

)=

(n

0

)(m

r

)+

(n

1

)(m

r − 1

)+· · ·+

(n

r − 1

)(m

1

)+

(n

r

)(m

0

)Multiset version:

((nk

))=

(n

1

)((1

k − 1

))+

(n

2

)((2

k − 2

))+· · ·

(n

t

)((t

k − t

))+· · ·

Condition on size of underlying set

Implied bijection

Poker Deck

2♣, 2♦, 2♥, 2♠, 2♣, 2♦, · · · , J♦, · · · ,A♠

4 Suits ♣,♦,♥,♠

13 Ranks: 2, 3, 4, 5, 6, 7, 8, 9, 10, J,Q,K ,A

Poker Hand: 5 card subset of 52 cards

Full house - 5 card hand with 3 of one rank 2 of another

e.g., 7♣, 7♦, 7♥, J♣, J♦

What is the probability of a full house poker hand?

13 ·(43

)· 12 ·

(42

)(525

)

Full house - 5 card hand with 3 of one rank 2 of another

e.g., 7♣, 7♦, 7♥, J♣, J♦

What is the probability of a full house poker hand?

13 ·(43

)· 12 ·

(42

)(525

)

What is ?

13 ·((

43

))· 12 ·

((42

))((

525

))

What is the probability of a full house in multiset poker?(Every 5 card multiset hand is equally likely)

13 ·((

43

))· 12 ·

((42

))((

525

))

What is the probability of a full house

If we use 5 decks?

NO! hands are not equally likely

13 ·((

43

))· 12 ·

((42

))((

525

))

What is the probability of a full house

If we use 5 decks?

NO! hands are not equally likely

13 ·((

43

))· 12 ·

((42

))((

525

))

What is the probability of a full house

If we deal with replacement?

NO! hands are not equally likely

13 ·((

43

))· 12 ·

((42

))((

525

))

What is the probability of a full house

If we deal with replacement?

NO! hands are not equally likely

13 ·((

43

))· 12 ·

((42

))((

525

))

Question

How can we play multiset poker with a 56 = 52 + 5− 1 card deck?

Add 4 cards (knights) to deck:

C♣,C♦,C♥,C♠

And apply a bijection between(

[56]5

)and

(([52]

5

))

Question

How can we play multiset poker with a 56 = 52 + 5− 1 card deck?

Add 4 cards (knights) to deck:

C♣,C♦,C♥,C♠

And apply a bijection between(

[56]5

)and

(([52]

5

))

The standard bijection:(([6]5

))⇔(

[6+5−1]5

)multiset set stars and bars

1, 2, 3, 4, 5 1, 3, 5, 7, 9 ∗| ∗ | ∗ | ∗ | ∗ |2, 3, 4, 4, 4 2, 4, 6, 7, 8 | ∗ | ∗ | ∗ ∗ ∗ ||1, 1, 2, 3, 6 1, 2, 4, 6, 10 ∗ ∗ | ∗ | ∗ |||∗3, 3, 3, 3, 3 3, 4, 5, 6, 7 || ∗ ∗ ∗ ∗ ∗ |||2, 3, 4, 5, 6 2, 4, 6, 8, 10 | ∗ | ∗ | ∗ | ∗ |∗1, 1, 3, 3, 6 1, 2, 5, 6, 10 ∗ ∗ || ∗ ∗|||∗

The standard bijection

Dealt hand multiset hand

3♣3♦3♥3♠4♣ ⇐⇒ 3♣3♣3♣3♣3♣3♣3♦5♣J♦J♥ ⇐⇒ 3♣3♣4♥10♥10♥3♦5♣J♦J♥C♣ ⇐⇒ 3♦4♠10♠10♠A♣3♦5♣J♥C♦C♠ ⇐⇒ 3♦4♠J♣A♥A♠3♦5♣J♥C♦C♥ ⇐⇒ 3♦4♠J♣A♥A♥

≈ 2.6 million of ≈ 3.8 million multiset hands are regular pokerhands

None map to themselves!

The Knight’s bijection

3♣3♦3♥3♠4♣ ⇐⇒ 3♣3♦3♥3♠4♣3♣3♦5♣J♦J♥ ⇐⇒ 3♣3♦5♣J♦J♥C♣3♦5♣J♦J♥ ⇐⇒ 3♦3♦5♣J♦J♥3♦C♦5♣C♠J♥ ⇐⇒ 3♦5♣5♣J♥J♥3♦C♦C♥5♣J♥ ⇐⇒ 3♦5♣5♣5♣J♥

• A hand with no knight maps to itself

• Place knights in their location C♣,C♦,C♥,C♠= 1,2,3,4 left to right

• Place remaining cards in open spaces in order

• Knights take value of first regular card to their right

Knight’s bijection C :(

[n+k−1]k

)⇔((

[n]k

))• For S ∈

([n+k−1]k

), let T = S ∩ {n + 1, n + 2, . . . , n + k − 1}

• |T | = t and R = S ∩ [n] = S − T with |R| = k − t

• Write R = a1 < a2 < · · · < ak−t andT = n + b1 < n + b2 < · · · < n + bt

• T ′ = {b1, b2, . . . , bt} ⊂([k−1]

t

)is a t element set from [k − 1]

• Use the standard bijection B to map T ′ = {b1, b2, . . . , bt} toa t element multiset from [(k − 1)− t + 1] = [k − t]

• Use these as indices of repeated elements from R.

• In particular B(T ′) = {bi − i + 1|i = 1, 2, . . . , t}.• Then let R ′ = {abi−i+1|i = 1, 2, . . . , t}• The image of S under the knight’s bijection is thenC (S) = R ∪ R ′.

Knight’s bijection C :(

[n+k−1]k

)⇔((

[n]k

))• Any set avoiding knights maps to itself

• Place knights in their location

• Place regular elements in order in open spots

• Knights take value of first regular element to their right

Knight’s bijection C :(

[n+k−1]k

)⇔((

[n]k

))• Stars and bars bijection with ‘extra’ elements as stars and

‘regular’ elements as bars

Knight’s Bijection((

57

))=(

117

){1, 3, 4} ∪ {C1,C2,C4,C6} ⊆ {1, 2, 3, 4, 5} ∪ {C1,C2, . . . ,C6}

1 3 4

Knight’s Bijection((

57

))=(

117

){1, 3, 4} ∪ {C1,C2,C4,C6} ⊆ {1, 2, 3, 4, 5} ∪ {C1,C2, . . . ,C6}

* * 1 * 3 * 4

1113344 ∈((

[5]7

))

Playing poker with Knight’s bijection

• No ‘numerical’ computations needed

• ‘Normal’ hands are themselves

• No 2 players can get the same card

• At most 4 instances of duplicated cards

• High card ‘beats’ one pair

General Poker Games

3 ‘Deals’

• Multiple Decks (t decks)

• Multiset bijection

• Dealing with replacement

• r ranks

• s suits

• hand size h

limit as t →∞ multideck is dealing with replacement

Notation for general poker

λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉

13 ranks, 4 suits, hand size 5: one 3 of a kind, one pair〈011, 10, 21, 31〉

5 ranks, 7 suits, hand size 9: two 3 of a kind, one pair〈01, 11, 21, 32〉

r =∑

pi and h =∑

i · pi

Notation for general poker

λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉

Regular 13 rank poker:〈011, 11, 20, 30, 41〉 is 4 of a kind〈011, 10, 21, 31〉 is full house〈010, 12, 20, 31〉 is 3 of a kind〈010, 11, 22〉 is 2 pair〈09, 15〉 is high card

With r = 17 ranks and hand size h = 9〈014, 10, 20, 33〉 is three 3 of a kinds〈014, 11, 20, 30, 42〉 is two 4 of a kinds

Observe that full house and 4 of a kind have same exponents as do2 pair and 3 of a kindr =

∑pi and h =

∑i · pi

Rank Selection: Independent of suits and deal type

Fact

For a poker hand of type λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉, the number ofways to pick the ranks is the multinomial coefficient

Nra =

(r

p0, p1, p2, . . .

)=

r !

p0!p1! · · · ph!

4 of a kind and full house:Nra(〈011, 11, 20, 30, 41〉) = Nra(〈011, 10, 21, 31〉)

=

(13

11, 1, 1

)=

13!

11!1!1!= 13 · 12

3 of a kind and 2 pair:Nra(〈010, 12, 20, 31) = Nra(〈010, 11, 22〉)

=

(13

10, 2, 1

)=

13!

10!2!1!=

13 · 12 · 11

2

two four of a kind with r = 17 ranks and hand size h = 9:

Nra(〈014, 11, 20, 30, 42〉) =

(17

14, 2, 1

)=

17!

14!2!1!

Definition

The number of poker hands of type λ is

N(λ) = Nra(λ) · Nsu(λ)

# ways to pick the ranks · # ways to pick the suitsSuit selection Nra(λ) does depend on deal type

Fact

For a poker hand of type λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉, the number ofways to pick the suits is

• (t decks): Nmdsu (λ) =

∏(sti

)pi• (multiset): Nms

su (λ) =∏(( s

i

))pi• (dealing with replacement): N r

s (λ) =(hλ

)· sh

Definition

The number of poker hands of type λ is

N(λ) = Nra(λ) · Nsu(λ)

# ways to pick the ranks · # ways to pick the suitsSuit selection Nra(λ) does depend on deal type

Fact

For a poker hand of type λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉, the number ofways to pick the suits is

• (t decks): Nmdsu (λ) =

∏(sti

)pi• (multiset): Nms

su (λ) =∏(( s

i

))pi• (dealing with replacement): N r

s (λ) =(hλ

)· sh

Regular poker full house probabilities (including full house flush)〈011, 10, 21, 31〉

5 decks: ( 1311,1,1

)·(203

)(202

)(2605

)multiset: ( 13

11,1,1

)·((

43

))((42

))((

525

))Dealing with replacement:( 13

11,1,1

)·( 53,2

)· 45

525

17 ranks, 3 suits, 9 card handstwo 4 of a kind (including flushes), 〈014, 11, 20, 30, 42〉

2 decks: ( 1714,2,1

)·(64

)2(61

)(1029

)multiset: ( 17

14,2,1

)·((

34

))2 ((31

))((

519

))Dealing with replacement:( 17

14,2,1

)·( 94,4,1

)· 39

519

λ = 〈0p0 , 1p1 , 2p2 , . . . , 〉

t decks ( rp0,p1,p2,...

)·∏(st

i

)pi(rsth

)Multiset ( r

p0,p1,p2,...

)·∏(( s

i

))pi(( rsh

))Dealing with replacement( r

p0,p1,p2,...

)·( h(0!)p0 (1!)p1 (2!)p2 (3!)p3 ...

)· sh

(rs)h

Multiset vs. regular probabilities (as percents %)

multiset regular

Straight flush .001 .0015 kind flush .001 04 kind flush .016 0

full house flush .016 05 kind .02 0

3 kind flush .09 02 pair flush .09 0

flush .13 .20straight .27 .39

pair flush .30 04 kind .56 .02

full house .80 .143 kind 7.10 2.872 pair 8.90 4.75

High card 34.10 49.681 pair 47.62 42.3

regular poker hands(525

)= 2, 598, 960

multiset poker hands((

525

))=(565

)= 3, 819, 816

• A hand with no knight maps to itself

• Place knights in their location C♣,C♦,C♥,C♠= 1,2,3,4 left to right

• Place remaining cards in open spaces in order

• Knights take value of first regular card to their right

The Knight’s bijection

3♣3♦3♥3♠4♣ ⇐⇒ 3♣3♦3♥3♠4♣3♣3♦5♣J♦J♥ ⇐⇒ 3♣3♦5♣J♦J♥C♣3♦5♣J♦J♥ ⇐⇒ 3♦3♦5♣J♦J♥3♦C♦5♣C♠J♥ ⇐⇒ 3♦5♣5♣J♥J♥3♦C♦C♥5♣J♥ ⇐⇒ 3♦5♣5♣5♣J♥