Settings

Theme

Experiment: Mapping real numbers between 0 to 1 to natural numbers

smacpherson64.github.io

2 points by smac__ 3 years ago · 16 comments

Reader

gus_massa 3 years ago

You mapped the numbers between 0 and 1 that have a finite number of decimals, like 0.123123425736289

But there are many more real numbers between 0 and 1 that have an infinite number of decimals, like 0.1231234736876578632786278365782635879281987087420...

As jgreen says in a sibling comment, which number do you assign to 1/3 = 0.333333333333333333333333333333333333333333... ?

The result you got is well known but interesting, because it's unintuitive. Moreover with some tricks you can try to extend your method to all fractions, like 1/3, 5/7, 27/127, ...

The problem is that there are irrational numbers like pi, sqrt(2), ... and many other numbers that we have assigned no friendly name. Those "unfriendly" numbers are the actual problem.

  • smac__OP 3 years ago

    Again, excellent point! These numbers clearly show why* my reasoning is missing a rather large portion of this set.

    [edit] - fixed typo

    • gus_massa 3 years ago

      Too late, but I hope you see it. I only want to add a highlight.

      One you fix a finite set of symbols, let's say ascii [1], the amount of numbers you can describe with it with strings of finite length is different from the amount you can describe if you allow also infinite length.

      The difference between finite length and infinite length in this problem is very important.

      [1] I'm not sure about unicode /s

jjgreen 3 years ago

Which element of you tree maps to 1/π ?

  • smac__OP 3 years ago

    Excellent point! Thank you for showing the glaring flaw more to explore.

smac__OP 3 years ago

Each time I hear the argument, that real numbers between zero to one are a "larger" (nuanced) infinity than natural numbers, I want explore and see if it is possible to make a one to one mapping between these sets. This post is my attempt. It was a fun thought experiment.

  • GTP 3 years ago

    Interesting approach, but it has been proven by mathematicians (I'm not one) that the cardinality of the set of the real numbers between 0 and 1 is the same as the set of all the real numbers. I would suggest discussing your approach and your doubts with a mathematician, as when talking about infinities there is a lot counterintuitive stuff going on. Another commenter already pointed out a possible problem of your "mirror" method: you're relying in being able to read a number backwards. To do that, you need to know all the digits. But it doesn't work well with numbers with infinite decimal digits like pi or its inverse.

    • smac__OP 3 years ago

      > I would suggest discussing your approach and your doubts with a mathematician

      Great point, this is my attempt to do that. Truly, it may be an inefficient means, but it seemed like a simple approach. Also, it is fun, even when I am wrong. It means I get to learn something new and see from a different angle.

      > Another commenter already pointed out a possible problem of your "mirror" method: you're relying in being able to read a number backwards. To do that, you need to know all the digits. But it doesn't work well with numbers with infinite decimal digits like pi or its inverse.

      True, this is a glaring flaw in the current reasoning.

      Thank you for the thoughtful response!

  • onesphere 3 years ago

    If real numbers are more applicable to reality, then computer science should look for all the ways to calculate these numbers. Would this look like a “path integral” of real numbers?

neonskies 3 years ago

Not sure what's on the vid. Didn't watch it. But if I understand you correctly, the following is impossible as shown in Cantor's simple diagonalization argument:

> Follow each branch as deeply as possible counting all sub branches until there are no sub branches left.

  • smac__OP 3 years ago

    Good point, the depth first search algorithm is a bit lack luster for this case: 1 -> .1 2 -> .01 3 -> .001 4 -> .0001 5 -> .00001 6 -> .000001 . -> .0∞1

    I would definitely recommend not judging the quality of the video based upon the quality of my reasoning in the experiment.

    • neonskies 3 years ago

      > 1 -> .1 2 -> .01 3 -> .001 4 -> .0001 5 -> .00001 6 -> .000001 . -> .0∞1

      That would only count the rationals which you can definitely count off a carefully arranged matrix of rationals. But reals = rationals and irrationals and the irrationals are uncountable.

      • smac__OP 3 years ago

        You are definitely right, I missed quite a few numbers in this set. (Thank you!)

josephcsible 3 years ago

You've mapped from the decimal numbers (the subset of rational numbers where the denominator is a power of 10) between 0 and 1 to the natural numbers, not from the real numbers between 0 and 1 to the natural numbers.

onesphere 3 years ago

In order for each level to exclude numbers that have already been counted, each level would only be 9 numbers:

So if level = lambda n: 1-int(math.log10(1./n))

We only ever generate [‘.’ + ‘0’ * (level(n) – 1) + str(i + 1) for i in range(9)]

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection