I haven’t read Anna Karenina.

I know, I know. It’s a giant of the canon. It’s an unparalleled telling of a woman’s rejection from Russian upper society by a hypocritical set of social mores. It’s my sister’s favourite book. It’s on my shelf, intimidating me with its combination of literary reputation and physical mass.

And yet, it is only really its heft and quantity of text that will really prove a timesink: drawn as it is from the realist tradition, it does exhibit a broadly linear narrative. The book’s structure follows the chronology of events presented – to undersell the brilliance of the work, it follows the model of history presented by Rudge in The History Boys: it is “just one fuckin’ thing after another”.

Consequently, we can expect to carry a coherent idea of the narrative through the novel, and finish the book with a clear mental timeline of plot events after a single reading.

There are other works for which this is less straightforward.

The earliest renowned temporally nonlinear novel is probably Laurence Sterne’s Tristram Shandy, whose rambling autobiographical structure whimsically bounces between various time disordered life events. However, it would take the modernist stream-of-consciousness crowd for nonlinear structures to really come into vogue, with Virginia Woolf’s Mrs Dalloway and James Joyce’s Ulysses representing definitive examples of early twentieth century scrambled chronologies.

Later writers took the relevant ideas in yet more experimental directions: Kurt Vonnegut’s Slaughterhouse Five works a time-travelling narrative within a time-travelling science fiction story. William S Burroughs’ Naked Lunch pursues a “cut-up” technique in which excerpts from pre-existing manuscripts are combined to create complex and shifting literary landscapes. Nonlinear narrative also has a long and storied use in film, which I am less well-positioned to discuss.

The question that arises is this: how many times is it necessary to re-read a novel before we have read the book’s events in fully chronological order? After two readings we will have seen all pairs of events in order, but here I examine the number of linear read-throughs necessary to encounter the complete series of narrative actions from temporal start to finish.

Consider a work of four chapters, labelled according to the chronology of their events, but which appear in the book in the order (“4”, “2”, “3”, “1”). After a first pass through the book, the reader can only immediately make perfect sense of chapter “1”, so it is considered as having been comprehended. This leaves chapters (“4”, “2”, “3”) in the second reading: after a second pass, the chapters “2” and “3” are understood, as we have already encountered chapter “1” and they themselves appear in sequential order. Chapter “4” was still a potential mystery to us, as we had not yet encountered the preceding three chapters in order beforehand. It thus takes a third reading for the reader to personally experience all of the book’s events in time order.

This is a strong demand on the reader (and contains an assumption about their lack of mental faculties), but it begets a nice statistics problem. And indeed, it may be necessary in certain circumstances: I cannot conceive that anyone would claim that they came to the end of Finnegan’s Wake (even for a second time) with a completely coherent chronicle of the events that had occurred. (Full disclosure: I confess that I haven’t once yet made it to the start).

The extreme examples are illustrative: Anna Karenina, with a completely linear structure, demands a single reading to encounter its events in order, whereas Julia Alvarez’s How the García Girls Lost their Accents is told in anti-chronological structure: the three main sections track backwards in time through the story of four Dominican sisters’ immigration to the United States. A strictly reversed timeline of N sections (please forgive the abstraction to a mathematical variable) would itself demand N forward readings before we have encountered the full series of events in time order, incrementally from the end of the book.

What of a randomised case, in which the N sections are uniformly randomly perturbed by the author? It transpires that the average number of necessary read-throughs is (N+1)/2, rather pleasingly the mean of the two extreme cases. Consequently, for a book with N sections we can expect to need to perform just over half of N number of readings. If we combine this with assuming that the amount of text in the book scales linearly with the number of sections, then we encounter a total O(N2) time investment asymptotically. Here I have introduced “big O” notation, in which constant multiplicative factors are discarded, and quadratic power of 2, which is to say that a book twice the length of another will demand four times the reading time for a fully chronological treatment.

⁂

