News for hackers. Stuff that matters.
Re:How can some infinities be bigger than others? by karpierz on Wednesday April 19, 2023 @11:38PM (#35636087)
> (I believe) that's not true for the reals (someone correct me if I'm wrong about that).

It is also true for the reals. R^2 can be trivially mapped to R.

Here's one mapping from R to R^2:

Let b_{n} b_{n-1} .. b_0 . b_{-1} b_{-2} ...

Be the binary representation of the real 'x'. For example, if x = 2.5, then:

b_1 = 1

b_0 = 0

b_{-1} = 1

Have x map to the following value in R^2 (y, z) where

y = b_{n} b_{n-2} ... b_{0} . b_{-2} b_{-4} ..

z = b_{n-1} b_{n-3} .. b_{1} . b_{-1} b_{-3} ..

So 2.5 -> (0, 1.5)

1 -> (1, 0)

1.75 -> (1.5, 0.5)

etc.

Re:How can some infinities be bigger than others? by yarg on Thursday April 20, 2023 @12:58AM (#35636576)
> It is also true for the reals. R^2 can be trivially mapped to R.

> Here's one mapping from R to R^2:

That's the easy part. It's very easy to map R to R^2, the other direction not so much.

From my searches, based upon what other people said, the mapping is a surjection and not a bijection.

If that's the case, then either they don't have the same cardinality or I'm confused as to what cardinality actually is.

Re:How can some infinities be bigger than others? by ginnungagap on Thursday April 20, 2023 @05:17AM (#35637853)
There is no need to exhibit bijections, if you have an injection X -> Y and an injection Y -> X, then X and Y have the same cardinality. This is the statement of the Cantor-Schroeder-Bernstein theorem.

If you assume the axiom of choice it's enough to have surjections both way.

Re:How can some infinities be bigger than others? by yarg on Thursday April 20, 2023 @05:31AM (#35637917)
I get how you can map every value in R -> R^2, but I have yet to see any proof that there's a complete mapping in reverse.

For the most reasonable attempt at flooding a plane with R, I still end up with something where I can trivially define values {r0, r1} that do not map back to R.

Re:How can some infinities be bigger than others? by ginnungagap on Thursday April 20, 2023 @06:16AM (#35638121)
What are those trivially defined {r0,r1} for the "interleaving digits" map f:(0,1) -> (0,1)^2 defined by taking a real x in (0,1), writing its decimal expansion as

x=0.a1a2a3a4a5a6...

(always pick the nonrepeating decimal expansion in case x has two) and sending it to the pair (y,z) where

y=0.a1a3a5... z=0.a2a4a6...

(Using (0,1) is no issue since we can compose later with bijections (0,1) -> R)

Edit: I'm not sure why I cannot reply to your reply, but {π,π} is not even in (0,1)^2

Re:How can some infinities be bigger than others? by yarg on Thursday April 20, 2023 @06:23AM (#35638166)
{π, π} will generally do.

Sorry, didn't even look at the bounds - assumed things went to infinity.

Re:How can some infinities be bigger than others? by yarg on Thursday April 20, 2023 @01:36AM (#35636769)
As an example, try using a Hilbert curve to map {π, π} back onto R (and I mean π exactly, not π ± an infinitesimal).