User blog:LittlePeng9/How many books are there?

Most people would answer “infinitely many”. This is partially true, as we can have book containing single “a”, book with “aa”, book with one trillion a’s. That’s because unrestricted books can be arbitrary long. But there is one thing which will make this infinity reduce to finite number – page numbering.

(Quick note: in August 2010 Google calculated that there were 130 million books in the world. Certainly finite number)

First of all, based on some tests I made, one page can contain 50 lines of text, with 85 characters each (on average). I’ll round it to 100. Most commonly there are 64 characters to choose from – 26 pairs of upper- and lowercase letters and 12 punctuation symbols. Page 0 contains book title, but, from axiom of extensionality, two books with same story, even with different titles, are considered equal. So 0th page is irrelevant.

Page number is usually written on lines below text. So, for example, as long as page number fits in one line, we have 49 lines to fill with text. If page number fills all lines there is no place for text, so we can ignore these pages. There can’t be any more pages, as we’d need more space than we have for page number. So page count is bounded.

All pages with number between 1 and 10100-1 have at most 100 digits, so they fit in one line. This gives exactly 10100-1 such pages. Each of them can fit 49 lines of text, or 4900 characters. Page numbers between 10100 and 10200-1 fit in 2 lines, leaving space for 4800 characters each. That is 10200-10100 pages, etc. By summing number of characters over all pages with number less than 104900 gives length of string of characters representing book. That is \(\sum\limits_{i=0}^{49} (10^{100(i+1)}-10^{100i})\cdot (49-i)\). Call this number N. To see how many different strings of characters we can have given that much space we take \(64^N\), where 64 is number of characters. This number is larger than \(64^{10^{4900}}\), so is a lot greater than googolplex. Think how many monkeys we would need to type all of them!

But is it all? What if we consider books with any given number of pages? Summing them will give much larger answer!