Hacker News new | ask | show | jobs
by aantthony 1275 days ago
If a set is countable, then there exists a mapping which is a one-to-one correspondence between the items and the natural numbers (that’s the definition of countable). This correspondence would always allow you to determine the “next” item (by converting to a natural, incrementing, then converting back). However there could be multiple mappings (sorted differently, for instance) and so it’s more specifically, whether it’s possible to have a next function.

In other words, there can be multiple next functions, but a set is countable iff there is at least one of them.

1 comments

Your definition would rule out finite sets. You don't need a bijection. A surjection from the natural numbers suffices.

In plain English, you need to construct an infinite sequence (a,b,c,d,...) which (i) consists of elements of a set S (ii) contains every element of S at least once - sometimes many times over. We also allow the members of this sequence to equal an exceptional value we denote with an asterisk: *. This is to take into account the possibility that S may be an empty set. Without this exceptional value, such a sequence cannot exist if S is empty. If S has at least 1 element, then we don't need the exceptional value.

I don't know if this means you can sensibly talk about a "next" element. The problem is that an element of S might repeat. What you're describing sounds equally like a total ordering. Assuming the Axiom Of Choice, every set has a total ordering, but the indices are not in general natural numbers, but may be ordinal numbers. You cannot in general exhibit such a total ordering, because anything proved using the Axiom Of Choice is merely known to exist, but cannot always be computed or constructed.

Ah, yes. The definition I tried to use was from Wikipedia, in full: "In mathematics, a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers." I missed the part where it said finite. Thank you for correcting that.

If you take your sequence construction, then by removing duplicates from the sequence, this new sequence would allow finding a "next" element.