How many binary strings of length 10 contains exactly two 01?

In summary, the conversation is about a question regarding how many binary strings of length 10 contain exactly two "01". One idea is to weld together 4 bits to 2 "01" and then counting the number of strings with at least 2 "01". However, this doesn't account for strings with more than 2 "01". Another idea is to represent any bit sequence as starting with a positive number of one digit, then a positive number of the other digit, and so on. This makes it easy to identify strings with exactly two "01". The solution involves finding the number of integral solutions to the equation x_1 + y_2 + y_3 + y_4 + y_5 + x_
  • #1
nille40
34
0
Hi all!
I'm in serious need of some help.

The question:
How many binary strings of length 10 contains exactly two "01"?

My idea was to weld together 4 bits to 2 "01". That way, there's [tex]\frac{8!}{2!}[/tex] strings with at least 2 "01". But there are a bunch of strings with more than 2 "01" in these, and these must be accounted for. How can I locate these?

Thanks in advance,
Nille
 
Mathematics news on Phys.org
  • #2
All right, think of it this way:

Any string of "0"s and "1"s can be thought of in the following way:

It starts with some positve number of one of the digits, then it is some positive number of the other digit, then the first one again, and so on...

Any bit sequence can be represented this way, and in this representation it is easy to identify whether it satisfies your constraint (exactly two occurences of "01")...

Once you do this, can you figure out how to count them?
 
  • #3
Hi! Thanks for responding!

You seem to be on to something, there... I don't understand it though...

The answer is this (not my solution):
First there's a string of 1:s, of length [tex]x_1[/tex], then a string of 0:s, [tex]x_2[/tex], [tex]x_3[/tex] 1:s, [tex]x_4[/tex] 0:s, [tex]x_5[/tex] 1:s, and finally [tex]x_6[/tex] 0:s. The part with [tex]x_2[/tex] 0:s and [tex]x_3[/tex] 1:s garantuees a "01", and the part with [tex]x_4[/tex] 0:s and [tex]x_5[/tex] 1:s garantuees the next "01". Since the length is supposed to be 10, this yields the equation

[tex]x_1+x_2+x_3+x_4+x_5+x_6=10[/tex]

The [tex]x_1[/tex] first 1:s and the [tex]x_6[/tex] last 0:s is just filling (??). Another way to put it is the number of integral solutions the equation has. By letting [tex]x_2 = y_2 + 1, x_3 = y_3 + 1, x_4 = y_4 + 1, x_5 = y_5 + 1[/tex], we get the equation

[tex]x_1 + y_2 + y_3 + y_4 + y_5 + x_6 = 6[/tex]

and the problem can be stated as the number of integral solutions to the above equation. According to the formula for unorganized selection with repetition, the number of solutions is

[tex]{11 \choose 5}[/tex]

English isn't my native language, so the lingo might be wrong. I hope it's not to fuzzy.

To be honest, I don't understand one single thing of this! This is really frustrating and I really, really hope someone can help me.

Thanks in advance,
Nille
 
  • #4
That answer is the direction in which I was trying to point you.

What parts of it don't you understand?
 
  • #5
Hmm... I think I'm beginning to understand this now...

Its impossible to model a sequence of more than two "01" with the equation

[tex]x_1 + \underbrace{x_2 + x_3 + x_4 + x_5}_{\ge 1} + x_6 = 10[/tex]

This I understand, pretty well. The next step though, is somewhat a mystery to me. I've realized that the formula used is
[tex]{n+r-1}\choose{n}[/tex]

But can't this formula be applied directly to the equation. Why the substitution [tex]x_2 = y_2 + 1, x_3 = y_3 + 1[/tex] etc?

And finally: where can I get more information about the formula? It's not part of the litterature I'm using.

Thank you very much for helping me!
Nille
 

1. What are bits in binary strings?

Bits are the smallest unit of data in a computer and are represented by either a 0 or 1. Binary strings are a sequence of these bits, with each bit representing a single character or instruction.

2. How are bits organized in a binary string?

Bits in a binary string are typically organized in groups of 8, known as bytes, to represent a single character. This is known as the ASCII (American Standard Code for Information Interchange) encoding system.

3. How many characters can be represented in a single byte?

A single byte can represent up to 256 different characters, including letters, numbers, symbols, and control characters.

4. Can bits in binary strings be used to perform mathematical operations?

Yes, bits in binary strings can be used to perform mathematical operations such as addition, subtraction, multiplication, and division. This is the basis of how computers process and store data.

5. How does a computer interpret bits in binary strings?

A computer interprets bits in binary strings based on the instructions given by the software or programming language being used. These instructions tell the computer how to read and process the bits to perform a specific task.

Similar threads

Replies
4
Views
908
  • Special and General Relativity
3
Replies
75
Views
3K
  • Calculus and Beyond Homework Help
Replies
2
Views
825
  • Computing and Technology
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Quantum Interpretations and Foundations
2
Replies
45
Views
3K
  • Beyond the Standard Models
Replies
1
Views
2K
  • Beyond the Standard Models
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Programming and Computer Science
Replies
9
Views
3K
Back
Top