A Probability Perspective To A Combinatorics Problem
A Probability Perspective To A Combinatorics Problem
x1 + x2 + · · · + xn ≡ k (mod p) (1)
x1 + x2 + · · · + xn = k (3)
n+k−1
is k
, as in [2]. For example, the solution x1 = 2, x2 = 1, x3 = 3 to x1 + x2 +
x3 = 6 can be represented as 11 ∗ 1 ∗ 111, where the six 1s are allocated among the
8 (= 6 + 3 − 1) places. This is equivalent to the allocation of 2 (= 3 − 1) “stars”
(given by the *s) into the eight places. (This method is referred to as the “stars and
bars” method
in [1].) The number of ways to allocate the k 1s among the n + k − 1
places is n+k−1k
. However, the restriction of the xi ’s to [p − 1] seems to preclude this
approach to determine the number of solutions to equation (1).
A more general problem, sometimes called the “donut shop problem,” could be use-
ful to find the number of nonnegative integer solutions to equation (3) under inequality
constraints, where 0 ≤ ai ≤ xi ≤ bi for i = 1, . . . , n, as considered in [1, 8]. This is
equivalent to the problem of finding the number of nonnegative integer solutions to
y1 + y2 + · · · + yn = k − s, where 0 ≤ yi ≤ bi − ai for each i and s = ni=1 ai . To
obtain the solution, we can use the inclusion–exclusion principle, as in [3], to get the
following formula
|A1 ∪ · · · ∪ An | = (−1)|I |+1 |AI |, (4)
∅=I ⊆{1,...,n}
Probability problem
Suppose that the probability question from the previous section is generalized to
a p-sided die, where rolling a j ∈ [p − 1] results in moving counterclockwise
(j − 1)(2π/p) along the circumference. Each xi from equation (1) corresponds to
a roll of the p-sided die. Take a second to think about how determining the probability
of landing on k(2π/p) after n rolls is equivalent to the number of solutions to equation
(1).
Theorem 1 (Probability). Let Xi be the random variable for which P (Xi = j ) = p1
for j = 0, 1, . . . , p − 1. Define Sn = ni=1 Xi . Then, P (Sn ≡ k (mod p)) = p1 for
k = 0, 1, . . . , p − 1.
Proof. When you throw a p-sided die one time, the probability that you are at the
position k(2π/p) is p1 for all k (k = 0, 1, . . . , p − 1). This means that a second throw
provides equal probability to each position you proceed regardless of the last position;
this is the Markov property. Therefore, throwing a die n times also provides equal
probability of p1 to each position of k(2π/p) for all k (k = 0, 1, . . . , p − 1).
Since each Xi in Theorem 1 has p possibilities, the total number of cases of
X1 , X2 , . . . , Xn is p n . Because the probability P (Sn ≡ k (mod p)) = p1 , then the
total number of cases in which Sn ≡ k (mod p) is p n−1 for all k ∈ [p − 1].
Combinatorial problem
To interpret the probability problem to the combinatorial problem, we only regard
xi ∈ {0, 1, . . . , p − 1}, (i = 1, . . . , n) in equation (1) as the samples from a discrete
uniform distribution. This delivers the answer to the combinatorial problem.
VOL. 92, NO. 2, APRIL 2019 125
Theorem 2 (Combinatorics). For k ∈ [p − 1] and xi ∈ [p − 1] for each i, there are
p n−1 solutions x = (x1 , x2 , . . . , xn ) to
x1 + x2 + · · · + xn ≡ k (mod p).
Conclusion
Acknowledgment The author would like to thank the Editor and referees for valuable comments.
REFERENCES
[1] Brualdi, R. A. (2017). Introductory Combinatorics, 5th ed. Englewood Cliffs, NJ: Pearson.
[2] Fomin, D., Genkin, S., Itenberg, I. V. (1996). Mathematical Circles: Russian Experience. Mathematical
World, Vol. 7. Providence, RI: American Mathematical Society.
[3] Jukna, S. (2011). Extremal Combinatorics, 2nd ed. Heidelberg: Springer.
[4] Kataria, K. K. (2016). A probabilistic proof of the multinomial theorem. Amer. Math. Monthly. 123: 94–96.
[5] Kataria, K.K. (2017). Some probabilistic interpretations of the multinomial theorem. Math. Mag. 90: 221–
224.
[6] Peterson, J. (2013). A probabilistic proof of a binomial identity. Amer. Math. Monthly. 120: 558–562.
[7] Rosalsky, A. (2007). A simple and probabilistic proof of the binomial theorem. Amer. Statist. 61: 161–162.
[8] University of North Dakota Mathematics Department (2010). Math408: Combinatorics, p. 9. http://arts-
sciences.und.edu/math/ files/docs/courses/supp/math408notesold.pdf
Summary. A problem that seems to be tough in a field sometimes becomes easy to solve by looking at it from
a different field. In this note, a problem in combinatorics is framed as a problem in probability, where it becomes
easier to solve.
HIDEO HIROSE (MR Author ID: 620160) received his Ph.D. in Engineering from Nagoya University. He held
visiting positions at Stanford University before joining the faculty at Kyushu Institute of Technology, where he
was eventually appointed vice dean of the university. Then, he moved to Hiroshima Institute of Technology, and
was appointed director of Data Science Research Center.