A yet more outré use of nonlinear storytelling is B.S. Johnson’s The Unfortunates, an emotionally demanding work in which the protagonist psychologically addresses his friend’s death from cancer. The work comes as a “book in a box”, with a collection of unbound sections, only the first and last of which are labelled as such. Otherwise, the reader is expected to create their own random combination from the other 25 and experience their own individual story.

This is, I think, the most successful use of stochasticity in fiction that I have seen, with the randomness of the reading process matching the rotten genetic fluke of tumorigenesis. It may be to miss the point to read it more than once: fatalistically, we are dealt a single hand and are compelled to see it through to its inevitable end. Alternatively, perhaps the book is offering us the fantasy of a reshuffle that is denied to us in our bodily lives.

Either way, there remain statistics to be done: how many possible permutations exist of the chapters for the reader to explore? If we consider the first section in our personal permutation, we have one of 25 sections to choose from. For the second we have 24 left; for the third 23 remain, and so on. Multiplying together all of these options, we encounter N! possible combinations. The exclamation of the variable N is the factorial function, symbolising the complete product of N with all positive whole numbers less than N, i.e N(N-1)(N-2)…×3×2×1.

The factorial is an extremely fast-growing function: 5 sections produce a potentially manageable 5!=120 permutations, whereas 10 sections generate an intractable 10!=3,628,800 narratives for us to explore. The 25 interior sections of The Unfortunates result in a daunting 25!≈1.5×1025, or 1.5 septillion pathways. Consequently, the time-pressed reader has more reason to be intimidated by The Unfortunates’ box of dissociated pamphlets than any of the collage efforts of the cut-up crew.

⁂

Such factorial scaling is not confined to 20th Century avant-gardists: there exists an example of yet more powerful combinatorial literature from the 9th century BC. Specifically, the I Ching, or Book of Changes, is the oldest of the classic Chinese texts and presents an extraordinarily rich set of components for probabilistic synthesis.

It is drawn from an ancient Chinese tradition of divination (including plastromancy, or fortune-telling using burnt tortoise shells), designed to allow chance to provide the appropriate gem of wisdom for any given situation. Certain standard physically manifested random number generators were used, including yarrow sticks and sets of three coins. Their output would then select from one of 64 hexagrams, defined and represented by a series of six broken (yin) or unbroken (yang) bars.

Each of the hexagrams corresponds to a particular description, representing the parable of the moment for the querying reader. The use of six sticks to map to 26=64 components is already an impressive feat of literary engineering, but there is more yet to come.

The hexagrams can themselves be ordered and read as a complete work. There exist certain canonical orderings, most prominently the King Wen Sequence, structured in part by pairing each hexagram with its vertical mirror image or inverse. Indeed, recent scholarship has rediscovered how ancient established sequences are themselves driven by the mathematical elegance of the Fibonacci sequence and the golden ratio.

To take a less refined approach and consider all permutations equally, we can use a method identical to that used for The Unfortunates to conclude that there exist 64! ≈1.27×1089 possible ways of approaching the text. This number is substantially more than any estimate of the number of atoms in the universe: a result that is really quite striking, given that we started with just six binarily broken bars.

⁂

There exists a structurally similar project from the mid 20th century French Oulipo movement. Oulipo were a collective of writers and mathematicians interested in deconstructing the formal structures behind works of literature, gaining particular renown for their exploration of writing under self-imposed constraints.

Specifically relevant to this post is Raymond Queneau’s Hundred Thousand Billion Poems, in which ten carefully constructed sonnets are printed on consecutive, horizontally lacerated pages, which can be folded such that any line from any of the 10 poems can be included among the 14 lines with which the reader is presented. The idea is drawn from children’s picture books, in which different anatomical components can be combined to create amusingly absurd humanoid figures.

The question (and titular answer) presents itself as to how many possible combinations exist. Following a similar approach to our earlier analysis, we can start at the first line and observe a total of 10 possible options. However, unlike The Unfortunates, the choices are independent between lines, so the next line and subsequent twelve also present 10 options each. Taking a product again, we encounter the value of 1014=100,000,000,000,000: the hundred thousand billion of the title.

