Bijection between ${0,1}^*$ and the natural numbers.
$begingroup$
So the tasks is to show that ${0,1}^*$ is countable.
So the idea that i am having is that each number can be mapped to it's own in decimal.
$f(1001)= 9$
$f(101)=5$
But what happens with all the string which start with zeros.
For example: $f(01001)=$? $f(001001)=$? $f(00000000001001)=$?.
Is my idea completely wrong? Any tips?
elementary-set-theory formal-languages natural-numbers
$endgroup$
add a comment |
$begingroup$
So the tasks is to show that ${0,1}^*$ is countable.
So the idea that i am having is that each number can be mapped to it's own in decimal.
$f(1001)= 9$
$f(101)=5$
But what happens with all the string which start with zeros.
For example: $f(01001)=$? $f(001001)=$? $f(00000000001001)=$?.
Is my idea completely wrong? Any tips?
elementary-set-theory formal-languages natural-numbers
$endgroup$
1
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
2
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17
add a comment |
$begingroup$
So the tasks is to show that ${0,1}^*$ is countable.
So the idea that i am having is that each number can be mapped to it's own in decimal.
$f(1001)= 9$
$f(101)=5$
But what happens with all the string which start with zeros.
For example: $f(01001)=$? $f(001001)=$? $f(00000000001001)=$?.
Is my idea completely wrong? Any tips?
elementary-set-theory formal-languages natural-numbers
$endgroup$
So the tasks is to show that ${0,1}^*$ is countable.
So the idea that i am having is that each number can be mapped to it's own in decimal.
$f(1001)= 9$
$f(101)=5$
But what happens with all the string which start with zeros.
For example: $f(01001)=$? $f(001001)=$? $f(00000000001001)=$?.
Is my idea completely wrong? Any tips?
elementary-set-theory formal-languages natural-numbers
elementary-set-theory formal-languages natural-numbers
edited Dec 29 '18 at 14:15
Angeld55
asked Dec 29 '18 at 14:11
Angeld55Angeld55
565
565
1
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
2
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17
add a comment |
1
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
2
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17
1
1
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
2
2
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Hint: Consider the map ${0,1}^* to mathbb N$ given by $w mapsto (1w)_2$.
This assumes that $0 notin mathbb N$. If $0 in mathbb N$, use $w mapsto (1w)_2-1$.
$endgroup$
add a comment |
$begingroup$
You can do this trick. Instead of sending each sequence in ${0,1}^star$ to it's decimal try to first add the digit $1$ at the beginning and then send it to it's decimal (i.e. if you begin with 01 you change it to 101 which is 5 in decimal). That's how you will overcome the zeros problem.
$endgroup$
add a comment |
Your Answer
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%2f3055881%2fbijection-between-0-1-and-the-natural-numbers%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$
Hint: Consider the map ${0,1}^* to mathbb N$ given by $w mapsto (1w)_2$.
This assumes that $0 notin mathbb N$. If $0 in mathbb N$, use $w mapsto (1w)_2-1$.
$endgroup$
add a comment |
$begingroup$
Hint: Consider the map ${0,1}^* to mathbb N$ given by $w mapsto (1w)_2$.
This assumes that $0 notin mathbb N$. If $0 in mathbb N$, use $w mapsto (1w)_2-1$.
$endgroup$
add a comment |
$begingroup$
Hint: Consider the map ${0,1}^* to mathbb N$ given by $w mapsto (1w)_2$.
This assumes that $0 notin mathbb N$. If $0 in mathbb N$, use $w mapsto (1w)_2-1$.
$endgroup$
Hint: Consider the map ${0,1}^* to mathbb N$ given by $w mapsto (1w)_2$.
This assumes that $0 notin mathbb N$. If $0 in mathbb N$, use $w mapsto (1w)_2-1$.
answered Dec 29 '18 at 14:17
lhflhf
168k11172404
168k11172404
add a comment |
add a comment |
$begingroup$
You can do this trick. Instead of sending each sequence in ${0,1}^star$ to it's decimal try to first add the digit $1$ at the beginning and then send it to it's decimal (i.e. if you begin with 01 you change it to 101 which is 5 in decimal). That's how you will overcome the zeros problem.
$endgroup$
add a comment |
$begingroup$
You can do this trick. Instead of sending each sequence in ${0,1}^star$ to it's decimal try to first add the digit $1$ at the beginning and then send it to it's decimal (i.e. if you begin with 01 you change it to 101 which is 5 in decimal). That's how you will overcome the zeros problem.
$endgroup$
add a comment |
$begingroup$
You can do this trick. Instead of sending each sequence in ${0,1}^star$ to it's decimal try to first add the digit $1$ at the beginning and then send it to it's decimal (i.e. if you begin with 01 you change it to 101 which is 5 in decimal). That's how you will overcome the zeros problem.
$endgroup$
You can do this trick. Instead of sending each sequence in ${0,1}^star$ to it's decimal try to first add the digit $1$ at the beginning and then send it to it's decimal (i.e. if you begin with 01 you change it to 101 which is 5 in decimal). That's how you will overcome the zeros problem.
answered Dec 29 '18 at 14:48
YankoYanko
8,4692830
8,4692830
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%2f3055881%2fbijection-between-0-1-and-the-natural-numbers%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
1
$begingroup$
What exactly is ${0,1}^{*}$ ?
$endgroup$
– Peter Melech
Dec 29 '18 at 14:14
$begingroup$
The set of all strings with the symbols 0 and 1
$endgroup$
– Angeld55
Dec 29 '18 at 14:16
2
$begingroup$
en.wikipedia.org/wiki/Bijective_numeration
$endgroup$
– r.e.s.
Dec 29 '18 at 14:17