TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

2 点作者 smac__大约 2 年前

6 条评论

gus_massa大约 2 年前
You mapped the numbers between 0 and 1 that have a finite number of decimals, like 0.123123425736289<p>But there are many more real numbers between 0 and 1 that have an infinite number of decimals, like 0.1231234736876578632786278365782635879281987087420...<p>As jgreen says in a sibling comment, which number do you assign to 1&#x2F;3 = 0.333333333333333333333333333333333333333333... ?<p>The result you got is well known but interesting, because it&#x27;s unintuitive. Moreover with some tricks you can try to extend your method to all fractions, like 1&#x2F;3, 5&#x2F;7, 27&#x2F;127, ...<p>The problem is that there are irrational numbers like pi, sqrt(2), ... and many other numbers that we have assigned no friendly name. Those &quot;unfriendly&quot; numbers are the actual problem.
评论 #35727714 未加载
jjgreen大约 2 年前
Which element of you tree maps to 1&#x2F;π ?
评论 #35727469 未加载
smac__大约 2 年前
Each time I hear the argument, that real numbers between zero to one are a &quot;larger&quot; (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.
评论 #35727110 未加载
评论 #35727632 未加载
neonskies大约 2 年前
Not sure what&#x27;s on the vid. Didn&#x27;t watch it. But if I understand you correctly, the following is impossible as shown in Cantor&#x27;s simple diagonalization argument:<p>&gt; Follow each branch as deeply as possible counting all sub branches until there are no sub branches left.
评论 #35727606 未加载
josephcsible大约 2 年前
You&#x27;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大约 2 年前
In order for each level to exclude numbers that have already been counted, each level would only be 9 numbers:<p>So if level = lambda n: 1-int(math.log10(1.&#x2F;n))<p>We only ever generate [‘.’ + ‘0’ * (level(n) – 1) + str(i + 1) for i in range(9)]