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










share|cite|improve this question







New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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















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










share|cite|improve this question







New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • 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













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










share|cite|improve this question







New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|cite|improve this question







New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question







New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question






New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 16 hours ago









Noob Coder

63




63




New contributor




Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Noob Coder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • 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












  • @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















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Noob Coder is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















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






























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.










 

draft saved


draft discarded


















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.















 


draft saved


draft discarded














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





















































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







Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

ts Property 'filter' does not exist on type '{}'

mat-slide-toggle shouldn't change it's state when I click cancel in confirmation window