How many bit strings of length $7$ either begin with two $1's$ or end with three $1's$?
$begingroup$
So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways
Second case (end with three $1's$): $2*2*2*2=16$
And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$
combinatorics discrete-mathematics
$endgroup$
add a comment |
$begingroup$
So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways
Second case (end with three $1's$): $2*2*2*2=16$
And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$
combinatorics discrete-mathematics
$endgroup$
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40
add a comment |
$begingroup$
So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways
Second case (end with three $1's$): $2*2*2*2=16$
And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$
combinatorics discrete-mathematics
$endgroup$
So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways
Second case (end with three $1's$): $2*2*2*2=16$
And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$
combinatorics discrete-mathematics
combinatorics discrete-mathematics
asked Apr 17 '14 at 0:11
athertonatherton
6561126
6561126
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40
add a comment |
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).
For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.
So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.
If these cases are not disjoint, then your answer is $44$.
$endgroup$
add a comment |
$begingroup$
You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
The correct answer is thus $44$.
$endgroup$
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f757111%2fhow-many-bit-strings-of-length-7-either-begin-with-two-1s-or-end-with-three%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).
For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.
So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.
If these cases are not disjoint, then your answer is $44$.
$endgroup$
add a comment |
$begingroup$
Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).
For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.
So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.
If these cases are not disjoint, then your answer is $44$.
$endgroup$
add a comment |
$begingroup$
Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).
For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.
So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.
If these cases are not disjoint, then your answer is $44$.
$endgroup$
Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).
For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.
So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.
If these cases are not disjoint, then your answer is $44$.
answered Apr 17 '14 at 0:18
ml0105ml0105
11.5k21538
11.5k21538
add a comment |
add a comment |
$begingroup$
You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
The correct answer is thus $44$.
$endgroup$
add a comment |
$begingroup$
You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
The correct answer is thus $44$.
$endgroup$
add a comment |
$begingroup$
You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
The correct answer is thus $44$.
$endgroup$
You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
The correct answer is thus $44$.
answered Apr 17 '14 at 0:14
jwsiegeljwsiegel
1,333510
1,333510
add a comment |
add a comment |
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.
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%2f757111%2fhow-many-bit-strings-of-length-7-either-begin-with-two-1s-or-end-with-three%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
$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40