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






















  • 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















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






















  • 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













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













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













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










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


















  • 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















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
});


}
});














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
















draft saved

draft discarded




















































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.




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

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?