- #1
Cylab
- 54
- 0
What is prob of 0 in ASCII text file assuming it is bit string?
Analysis:
MSB(1st bit in each byte) is always 0. So Pr(MSB) = 1/8.
its space is 2^7=256. Assuming each character is randomly distribution(same ratio of appearing in text), besides MSB, other bits follow the rule Pr(0)=Pr(1)=1/2.
Thus, as total (MSB + other bits), Pr(0)=1/8 +1/2 = 5/8.
Is it correct?
Then further, randomly select, n bits from the total bits of ASCII text files.
What is probability of being 0 of t_th position bit or Pr[t = 0] ,
where 0<t <= n ? And what is prob of being 00 of t_th and (t+1)_th positions of bits (two sequences of zero).
Please anyone shed some light on this.
Thanks in advance for your attention.
Analysis:
MSB(1st bit in each byte) is always 0. So Pr(MSB) = 1/8.
its space is 2^7=256. Assuming each character is randomly distribution(same ratio of appearing in text), besides MSB, other bits follow the rule Pr(0)=Pr(1)=1/2.
Thus, as total (MSB + other bits), Pr(0)=1/8 +1/2 = 5/8.
Is it correct?
Then further, randomly select, n bits from the total bits of ASCII text files.
What is probability of being 0 of t_th position bit or Pr[t = 0] ,
where 0<t <= n ? And what is prob of being 00 of t_th and (t+1)_th positions of bits (two sequences of zero).
Please anyone shed some light on this.
Thanks in advance for your attention.
Last edited: