2,751 views
1 votes
1 votes
what is the probability that a randomly chosen bit string of length  10 is palindrome

a)1/64   b)1/32   c) 1/8   d)1/4

3 Answers

Best answer
6 votes
6 votes
  • Total number of bit-strings of length $10$ possible = $2^{10}$
  • To make a string palindrome, we only care about first half digits and rest of them are just replicated .
  • Hence, here we care of first $5$ digits only in $2^{5}$ ways and rest $5$ are replicated in only $1$ way .

Required Probability = $\frac{2^5}{2^{10}} = \frac{1}{2^{5}}$

selected by
1 votes
1 votes

Ans B)1/32

           first five bits can be anythink,total of 32 combinations and last 5 bits are just reverse of them.

           Total combinations of 10 bits are=1024

           Total palindromes=32

           Probablity that randomly chosen string is palindrome=32/1024=1/32.

           

            

1 votes
1 votes

To get a palindrome we can toggle the bits in only one-half of the $10$ length string.

So,

  • Number of favourable cases = Number of palindrome bit strings of length $10$ = $2^5 = 32$
  • Total Strings of length $10$ = $2^{10} = 1024$ 
  • Answer = $\frac{1}{32}$.

Related questions

3 votes
3 votes
2 answers
1
Akriti sood asked Nov 7, 2016
6,670 views
A palindrome is a string whose reversal is identical to the string. How many bit strings of length n are palindromes? 2⌈n⁄2⌉ 2(⌊ n/2⌋ ) 2⌈n⁄2⌉ -1 2(�...
1 votes
1 votes
0 answers
2