Question

Imprecise Counting - Long Runs in Binary Strings Let n=2^k for some positive integer k and...

Imprecise Counting - Long Runs in Binary Strings

Let n=2^k for some positive integer k and consider the set Sn of all n-bit binary strings.

  1. Let c be an integer in {0,…,n−k}. Consider any j∈{1,…,n−k−c+1}. How many strings b1,…,bn∈Sn have bj,bj+1,…,bj+k+c−1=00…0? In other words, how many strings in Sn have k+c consecutive zeros beginning at position j?
  2. For each j∈{1,…,n−k+c+1}, let Xj be the subset of Sn consisting only of the strings counted in the previous question. Show that

    (n−k−c+1)∑(j=1) {|Xj|≤2^n / 2^c}

    (Hint: Remember that 2^k=n.)
  3. This leads to the following conclusion: The number of n-bit binary strings containing a substring of k+c consecutive zeros is at most 2^n / 2^c. Explain how to arrive at this conclusion.
0 0
Add a comment Improve this question Transcribed image text
Answer #1
  • We need to consider all strings of length n in which k+c positions are occupied by 0s. Each of the remaining n-(k+c) places of the string are either occupied by a 0 or by a 1. So, the total number of possible strings which satisfy the given condition is .
  • Each

so,

which must be the same as and from it follows,

. Since we obtain the given inequality
.

  • Any n-bit binary string which contains a sub-string of k+c consecutive 0s will be having the start of the sub-string at a certain where . So, the number of all possible binary strings will be the sum of all the strings with the sub-string starting at each of the s which is precisely . So, by the last inequality this must always be less than .
Add a comment
Know the answer?
Add Answer to:
Imprecise Counting - Long Runs in Binary Strings Let n=2^k for some positive integer k and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT