Randomly permute $\{1,\cdots,100\}$. What is the probability that none of the $S_k$'s defined by $\sigma(1)+\cdots+\sigma(k)$ is divisible by $3$?

95 Views Asked by At

After randomly permuting the numbers from $1$ to $100$, what is the probability that none of the $S_k$'s defined by $S_k =\sigma(1)+\cdots+\sigma(k)$ is divisible by $3$?

I think I have a solution. Here is my proposed solution:

Consider all the numbers from $1$ to $100$ modulo $3$. We have $33$ zeroes, $34$ ones and $33$ twos. Now let's see which permutations are eligible:

First of all, it does not matter where those numbers divisible by $3$ are placed after permutation because they are zero modulo $3$. I claim there exists only one possible pattern:

$$1 \hspace{5px} \underbrace{1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} \cdots \hspace{5px} 1 \hspace{5px}2}_{\text{33 times}}$$

where the remaining zeroes can be put anywhere. Why is this the only pattern? Well, notice that after we have chosen $\sigma(1)$, no two consecutive sigmas can be $1$ modulo $3$. Because if $S_k\equiv x \pmod{3}$, then $S_{k+1} \equiv x+1 \pmod{3}$ and $S_{k+2} \equiv x+2 \pmod{3}$. One of these three must be divisible by $3$. Hence, no consecutive $1$'s can be in the list after the first entry.

The same argument applies to any two consecutive sigmas that are equal to $2$ modulo $3$. So, after we have chosen $\sigma(1)$, the rest of the list should be filled with alternating $1$'s and $2$'s with $0$'s placed arbitrarily. So, we get two options:

$$\text{Pattern I: } \hspace{5px} 1 \hspace{5px}1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} \cdots$$ $$\text{Pattern II: } \hspace{5px} 2 \hspace{5px}2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} 1\hspace{5px} 2\hspace{5px} \cdots$$

The second pattern is impossible. Because the numbers of $1$'s and $2$'s are limited and we cannot fit $34$ ones and $33$ twos in the second pattern.

Hence, we only need to count the number of ways we can place zeroes in the only remaining pattern (pattern I) to find out the probability. The final answer therefore is equal to:

$$\frac{{67+33-1}\choose{33}}{{100 \choose 33} \times {67 \choose 34}}=\frac{{99}\choose{33}}{{100 \choose 33} \times {67 \choose 34}} \approx 4.7\times 10^{-20}$$

So, the answer is extremely small and the probability is almost $0$.

2

There are 2 best solutions below

0
On BEST ANSWER

Your analysis is correct so far. So I can concentrate on the counting.

Obviously a sequence can't start with a number that is zero mod 3. This means that the zeroes can be placed somewhere on the remaining 99 places. This gives ${99}\choose{33}$ possibilities. The sequence of zeroes are 33 different values. Hence there are $33!$ different sequences.

The pattern of the ones and twos has been proven to be $1, 1, 2, 1, 2, 1, ...$ There are 34 ones that can be ordered in $34!$ ways. And for the twos we have $33!$ different sequences.

This means we have $33! * 34! * 33! * {{99}\choose{33}}$ valid sequences. In total there are $100!$ possible sequences. The probability to hit one of the desired ones is thus

$$ \frac{33! * 34! * 33! * {{99}\choose{33}}}{100!} $$

Wolfram tells me this is $\frac{1}{21233613041224311000} \approx 4.71 \times 10^{-20}$

6
On

The reasoning looks correct.

But the counting of ways seems wrong. The $3^{100}$ denominator makes no sense to me. It should rather be the multinomial $ \binom{100}{33, 34,33}$. Also, the numerator should be $\binom{99}{66}=\binom{99}{33}$