2

Please forgive the lack of formal vocabulary.

Which set has a larger cardinality?

A) a set of all possible countably infinite strings with a finite alphabet of symbols.

B) a set of all possible finite strings with a countably infinite alphabet of symbols.

(And in case this is needed, the order of symbols matters, and repetition is allowed (otherwise A will have problems) )

*And another question in reply to a comment by Element118. Is B the same size as the the set of positive integers? I would guess that B is larger than the set of integers because the subset of B containing all strings with only one symbol would completely match-up with the integers, leaving all the other subsets of finite strings free from a one-to-one correspondence.

  • I think $A$ is bigger, it is possible to enumerate all the elements in $B$. – Element118 Dec 09 '15 at 03:30
  • @AndréNicolas I think the OP claimed B was countably infinite. – fleablood Dec 09 '15 at 04:42
  • @fleablood: When I made the comment, B) said an infinite set of symbols. After the edit, the comment is no longer relevant. – André Nicolas Dec 09 '15 at 04:45
  • Ah, fair enough. If it wasn't specified that it was countable then that is a very important distinction that must be specified. I never saw the post before the fix (and somehow I didn't see your comment right away.) – fleablood Dec 09 '15 at 04:51

2 Answers2

2

I like the question.

But the answer is simple and well known.

A) has cardinality $n^{\aleph_0} = 2^{\aleph_0}$ which is uncountable

B) has isomporphic to $Z\times....Z$ which has a 1-1 corespondence to Z which is countable.

A) has examples in infinite decimal expansions (which describe the reals) and formalized by $X_{i\in \mathbb N}[0,1]$ infinite length 2-ples which can be shown by Cantor's diagonal to be uncountable.

Meanwhile B) is the cross product of countable sets which, like the diagonal ordering of the rationals, can be shown to be countable.

fleablood
  • 130,341
0

You've found an injection from $\mathbb{N}$ to $B$ which misses "most" of $B$; however, this sort of intuition can be very misleading. For example, the map $x\mapsto x^2$ is a map from $\mathbb{N}$ to $\mathbb{N}$ which misses "most" of $\mathbb{N}$, but clearly $\mathbb{N}$ is not smaller than itself!

Indeed, $B$ is countable - consider the map $F$ from $\{$finite sequences of naturals$\}$ to $\mathbb{N}$ given by $$F(\langle a_1, . . . , a_n\rangle)=2^{a_1}3^{a_2}...p_n^{a_n}$$ (where $p_n$ denotes the $n$th prime).

$A$, by contrast, has the same cardinality as $\mathbb{R}$ (as long as you have at least $2$ symbols - with only $1$ symbol, $A$ is of course countable). This is a good exercise (hint: base-$n$ expansions . . .).

Noah Schweber
  • 260,658
  • There is a related combinatorial fact, that $a<b$ implies $a^b$ is bigger than $b^a$ - for example, $2^{100}$ is much larger than $100^2=10000$. The number $a^b$ corresponds to the set of sequences of length $b$ from an alphabet of size $a$, so you can view the result above as an extension of the finite case; of course, as with all intuitive arguments, your mileage may vary. – Noah Schweber Dec 09 '15 at 04:06
  • Is the non-intuitive equal size of B with the integers similar to the fact that even though there are infinite rational numbers between 0 and 1, the addition of the rational numbers between the other integers does not make the cardinality of rationals larger than the integers? Just adding the extra infinities of further spaces along the strings will not grant them a larger cardinality? – user297167 Dec 09 '15 at 04:21
  • Sure, it's similar in the sense that in each case, we have a "natural" injection from one set to another which is not surjective, and yet there is a bijection between the sets. I'm not sure what "adding the extra infinities" means, though - unless you're referring to the fact that $\aleph_0\cdot\aleph_0=\aleph_0$. – Noah Schweber Dec 09 '15 at 04:25
  • I think that is what user297167 does mean. I think realizing that the even numbers versus the natural numbers vs. the integers are the same cardinality is obvious to many (and not to others) because there is an obvious "scaling" mapping between them. However Z x Z or the rationals is not (to some; wasn't to me) as these clearly add an extra dimension and intuitively infinitely rather then merely finitely larger and require a 1 to $\infty$ mapping. Thus a higher cardinality. Such intuition, turns out to be dead wrong, but I think it's reasonable (albeit wrong) intuition. – fleablood Dec 09 '15 at 04:40