Am I on the right path solving this problem from 11 n-bits?
up vote
1
down vote
favorite
So the problem is to find how many 11-bit strings will have no consecutive three zeroes.
I have used recurrence to solve this problem. I set $T(n)$ to be the number of strings of size n that there will be no consecutive three zeroes. If the firsst digit is filled with 1, then you get $T(n-1)$ that can be filled and then you get $T(n-2) and T(n-3)$ for the second and third boxes.
T1- 2 (can be either 0 or 1)
T2 - 4 (00,01,10,100)
T3 - 7 (991,010,011,100,101,110, 111)
Now is when I start adding up the previous three terms up
T4 = T1+T2+T3 = 13
T5 = T2+T3+T4 = 24
I keep doing this unitl I get to T11
T11 - T10 + T9+ t8 = 927 11 bit strings with no consecutive three 0s in a row
recurrence-relations
add a comment |
up vote
1
down vote
favorite
So the problem is to find how many 11-bit strings will have no consecutive three zeroes.
I have used recurrence to solve this problem. I set $T(n)$ to be the number of strings of size n that there will be no consecutive three zeroes. If the firsst digit is filled with 1, then you get $T(n-1)$ that can be filled and then you get $T(n-2) and T(n-3)$ for the second and third boxes.
T1- 2 (can be either 0 or 1)
T2 - 4 (00,01,10,100)
T3 - 7 (991,010,011,100,101,110, 111)
Now is when I start adding up the previous three terms up
T4 = T1+T2+T3 = 13
T5 = T2+T3+T4 = 24
I keep doing this unitl I get to T11
T11 - T10 + T9+ t8 = 927 11 bit strings with no consecutive three 0s in a row
recurrence-relations
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
So the problem is to find how many 11-bit strings will have no consecutive three zeroes.
I have used recurrence to solve this problem. I set $T(n)$ to be the number of strings of size n that there will be no consecutive three zeroes. If the firsst digit is filled with 1, then you get $T(n-1)$ that can be filled and then you get $T(n-2) and T(n-3)$ for the second and third boxes.
T1- 2 (can be either 0 or 1)
T2 - 4 (00,01,10,100)
T3 - 7 (991,010,011,100,101,110, 111)
Now is when I start adding up the previous three terms up
T4 = T1+T2+T3 = 13
T5 = T2+T3+T4 = 24
I keep doing this unitl I get to T11
T11 - T10 + T9+ t8 = 927 11 bit strings with no consecutive three 0s in a row
recurrence-relations
So the problem is to find how many 11-bit strings will have no consecutive three zeroes.
I have used recurrence to solve this problem. I set $T(n)$ to be the number of strings of size n that there will be no consecutive three zeroes. If the firsst digit is filled with 1, then you get $T(n-1)$ that can be filled and then you get $T(n-2) and T(n-3)$ for the second and third boxes.
T1- 2 (can be either 0 or 1)
T2 - 4 (00,01,10,100)
T3 - 7 (991,010,011,100,101,110, 111)
Now is when I start adding up the previous three terms up
T4 = T1+T2+T3 = 13
T5 = T2+T3+T4 = 24
I keep doing this unitl I get to T11
T11 - T10 + T9+ t8 = 927 11 bit strings with no consecutive three 0s in a row
recurrence-relations
recurrence-relations
asked Nov 19 at 10:11
Noob Coder
63
63
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50
add a comment |
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004745%2fam-i-on-the-right-path-solving-this-problem-from-11-n-bits%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The total number of 11-bit strings is $2^{11}$. Now, consider the ones that contains "000", We can count strings that has "000" by thinking of "000" as one bit a 9-bit string. Does this help?
– mathnoob
Nov 19 at 10:16
@mathnoob - that approach is full of pitfalls, and ends up much more complicated than the approach in the question. Try that approach with n=4 or n=5, for example. Accounting for all the double-counting is way more complicated than this approach.
– Daniel Martin
Nov 19 at 10:40
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
Nov 19 at 15:50