Counters

## 2814725

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

A group of 6 men and 6 women is randomly divided into 2 groups of size 6 each. What is the probability that both groups will have the same number of men?

6

(
X
Y
# )

6

(
X
)

5

(
X
)
⋅
Y
.
.
.
t
.

3

(
X
)
⋅

3

(
Y
)
.
.
.

6

(
Y
)

{\displaystyle \mathit6(X+Y) = \mathit6(X) + \mathit5(X) \cdot Y ... + t. \mathit3(X)\cdot \mathit3(Y) + ... + \mathit6(Y) }

### **Unlabeled groups**

2

(

6

(
X
Y
)
→

1

2
!

(

x
6

6
!

x
5

y

5
!
1
!

.
.
.
t

x
3

y
3

3
!
3
!

.
.
.

y
6

6
!

)

2

{\displaystyle \mathit2(\mathit6(X+Y) \rightarrow {1 \over 2!} \left ( { x^6 \over 6! } + { x^5y \over 5!1! } +...+ t{x^3y^3 \over 3!3!} + ...{ y^6 \over 6! } \right ) ^2 }

c
o
e
f
f
(

x
6

y
6

# )
200

t
2

262

{\displaystyle coeff(x^6y^6) = 200t^2 + 262 }

the types equation is

200
# 262
462

{\displaystyle 200+262 = 462 }

### **Labeled groups**

6

(
X
Y
)
⋅

6

(
X
Y
)
→

(

x
6

6
!

x
5

y

5
!
1
!

.
.
.
t

x
3

y
3

3
!
3
!

.
.
.

y
6

6
!

)

2

{\displaystyle \mathit6(X+Y) \cdot \mathit6(X+Y) \rightarrow \left ( { x^6 \over 6! } + { x^5y \over 5!1! } +...+ t{x^3y^3 \over 3!3!} + ...{ y^6 \over 6! } \right ) ^2 }

c
o
e
f
f
(

x
6

y
6

# )
400

t
2

524

{\displaystyle coeff(x^6y^6) = 400t^2 + 524 }

the types equation is

400
# 524
924

{\displaystyle 400+524 = 924 }

## 2821613

https://math.stackexchange.com/questions/2821613/understanding-solution-to-the-probability-problem-from-sheldon-ross-book
A closet contains 10 pairs of shoes. If 8 shoes are randomly selected, what is the probability that there will be

- no complete pair

- exactly one complete pair

P
a
i
r
(
X
# )

2

(
X
)
t
.
X
⋅
X

t
2

.
p
.

2

(
X
)

{\displaystyle Pair(X) = \mathit 2(X) + t.X \cdot X + t^2.p.\mathit 2(X)}

t

{\displaystyle \begin{array}{lcr} t \end{array} }

 is a counter for the number of shoes present in selection and

/

p

/

{\displaystyle / p / }

 is a counter for a complete pair. The closet is the product of the 10 pairs.

C
l
o
s
e
t
(

X
1

,

X
2

,
.
.
.

# i
1

10

P
a
i
r
(

X
i

)

{\displaystyle Closet (X\_1, X\_2,...) = \prod\_{i=1}^{10} Pair(X\_i) }

we are interested in the coefficient of

t
8

.

∏

# i
1

10

x
i
2

2
!

{\displaystyle t^8.\prod\_{i=1}^{10} {x\_i^2 \over 2!} }

p
4

p
3

p
2

p
11520

{\displaystyle 210.p^4 + 10080.p^3 + 50400.p^2 + 53760.p + 11520}

## 2820643

https://math.stackexchange.com/questions/2820643/elementary-combinatorial-exam-allocation-problem

 I have 18 days on which exams can take place, 6 exams to take, 2 exam slots per day (AM/PM). Only one exam is allowed per slot, allocation is random.
What is p:=P(2 days will have 2 exams on them)?

Here **e** is a counter for exams and **p** is a counter for double-exam days. The session is the product of the 18 days.

c
o
e
f
f

E
2

2
!

{\displaystyle coeff \ {E^2\over 2!} }

1
2
⋅
e

e
2

⋅
p

{\displaystyle 1 + 2\cdot e + e^2\cdot p}

1
e
⋅
E
p

E
2

2
!

{\displaystyle 1 + e \cdot E + p {E^2 \over 2!}
}

(
1
E

)
2

2
!

{\displaystyle {(1+E)^2 \over 2!}}

c
o
e
f
f

E
2

2
!

{\displaystyle coeff \ {E^2\over 2!} }

1
2
⋅
e

e
2

⋅
p

{\displaystyle 1 + 2\cdot e + e^2\cdot p}

1
e
⋅
E
p

E
2

2
!

{\displaystyle 1 + e \cdot E + p {E^2 \over 2!}
}

(
1
E

)
2

2
!

{\displaystyle {(1+E)^2 \over 2!}}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

⋯

{\displaystyle \cdots}

c
o
e
f
f

E
2

2
!

{\displaystyle coeff \ {E^2\over 2!} }

1
2
⋅
e

e
2

⋅
p

{\displaystyle 1 + 2\cdot e + e^2\cdot p}

1
e
⋅
E
p

E
2

2
!

{\displaystyle 1 + e \cdot E + p {E^2 \over 2!}
}

(
1
E

)
2

2
!

{\displaystyle {(1+E)^2 \over 2!}}

The GF for the entire session is

(
1
2
⋅
e

e
2

⋅
p

)

18

{\displaystyle (1 + 2\cdot e + e^2\cdot p)^{18} }

(
1
2
⋅
e

e
2

⋅
p

)

18

{\displaystyle (1 + 2\cdot e + e^2\cdot p)^{18} }

2

36

{\displaystyle 2^{36}}

c
o
e
f
f

e
6

{\displaystyle coeff \ e^6 }

816
⋅

p
3

73440
⋅

p
2

685440
⋅
p
1188096

{\displaystyle 816 \cdot p^3 + 73440\cdot p^2 + 685440\cdot p + 1188096 }

1947792

{\displaystyle 1947792}

c
o
e
f
f

e
6

⋅

p
2

{\displaystyle coeff \ e^6 \cdot p^2 }

73440
⋅

p
2

{\displaystyle 73440\cdot p^2 }

73440

{\displaystyle 73440 }

g
o
o
d

a
l
l

=

73440
1947792

=
0.0377

{\displaystyle \frac {good}{all} = \frac {73440}{1947792} = 0.0377}

## 2822596

**A basketball team consists of 6 frontcourt and 4 backcourt players**

https://math.stackexchange.com/questions/2822596/understanding-solution-to-probability-problem/

 A basketball team consists of 6 frontcourt and 4 backcourt players. If players are divided into roommates at random, what is the probability that there will be exactly two roommate pairs made up of a backcourt and a frontcourt player?
### Labeled rooms, labeled players - Species

1
f

f
2

2
!

{\displaystyle 1 + f + {f^2 \over 2!} }

1
f

f
2

2
!

{\displaystyle 1 + f + {f^2 \over 2!} }

1
f

f
2

2
!

{\displaystyle 1 + f + {f^2 \over 2!} }

1
f

f
2

2
!

{\displaystyle 1 + f + {f^2 \over 2!} }

1
f

f
2

2
!

{\displaystyle 1 + f + {f^2 \over 2!} }

1
b

b
2

2
!

{\displaystyle 1 + b + {b^2 \over 2!} }

1
b

b
2

2
!

{\displaystyle 1 + b + {b^2 \over 2!} }

1
b

b
2

2
!

{\displaystyle 1 + b + {b^2 \over 2!} }

1
b

b
2

2
!

{\displaystyle 1 + b + {b^2 \over 2!} }

1
b

b
2

2
!

{\displaystyle 1 + b + {b^2 \over 2!} }

R
o
o
# m

2

[
F
B
# ]

2

[
F
]
t
F
⋅
B

2

[
B
]

{\displaystyle Room = \mathit 2[F+B] = \mathit 2[F] + tF \cdot B + \mathit 2[B] }

H
o
t
e
# l
R
o
o

m
5

{\displaystyle Hotel = Room^5 }

H
o
t
e
l
→

(

f
2

2

t
f
b

b
2

2

)

5

{\displaystyle Hotel \rightarrow \left( { f^2 \over 2 } + tfb + { b^2 \over 2 } \right)^5 }

c
o
e
f
f
(

f
6

6
!

b
4

4
!

# )
43200

t
4

64800

t
2

5400

{\displaystyle coeff( { f^6 \over 6! } { b^4 \over 4! }) = 43200t^4+64800t^2+5400 }

### Labeled rooms, unlabeled players - Polya

1
f

f
2

{\displaystyle 1 + f + f^2 }

1
f

f
2

{\displaystyle 1 + f + f^2 }

1
f

f
2

{\displaystyle 1 + f + f^2 }

1
f

f
2

{\displaystyle 1 + f + f^2 }

1
f

f
2

{\displaystyle 1 + f + f^2 }

1
b

b
2

{\displaystyle 1 + b + b^2 }

1
b

b
2

{\displaystyle 1 + b + b^2 }

1
b

b
2

{\displaystyle 1 + b + b^2 }

1
b

b
2

{\displaystyle 1 + b + b^2 }

1
b

b
2

{\displaystyle 1 + b + b^2 }

H
o
t
e
# l
R
o
o

m
5

=
(

f
2

t
f
b

b
2

)
5

{\displaystyle Hotel = Room^5 = (f^2+tfb+b^2)^5 }

we seek

c
o
e
f
f
(

f
6

b
4

# )
5

t
4

30

t
2

10

{\displaystyle coeff (f^6 b^4) = 5t^4 + 30t^2 + 10}

where

# 10

(

5
2

)

,

# 5

(

5
1

)

a
n
d

# 30

(

5
2

)

(

3
1

)

{\displaystyle 10 = {5\choose2}, \ \ 5={5\choose1}\ \ and \ \ 30 = {5\choose2}{3\choose1}}

### Unlabeled rooms, labeled players - Species

If the rooms are not labelled:

H
o
t
e
# l

5

[
R
o
o
m
]

{\displaystyle Hotel = \mathit 5[Room] }

H
o
t
e
l
=→

1

5
!

(

x
2

2

t
x
y

y
2

2

)

5

{\displaystyle Hotel = \rightarrow {1 \over 5!} \left( { x^2 \over 2 } + txy + { y^2 \over 2 } \right)^5}

c
o
e
f
f
(

x
6

6
!

,

y
4

4
!

# )
360

t
4

540

t
2

45

{\displaystyle coeff( { x^6 \over 6! } ,{ y^4 \over 4! }) = 360t^4+540t^2+45 }

the types equation is

360
540
# 45
945

{\displaystyle 360+540+45 = 945}

### Unlabeled rooms, unlabeled players - partitions

there are three types of partitions,

* no good pairs,
* two good pairs,
* four good pairs, 1/3

## 2852248

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

Number of ways of forming 10 student committee from 5 classes of 30 students each]

There are 5 classes with 30 students each. How many ways can a committee of 10 students be formed if each class has to have at least one student on the committee?

Let

X
,
Y
,
Z
,
U
,
V

{\displaystyle X, Y, Z, U, V}

 be five sorts of students

Then

R
e
p
s
(
X
# )
X
⋅

29

(
X
)

2

(
X
)
⋅

28

(
X
)

3

(
X
)
⋅

27

(
X
)

4

(
X
)
⋅

26

(
X
)

5

(
X
)
⋅

25

(
X
)

6

(
X
)
⋅

26

(
X
)

{\displaystyle Reps(X) = X \cdot \mathit{29}(X) + \mathit2(X) \cdot \mathit{28}(X) + \mathit3(X) \cdot \mathit{27}(X) + \mathit4(X) \cdot \mathit{26}(X) + \mathit 5(X) \cdot \mathit{25}(X) + \mathit6(X) \cdot \mathit{26}(X) }

represents possible choices for the representants of the first class.

Passing to e.g.f. and adding a counter

t

{\displaystyle t}

 for the number of cosen students from one class, one gets:

# a
t

x

1
!

x

29

29
!

t
2

x
2

2
!

x

28

28
!

⋯

t
6

x
6

6
!

x

24

24
!

{\displaystyle a = t { x \over 1!} {x^{29} \over 29!}
 + t^2 { x^2 \over 2!} {x^{28} \over 28!}
 + \dots + t^6 { x^6 \over 6!} {x^{24} \over 24!} }

=
(

30
!

1
!
29
!

t

30
!

2
!
28
!

t
2

⋯

30
!

6
!
24
!

)

t
6

x

30

30
!

{\displaystyle = ( { 30! \over 1! 29!}t
 + { 30! \over 2! 28!}t^2
 + \dots + { 30!\over 6! 24!})t^6 \frac {x^{30}} {30!} }

Similarly we get

# b
(

30
!

1
!
29
!

t

30
!

2
!
28
!

t
2

⋯

30
!

6
!
24
!

)

t
6

y

30

30
!

{\displaystyle b = ( { 30! \over 1! 29!}t
 + { 30! \over 2! 28!}t^2
 + \dots + { 30!\over 6! 24!})t^6 \frac {y^{30}} {30!} }

and so on.

By multiplying the obtained

a
(
t
,
x
)
b
(
t
,
y
)
⋯
e
(
t
,
v
)

{\displaystyle a(t,x)b(t,y) \cdots e(t,v) }

 and then taking the coefficient of

t

10

x

30

30
!

⋯

v

30

30
!

{\displaystyle t^{10} \frac {x^{30}} {30!} \cdots \frac {v^{30}} {30!} }

one gets

645666069796875

{\displaystyle 645666069796875}

.