In more abstract terms, this suggests a scaling of O(N14) for the total reading time, where N is the number of component poems. This is a fast growing function, but is still drawn from the polynomial family, so the factorial scaling of The Unfortunates and the I Ching can still be expected to dominate for large N.

One wonders if we can go further by finding the solutions for the 1019 villanelles in the possible sequel Ten Quintillion Poems, although the villanelle form contains repeated refrains that violate the independence between lines, making the project impractical. The repetitions result in only 13 unique lines, so really the possible number of villanelles is bounded at 1013. Perhaps the Pocket Book of One Hundred Thousand Limericks would be the most productive next step.

⁂

Again drawing inspiration from works often considered children’s literature, my fondest memories of jumping narratives are drawn from the Choose Your Own Adventure series. The story is driven by decisions about the story presented to the reader at the end of each section, who then turns to the relevant page to continue, until they eventually reach one of multiple pages concluding with “The End”.

There exists a dedicated community concerned with analysing the structure present in these works (well reviewed here). The branching diagrams presented are familiar to computer scientists as random binary trees: mathematical objects presenting a distribution over tree structures with two choices at each division event. Each branching event (the circles) represents a decision page going to one of two story arcs, and each leaf (the squares) is one of the potential endings to the book. Both of these objects are considered “nodes”, or distinct locations on the tree.

It is possible to characterise properties of the stories immediately from this definition: we anticipate that approximately half of the nodes in the tree are “leaf” nodes concluding with “The End”, and the other half will be branching nodes presenting decisions. Consequently, we can conclude that a book with N e endings will have ~2N e p pages, where p is the average number of pages at each node on the tree.

The question again arises as to how many possible arcs there are in total: this can be achieved by simply summing over all the paths from the initial root to every leaf node. If we use a commonly used distribution of tree structures, we find that the average number of nodes to pass in an exhaustive reading scales as O(N log N), where N is the total number of nodes, and the “log” is the logarithm: a very slowly growing function, mostly known for its ability to decompose products into sums.

Consequently, we see that of all the unconventional narrative structures considered, Choose Your Own Adventure books generally have the least intimidating scaling for exhaustive reading. However, there exist some striking counterexamples, well represented in The Lost Jewels of Nabooti, the only relevant work that I could find at Foyles.

The front cover excitingly advertises that we can “CHOOSE FROM 38 ENDINGS!”: combining this information with the 131 observed story pages, we can use our work earlier to conclude an average of p=1.72 pages per node. More intriguingly, we observe an oddity in the tree structure on the back cover: a figure-of-eight structure leading from the bottom right of the structure to the top left, and from the left of the tree to the top right.

These are the corresponding events within the story:

We start in Boston, and receive a mysterious telegram from our cousins calling us to Paris in pursuit of the “Jewels of Nabooti”. We choose to fly to Europe (taking the first right division on the tree structure), and accept a lift from an unsettling stranger to a restaurant, where we meet “a tall, black man” called Molotawa who “looks like an athlete” and is from the “ancient Nabooti group”. He is soon chased out of the restaurant after accusations of theft. We are then bundled at gunpoint back into the car and strafed by machine gun fire during a high speed chase on the motorway. We gain the trust of our kidnappers, who explain the profound mystical power of the eponymous jewels. However, we soon grow cold feet and surprisingly talk ourselves into a flight back to the States (taking the route from the bottom right branch to top left). At this point our cousins inform us of our family’s intimate historical connection with the jewels, until a shotgun blast shatters the window, which motivates us to look up our P.I./adventurer friend Beech Muzwell. It emerges that he is busy climbing in the Hindu Kush, and so we are rushed back to Paris via the airport (left branch to top right), reinitialising the cycle.

We see that we can pursue this course indefinitely, bringing about an unbounded number of possible (albeit repetitive) stories to explore, and rendering our project of exhaustively exploring every storyline finally completely impossible. We find ourselves trapped in an infinite narrative lemniscate of subterfuge, intrigue and cack-handed representations of ethnic minority groups.

Maybe it’s time for the Tolstoy.