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
New contributor
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
New contributor
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
16 hours ago
@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
16 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago
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
New contributor
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
New contributor
New contributor
New contributor
asked 16 hours ago
Noob Coder
63
63
New contributor
New contributor
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
16 hours ago
@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
16 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago
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
16 hours ago
@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
16 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago
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
16 hours ago
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
16 hours ago
@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
16 hours ago
@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
16 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Noob Coder is a new contributor. Be nice, and check out our Code of Conduct.
Noob Coder is a new contributor. Be nice, and check out our Code of Conduct.
Noob Coder is a new contributor. Be nice, and check out our Code of Conduct.
Noob Coder is a new contributor. Be nice, and check out our Code of Conduct.
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
16 hours ago
@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
16 hours ago
A similar problem (not a duplicate), with solution, can be found here: math.stackexchange.com/questions/3001026/…
– awkward
11 hours ago