display | more...


1 Introduction - What is Hundred Thousand Billion Poems?

«Hundred Thousand Billion Poems» is a 1961 book by Raymond Queneau. It consists of ten sonnets, printed and cut so that every line is a separate strip of paper. Given that every sonnet has the same rhyme scheme and sounds, it’s possible to mix-and-match lines from all sonnets.(Wikipedia contributors 2020b)

Since every sonnet has 14 lines and there’s 10 “base” sonnets, the number of potential different sonnets is:

  • For the 1st line, ten possible options,
  • for the 2nd line, ten possible options for each of the aforementioned ten options, raising the total to 100,
  • For the 14th line, ten possible options for each of the aforementioned options, raising the total to eq. 1

1014 = 100 000 000 000 000


Hence, the title of the book.1

This is certainly a mighty number. At one per second, you could read all of these poems in a bit over 3 million years (eq. 2). Not a lot, but certainly more than Homo sapiens has existed(Wikipedia contributors 2020a, 2020c), even with the most generous estimates.2

100 000 000 000 000 s (1 d/86400 s)(1 y/365 d) ≈ 3.17 × 106 y


2 Other combinatoric approaches for literary generation

Before continuing, I wish to say that I find this idea is wonderful and very much non-trivial. Writing 10 sonnets with the same rhyming sounds is no small feat, and it’s the most mechanical part of the process. The thought process that led to the author to propose this work is at the same time elegant and a concise commentary on the power of combinatorics, not just in the creative arts. From a very small set of initial parts, a large number of possible outputs can be not only created, but generated.

However, vast amounts of outputs are possible with much simpler mechanisms.

2.1 Binary choice tree

Observe, for instance, that:

log2(1014) ≈ 46.506


From eq. 3 we see that 47 binary decisions are needed to surpass the 1014 mark by quite the margin. So, if anyone would ever write a «chooseable path» novel3 with 47 fully independent paths, the result would have well over a hundred thousand billion endings (eq. 4)

247 = 140 737 488 355 328


However, just writing—or typing—that many endings could take a lifetime, and then some. There’s better ways of writing a small work that can generate lots of meaningfully different outputs.

2.2 Binary choice tree with a multiple-root system

Now, the first approach assumed a single, unchangeable protagonist, but what if there’s more than one? having a multitude of initial nodes—«roots»—can help prune the enormous tree to be written.

Let’s use the «Fighting Fantasy» series of books as a starting point. If (collective-) memory serves right, before diving into the story proper, one would create a character, complete with stats and then this avatar character would fight their way through perils and the result would be decided in part by the roll of a dice. For now, I will omit this random number generators and focus only on the protagonist character aspect.

If, instead of a single protagonist, the novel had two possible characters, then there’s no need for the 47 binary decisions (only 46), effectively cutting down the size of the tree by half.

By the same argument, if there are n different possible characters to the story, the tree can be cut down drastically, if n is large enough.4 Indeed, the «Fighting Fantasy» system allowed the protagonist to have three stats, each with a value 1–6 inclusive. So there’s 63 = 216 possible starting characters. This already reduces our binary choices to:

log2(1014/63) ≈ 38.75


Not bad! What if we used the Dungeons & Dragons system and removed some of its restrictions? Then we’d have six attributes with 20 possible values each,5 for a total of 206 = 64 000 000 starting characters, and the need for only

log2(1014/206) ≈ 20.57


…21 binary decisions. Much more doable.

2.3 Binary choices with joined paths

Writing 221 different paths is still beyond the possibility for mortals like me. An easier approach would be to get inspiration from a videogame.

You see, in «Bioshock Infinite» there comes a moment when you need to choose a necklace. After you make your choice, your companion takes it puts it on herself before continuing the story.

What difference does that necklace make? Well… none, really. The character’s animation is different depending on your choice, but beyond that there’s no other change that really affects the story.6 After Elizabeth takes the necklace everything else is the same.

How can this help? It informs us of another potential structure of our generator: a single start and a single end point, but along the way there are exactly n binary branches that are immediately joined together. Or, in ASCII art:


Thus, the path from beginning to end is relatively simple to write. The example above has 8 different paths without having to write an extended tree.

But this approach has its setbacks: Since the critical path is unavoidable, it runs the risk of becoming the sole focus of the story, rather than the 2n different paths.

How can one avoid this? I don’t know the answer for sure, but here’s an idea: the End could be a bit interactive, introspective and/or retrospective. The ending should be a bit open-ended, leaving the reader to ponder for themselves what is the possible next step for the protagonist.

Let me offer an example of both bad and good choices and ends with a toy model.

You come across a strange man on the road. He produces from his robes an apple and a golden coin, telling you that you can take any one of those. Which do you choose?

After some careful consideration, you take _______

As you continue your journey, you arrive at the Castle gates, but the guard insists that you can’t go in. «It’s too late!»—he says—«The gates open only during the day, unless you have something to offer, perhaps?»

You offer your {apple || golden coin} and, after some consideration, the guard steps aside and lets you in…

