129k views
1 vote
Suppose that you pick a bit string from the set of all bit strings of length ten. Find the probability that a) the bit string has exactly two 1s; b) the bit string begins and ends with 0; c) the bit string has the sum of its digits equal to seven; d) the bit string has more 0s than 1s; e) the bit string has exactly two 1s, given that the string begins with a 1.

User Deepak B
by
7.9k points

1 Answer

4 votes

Answer:

  • 45/1024
  • 1/4
  • 15/128
  • 193/512
  • 9/512

Explanation:

There are 2^10 = 1024 bit strings of length 10.

a) There are 10C2 = 45 ways to have exactly two 1-bits in 10 bits

p(2 1-bits) = 45/1024

__

b) Of the four (4) possibilities for beginning and ending bits (00, 01, 11, 10), exactly one (1) of those is 00.

p(b0=0 & b9=0) = 1/4

__

c) There are 10C7 = 120 ways to have seven 1-bits in the bit string.

p(7 1-bits) = 120/1024 = 15/128

__

d) ∑10Ck {for k=0 to 4} = 386 is the total of the number of ways to have 0, 1, 2, 3, or 4 1-bits in the string. If there are more than that, there won't be more 0-bits than 1-bits

p(more 0 bits) = 386/1024 = 193/512

__

e) The string will have two 1-bits if it starts with 1 and there is a single 1-bit among the other 9 bits. There are 9 ways that can happen, among the 512 ways to have 9 remaining bits.

p(2 1-bits | first is a 1-bit) = 9/512

User Mohammad AlQanneh
by
7.5k points