Combs

## 1493288

https://math.stackexchange.com/questions/1493288

An urn contains six balls of each of the three colors: red, blue, green. Find the expected number of different colors obtained when three balls are drawn:

a. with replacement;

b. without replacement
### **a) G.F.**

When replacing, the G.F. is

(
x
y
z

)

3

{\displaystyle (x+y+z)^{3}}

The types equation is

6
18
# 3
27

{\displaystyle 6+18+3=27}

The average # of colors is

3.6
2.18
1.3

27

=

19
9

{\displaystyle {3.6+2.18+1.3 \over 27}={19 \over 9}}

### **b) e.g.f. by counters**

Species formula is:

3

(
r
X
g
Y
b
Z
)
⋅

15

(
X
Y
Z
)

{\displaystyle {\mathit {3}}(rX+gY+bZ)\cdot {\mathit {15}}(X+Y+Z)}

c
o
e
f
f
(

x

6

6
!

y

6

6
!

z

6

6
!

# )
20
(

b

3

g

3

r

3

)
90

b

2

g
90

b

2

r
90
b

g

2

90
b

r

2

90

g

2

r
90
g

r

2

216
b
g
r

{\displaystyle coeff({x^{6} \over 6!}{y^{6} \over 6!}{z^{6} \over 6!})=20(b^{3}+g^{3}+r^{3})+90b^{2}g+90b^{2}r+90bg^{2}+90br^{2}+90g^{2}r+90gr^{2}+216bgr}

the type equation is

60
540
# 216
816

{\displaystyle 60+540+216=816}

The average # of colors is

3.216
2.540
1.60

816

≈
2.1912

{\displaystyle {3.216+2.540+1.60 \over 816}\approx 2.1912}

### **b) e.g.f. by combs**

Let us take a card deck that contains only three colors : spade, diamond and heart, and suits from 1 to 6.

1) Define a poker hand as a hand of three cards. There are several types of hands, full color, pair and tricolor. Let count the hands without replacement :

tricolor :

(

6
1

)

(

6
1

)

(

6
1

)

=
216

{\displaystyle {6 \choose 1}{6 \choose 1}{6 \choose 1}=216}

pair :

(

3
1

)

(

2
1

)

(

6
1

)

(

6
2

)

=
540

{\displaystyle {3 \choose 1}{2 \choose 1}{6 \choose 1}{6 \choose 2}=540}

full color :

(

3
1

)

(

6
3

)

=
60

{\displaystyle {3 \choose 1}{6 \choose 3}=60}

their sum is

(

18
3

)

=
816

{\displaystyle {18 \choose 3}=816}

 , the average # of colors is

216.3
540.3
60.1

816

≈
2.1912

{\displaystyle {216.3+540.3+60.1 \over 816}\approx 2.1912}

## **Poker Hands**

terminology : none, single, pair, triplet, quad ; Aces, Kings, Queens, ...

624 + 3744 + 54912 + 123552 + 1098240 + 1317888 = 2598960

## Binomial

The rise of The Binomial Coefficient

There are n sorts and we have to select k items, such that each sort occurs at most one time.

Here **e** is a counter for the occurences of X. We take the product of n X's.

X
1

{\displaystyle X\_1}

c
o
e
f
f

X

1

1
!

{\displaystyle coeff\ {X\_{1} \over 1!}}

1
e

{\displaystyle 1+e}

1
e

X

1

1
!

{\displaystyle 1+e{X\_{1} \over 1!}}

e
x
p
(

X

1

)

{\displaystyle exp(X\_{1})}

X
2

{\displaystyle X\_2}

c
o
e
f
f

X

2

1
!

{\displaystyle coeff\ {X\_{2} \over 1!}}

1
e

{\displaystyle 1+e}

1
e

X

2

1
!

{\displaystyle 1+e{X\_{2} \over 1!}}

e
x
p
(

X

2

)

{\displaystyle exp(X\_{2})}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

X
n

{\displaystyle X\_n}

c
o
e
f
f

X

n

1
!

{\displaystyle coeff\ {X\_{n} \over 1!}}

1
e

{\displaystyle 1+e}

1
e

X

n

1
!

{\displaystyle 1+e{X\_{n} \over 1!}}

e
x
p
(

X

n

)

{\displaystyle exp(X\_{n})}

The GF for the entire session is

(
1
e

)

n

{\displaystyle (1+e)^{n}}

(
1
e

)

n

{\displaystyle (1+e)^{n}}

2
n

{\displaystyle 2^n}

c
o
e
f
f

e

k

{\displaystyle coeff\ e^{k}}

(

n
k

)

e

k

{\displaystyle {n \choose k}e^{k}}

(

n

k

)

{\displaystyle n \choose k}