Question

In: Advanced Math

4. Consider bit strings with length l and weight k (so strings of l 0’s and...

4. Consider bit strings with length l and weight k (so strings of l 0’s and 1’s, including k 1’s). We know how to count the number of these for a fixed l and k. Now, we will count the number of strings for which the sum of the length and the weight is fixed. For example, let’s count all the bit strings for which l + k = 11.

(a) Find examples of these strings of different lengths. What is the longest string possible? What is the shortest?

(b) How many strings are there of each of these lengths. Use this to count the total number of strings (with sum 11).

(c) The other approach: Let n = l + p vary. How many strings have sum n = 1? How many have sum n = 2? And so on. Find and explain a recurrence relation for the sequence (an) which gives the number of strings with sum n.

(d) Describe what you have found above in terms of Pascal’s Triangle. What patter have you discovered?

I'd really appreciate the help on solving this problem as there were no similar example problems in the book to even help me start this problem. Thank you!

Also some background information on this problem to hopefully help someone at least start answering this problem. For this problem we previously went over sequences such as recursive and closed. Also if they were arithmetic or geometric. The last chapter did cover binomial coefficients if that has some prevalence here.

Solutions

Expert Solution

a) Examples: The strings and are of lengths respectively. The weights are , respectively. Thus, we have in both cases.

The longest possible is when (so that ). Longest length is .

For any string with , we have so that . Thus, the shortest possible string is when . Thus, shortest length is .

b) The only string of length is the all string. Hence, there is just 1.

The number of string of length having is the number of ways to pick a place for the unique such a string must contain, of the available places; this number is

Now, for any such string with , there are of 's out of length . Thus, number of such strings is

Thus, total number of such strings is

c) If then the only possible way is ; thus, there is one such string, namely . Hence, .

If then the only possible ways are and ; thus, there are two such strings, namely corresponding to first way, and corresponding to second. Hence, .

In general, consider any string with . Then, we can get a string with by appending a to , because has same as . These are all strings that ends in . On the other hand, any string with , correspond in a unique way to a string with . Thus, . Thus, the recurrence is

d) The pattern is

extended infinitely.


Related Solutions

How many bit strings of length 8 if i. bit strings start with the bit 1;...
How many bit strings of length 8 if i. bit strings start with the bit 1; ii. bit strings end with the two bits 00; iii. bit strings either start with the bit 1 or end with the bits 00.؟
This is one question about 14-bit strings How many 14-bit strings that have more 0’s than...
This is one question about 14-bit strings How many 14-bit strings that have more 0’s than 1’s? How many 14-bit strings that have even number of 0’s? How many 14-bit strings that have no consecutive three 0’s in a row?
Recall that a 5-bit string is a bit strings of length 5, and a bit string...
Recall that a 5-bit string is a bit strings of length 5, and a bit string of weight 3, say, is one with exactly three 1’s. a. How many 5-bit strings are there? b. How many 5-bit strings have weight 0? c. How many 5-bit strings have weight 1? d. How many 5-bit strings have weight 2? e. How many 5-bit strings have weight 4? f. How many 5-bit strings have weight 5? g. How many 5-bit strings have weight...
1. How many 12-bit strings (that is, bit strings of length 14) start with the sub-string...
1. How many 12-bit strings (that is, bit strings of length 14) start with the sub-string 011? 2. You break your piggy bank to discover lots of pennies and nickels. You start arranging them in rows of 6 coins. How many coins would you need to make all possible rows of 6 coins (not necessarily with equal numbers of pennies and nickels)? 3. How many shortest lattice paths start at (4, 4) and end at (13, 13)? 4. What is...
Suppose that you pick a bit string from the set of all bit strings of length...
Suppose that you pick a bit string from the set of all bit strings of length ten. Find the probability that the bit string has exactly two 1s; the bit string begins and ends with 0; the bit string has the sum of its digits equal to seven; the bit string has more 0s than 1s; the bit string has exactly two 1s, given that the string begins with a 1.
Suppose that you pick a bit string from the set of all bit strings of length...
Suppose that you pick a bit string from the set of all bit strings of length ten. Find the probability that the bit string has exactly two 1s; the bit string begins and ends with 0; the bit string has the sum of its digits equal to seven; the bit string has more 0s than 1s; the bit string has exactly two 1s, given that the string begins with a 1.
find a recurrence relation for the number of bit strings of length n that contain the...
find a recurrence relation for the number of bit strings of length n that contain the string 10. What are the initial conditions? How many bit strings of length eight contain the string 10
Consider production function Q= L^3 * K^4 - L^2 (a) Determine the MRTS L,K for this...
Consider production function Q= L^3 * K^4 - L^2 (a) Determine the MRTS L,K for this production function (b) Does this production function have an uneconomic region? If so, describe the region algebraically. (Hint: your answer will be an inequality like this: K<5L)
From 1+K*L(s)=0 L(s) = 1/((s+1)(s+2)(s+10)) Solve for gain K where the root locus passes through the...
From 1+K*L(s)=0 L(s) = 1/((s+1)(s+2)(s+10)) Solve for gain K where the root locus passes through the damping ratio. z=0.176. With out Matlab. Please show all work. Note: I know we need to use some trig and the magnitude criteria but u cannot seem to figure it out. Thank you!
Consider a straight road of length L. A hospital is located at a point 0 <=...
Consider a straight road of length L. A hospital is located at a point 0 <= a <= L on the road. The hospital sends out an ambulance whenever an accident is reported on the road. If an accident occurs at a random point X that is uniformly distributed in the interval [0,L], find the distribution of the distance between the hospital and the point where the accident takes place.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT