# Weird cardinality q

• Feb 14th 2010, 10:23 PM
sfspitfire23
Weird cardinality q
A "book" is a finite string of characters from some finite "alphabet," such as the 128-character ASCII system. Is the set B of all possible "books" finite, countably infinite, uncountable?

Would it be finite as the product of two finite sets is finite?
• Feb 15th 2010, 03:41 AM
Nyrox
The set of all books $\mathcal B$ is countable. For simplicity, just to get the idea across, consider the alphabet $\{a,b\}$ with only two elements. You can then construct a bijection between $\mathcal B$ and $\mathbb N$ in the following way:

$a\mapsto 1$
$b\mapsto 2$
$aa\mapsto 3$
$ab\mapsto 4$
$ba\mapsto 5$
$bb\mapsto 6$
$aaa \mapsto 7$
...

The key observation is that, since the string is finite, there's only a finite number of books with a given string length.
• Feb 15th 2010, 05:13 AM
CaptainBlack
Quote:

Originally Posted by sfspitfire23
A "book" is a finite string of characters from some finite "alphabet," such as the 128-character ASCII system. Is the set B of all possible "books" finite, countably infinite, uncountable?

Would it be finite as the product of two finite sets is finite?

The books can be put in lexigraphic order (or can be generated in this order), and so the set of all books is countably infinite.

CB
• Feb 15th 2010, 08:01 PM
Drexel28
Quote:

Originally Posted by sfspitfire23
A "book" is a finite string of characters from some finite "alphabet," such as the 128-character ASCII system. Is the set B of all possible "books" finite, countably infinite, uncountable?

This looks awfully similar to the last question you posted.

Quote:

Would it be finite as the product of two finite sets is finite?
The product of two finite sets is evidently finite, but I don't see how that's relevant.