What is the probability that each element in this string is non-zero?

306 Views Asked by At

Question: You are given two bitstrings a1, a2, .. a77 and b1, b2, .. b77 of length 77 In both bitstrings, each bit is 0 with probability 3/4, and 1 with probability 1/4 (independent of all other bits).

Consider the string: a1-b1, a2-b2, ..., a77-b77.

What is the probability that each element in this string is non-zero?

Answer: 1.586381421*10^-33

Attempt:

Non-zero probability is 1/4 for both bitstrings. If both bitstrings are subtracted by one another for length 77, then it shouldn't it be (1/4)*(1/4) = 1/16 be the probability of the new string being non-zero

Total number of possible bitstrings = 2^77

Probability: 1/16/2^77 = 4.13*10^-25

3

There are 3 best solutions below

2
On BEST ANSWER

Let $c_i=a_i-b_i$. You need to find $$P[c_1 \neq 0, c_2 \neq 0, \ldots, c_{77} \neq 0] = p^{77}$$

where $$p=P[c_i \neq 0] = P[a_i = 0, b_i = 1] + P[a_i = 1, b_i = 0] = 2\times\frac{3}{16}=\frac{6}{16}=\frac{3}{8}$$

So, the final answer is $$\left(\frac{3}{8}\right)^{77}$$ which gives the answer you provided.

1
On

The answer is $(\frac{6}{16})^{77}$. One digit i being 0 is equivalent to $\lnot(a_i=b_i=0\lor a_i=b_i=1)$

2
On

$a_i-b_i\neq0\implies a_i\neq b_i$

The possible pairs $(a_i, b_i)$ are $(0, 1)$ and $(1,0)$, with each pair having a probability $\frac{3}{4}\cdot\frac{1}{4}=\frac{3}{16}$. Therefore, the total probability is $(\frac{3}{16}+\frac{3}{16})^{77}=(\frac{6}{16})^{77}$.