A bad writer would now describe the Castle and their inhabitants. This doesn’t take into consideration the choice that just happened and its implications. Sure, the protagonist had to give up something to get to safety, but what did it cost them?

Maybe offering up an apple is not such a bad thing. After all, the apple was also freely given to him and holds intrinsic nutritional value, something that can most likely be good for a guard having to stand post. But offering up a coin? That’s straight up bribery. Our protagonist, by offering up monetary goods, has tarnished their good name, which could spell doom if they believe in a tallying god that balances good and bad acts before passing judgment

A good writer would incorporate all these into their writing. Sure, the path might be the same one, but the inner workings of the protagonist–living through the reader’s mind and eyes—are not. With this minimal example, our hero can live through two different stories without the need to write millions of lines! A vast improvement over the naive approach.

3 A final note on meaningfully different results

Do I actually believe all that? Would I use these approaches to generate extremely large works of literature? Not at all. While the mathematical possibility is true, I believe these can easily create a tangled mess of poor literature.

The above exercises are a fun idea to consider, even the Hundred Thousand Billion Poems are an interesting thought to ponder, even as a recreation for the lazy brain. Devising a way of generating millions and billions of different outputs is a fun7 activity, good for all ages and a good challenge to anyone’s creative muscle.

But just how meaningfully different are all these outputs, really?

Just as an example, consider the following lines:

There once was a man from Nantucket
Whose cock was so long he could suck it.
He said with a grin,
As he wiped off his chin:

Sure, there’s a canonical last stanza, but can you think of another one? With some effort, a new one could be conceived.

How different is this new limerick from the canonical one?

In my opinion, not that much, unless the line is way, way better and funnier. Most of the funny imagery comes from the preceding lines. It’s easier to write a rhyming line than to write a good rhyming line. I propose that it’s even harder to write a good rhyming line that makes a significantly different limerick.

Sure, reading through 1014 sonnets might be impossible in a single lifetime, but I’m sure that with a good enumeration algorithm, one could get a good enough sample for most reading purposes.

And, as the earlier sections of this document show: it’s very hard to have a work have different results based on the «choices» made by the reader. In my toy example, there’s really only one path and one story. The «two different endings» goal is only achieved with a generous stretching of the word «goal», while also requiring some emergent narrative coming from the reader themselves. That, in my opinion, is cheating quite a bit. After all, I could write a very simple story with «a million endings» like so:

As Andy stepped out of his apartment that morning, he began pondering what could happen if, for instance, he hadn’t read about the Butterfly Effect last night…

How does this story end? By that lazy argument, there’s millions and billions of endings, but I, the writer, have not done my proper job in actually fleshing it out. I might as well have written:

As Andy stepped out of his apartment that morning, [Insert your ending here]8

The case for "highest theoretical output endings-to-lowest character count ratio" is, at this point, an exercise in vanity and bad mathematics. 'Tis a silly place, let's not go there.

References and Bibliography

Wikipedia contributors. 2020a. “Homo Sapiens — Wikipedia, the Free Encyclopedia.” https://en.wikipedia.org/w/index.php?title=Homo_sapiens&oldid=966296007.

———. 2020b. “Hundred Thousand Billion Poems — Wikipedia, the Free Encyclopedia.” https://en.wikipedia.org/w/index.php?title=Hundred_Thousand_Billion_Poems&oldid=939234371.

———. 2020c. “Timeline of Human Evolution — Wikipedia, the Free Encyclopedia.” https://en.wikipedia.org/w/index.php?title=Timeline_of_human_evolution&oldid=962415208.

  1. Well, the real French title uses the word milliard, which is the word for a one followed by nine zeroes 109 = 1 000 000 000 in places where the long scale number system is in place. Monsieur Queneau and the long-scale-world at large—including yours truly—use the word billion to refer to a one followed by twelve zeroes.

  2. Dating Homo sapiens is a tricky subject in and of itself, and not just because of the time-distance. But of all modern estimates, none of them place this species in a scale beyond a million years. See the Wikipedia articles in the Reference section for a fun read if you’re so inclined.

  3. «Choose Your Own Adventure», while descriptive, is also trademarked.

  4. Astute readers have already noticed that this approach isn’t fundamentally different, it’s still creating a tree, starting with a wider base; but it’s conceptually easier to manage it this way.

  5. Granted, under regular D&D rules, many of these characters would be severely underpowered. This hypothetical novel could either accommodate for the possibility of death at every choice or for the possibility that even an underpowered protagonist can get to the end (even if it’s a horrible death)

  6. The fact that this choice has little to no bearing on the larger narrative has an actual, larger place in the game’s story, but I won’t discuss it here. However, I wish to mention that «Bioshock Infinite»’s story deals with choices, actions, constants and variables and is an interesting piece to discuss. I recommend at the very least reading about it, if not playing it entirely. You might like it.

  7. For a nerd’s definition of «Fun», anyway.

  8. Not, not that ending, you sicko. This is meant for all ages!