Question

In: Advanced Math

An n-bit binary string is a sequence of length n over the alphabet {0,1}. How many...

An n-bit binary string is a sequence of length n over the alphabet {0,1}.

  1. How many n-bit binary strings are there?
  2. How many n-bit binary strings b1,…,bn are there such that b1b2≠00? In other words, how many n-bit binary strings don't begin with 00?
  3. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and b2b3≠11?
  4. How many n-bit binary strings b1,…,bn are there such that b1b2≠00 and such that b2b3≠01?

Solutions

Expert Solution

An -bit binary string is a sequence of length over the alphabet .

First Question: ( How many n-bit binary strings are there?)

The first term of an -bit binary string (a sequence of length ) can be filled by ways.

The second term of an -bit binary string (a sequence of length ) can be filled by ways.

The third term of an -bit binary string (a sequence of length ) can be filled by ways.

and so on upto th term of an -bit binary string (a sequence of length ) can be filled by ways.

Thus, there are -bit binary strings.        (Answer)

Second Question: ( How many -bit binary strings are there such that ? In other words, how many -bit binary strings don't begin with 00? )

The number of -bit binary strings such that is equal to

To calculate the number of -bit binary strings such that we fix and rest places can be filled by either or each. That means each places have two options.

Thus,

.

Therefore,

the number of -bit binary strings such that is equal to

.

Thus, there are number of -bit binary strings such that .         (Answer)

Third Question: ( How many -bit binary strings are there such that and ? )

Number possible ways to fill are, .

But for our case, cases are not possible since our requirement is and .

Thus there are remaining four cases .

And the rest places can be filled by either or each. That means each places have two options.

Thus,

There are -bit binary strings such that and .         (Answer)

Fourth Question: ( How many -bit binary strings are there such that and such that ? )

Number possible ways to fill are, .

But for our case, cases are not possible since our requirement is and .

Thus there are remaining five cases .

And the rest places can be filled by either or each. That means each places have two options.

Thus,

There are -bit binary strings such that and .         (Answer)


Related Solutions

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...
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...
Compression of a bit string x of length n involves creating a program shorter than n...
Compression of a bit string x of length n involves creating a program shorter than n bits that returns x. The Kolmogorov complexity of a string K(x) is the length of shortest program that returns x (i.e. the length of a maximally compressed version of x). (a) Explain why "the smallest positive integer not definable in under 100 characters" is paradoxical. (b) Prove that for any length n, there must be at least one bit string that cannot be compressed...
Recall that the set {0,1}∗ is the set of all finite-length binary strings. Let f:{0,1}∗→{0,1}∗ to...
Recall that the set {0,1}∗ is the set of all finite-length binary strings. Let f:{0,1}∗→{0,1}∗ to be f(x1x2…xk)=x2x3…xkx1. That is, f takes the first bit of a string x and moves it to the end of x, so for example a string 100becomes 001; if |x|≤1, then f(x)=x Also, suppose that g:{0,1}∗→{0,1}∗ is a function such that g(x1…xk)=0x1…xk (that is, gg puts an extra 0 in front of the given string, so for example g(100)=0100. Everywhere in this question we...
Design a transducer to convert a binary string into octal. For example the bit string 001101110...
Design a transducer to convert a binary string into octal. For example the bit string 001101110 should produce 156. Please complete the code to account for the 7 cases of 3 digit binary strings. //Function binaryToOctal takes a char array digits of length 3 //Pre: digits contains 3 binary digits. //Post: function returns the octal number equivalent to the 3 binary digits int binaryToOctal( char digits[], int 3){ int number; if(digits[0]=='0') if (digits[1]=='1') if (digits[2]=='0') return 2;//found "010" else return...
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.؟
Explain the theory of designing a m-bit by n-bit binary divider.
Explain the theory of designing a m-bit by n-bit binary divider.
Suppose |A| = n. How many symmetric binary relations are there on A?
Suppose |A| = n. How many symmetric binary relations are there on A?
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that...
Of all bit sequences of length 8, an 8-bit sequence is selected at random. Assuming that the probability of a bit being 0 is equal to that being 1, determine the probability that the selected bit sequence starts with a 1 or ends with the two bits 00.
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.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT