James Joyce’s Finnegans Wake has been described as many things, from a masterpiece to unreadable nonsense. But it is also, according to scientists at the Institute of Nuclear Physics in Poland, almost indistinguishable in its structure from a purely mathematical multifractal.

The academics put more than 100 works of world literature, by authors from Charles Dickens to Shakespeare, Alexandre Dumas, Thomas Mann, Umberto Eco and Samuel Beckett, through a detailed statistical analysis. Looking at sentence lengths and how they varied, they found that in an “overwhelming majority” of the studied texts, the correlations in variations of sentence length were governed by the dynamics of a cascade – meaning that their construction is a fractal: a mathematical object in which each fragment, when expanded, has a structure resembling the whole.

Fractals are used in science to model structures that contain re-occurring patterns, including snowflakes and galaxies.

“All of the examined works showed self-similarity in terms of organisation of the lengths of sentences. Some were more expressive – here The Ambassadors by Henry James stood out – others to far less of an extreme, as in the case of the French 17th-century romance Artamene ou le Grand Cyrus. However, correlations were evident, and therefore these texts were the construction of a fractal,” said Dr Paweł Oświęcimka from the Institute of Nuclear Physics of the Polish Academy of Sciences, one of the authors of the new paper Quantifying Origin and Character of Long-range Correlations in Narrative Texts.

Some works, however, were more mathematically complex than others, with stream-of-consciousness narratives the most complex, comparable to multifractals, or fractals of fractals. Finnegans Wake, the scientists found, was the most complex of all.

I am really one of the greatest engineers, if not the greatest, in the world James Joyce

“The absolute record in terms of multifractality turned out to be Finnegans Wake by James Joyce. The results of our analysis of this text are virtually indistinguishable from ideal, purely mathematical multifractals,” said Professor Stanisław Drożdż, another author of the paper, which has just been published in the computer science journal Information Sciences.

Multifractal analysis of Finnegans Wake by James Joyce: the graph shape is virtually indistinguishable from the results for purely mathematical multifractals. The horizontal axis represents the degree of singularity, while the vertical axis shows the spectrum of singularity. Photograph: IFJ PAN

Joyce himself, reported to have said he wrote Finnegans Wake “to keep the critics busy for 300 years”, might have predicted this. In a letter about the novel, Work in Progess as he then knew it, he told Harriet Weaver: “I am really one of the greatest engineers, if not the greatest, in the world besides being a musicmaker, philosophist and heaps of other things. All the engines I know are wrong. Simplicity. I am making an engine with only one wheel. No spokes of course. The wheel is a perfect square. You see what I’m driving at, don’t you? I am awfully solemn about it, mind you, so you must not think it is a silly story about the mouse and the grapes. No, it’s a wheel, I tell the world. And it’s all square.”

The academics write in their paper that: “Studying characteristics of the sentence-length variability in a large corpus of world famous literary texts shows that an appealing and aesthetic optimum … involves self-similar, cascade-like alternations of various lengths of sentences.”

“An overwhelming majority of the studied texts simply obey such fractal attributes but especially spectacular in this respect are hypertext-like, ‘stream-of-consciousness’ novels. In addition, they appear to develop structures characteristic of irreducibly interwoven sets of fractals called multifractals.”

Sequences of sentence lengths (as measured by number of words) in four books, representative of various degrees of cascading character. Photograph: IFJ PAN

The other works most comparable to multifractals, the academics found, were A Heartbreaking Work of Staggering Genius by Dave Eggers, Hopscotch by Julio Cortazar, The USA trilogy by John Dos Passos, The Waves by Virginia Woolf, 2666 by Roberto Bolaño and Joyce’s Ulysses. Marcel Proust’s À la recherche du temps perdu showed “little correlation” to multifractality, however; nor did Ayn Rand’s Atlas Shrugged.

The academics note that “fractality of a literary text will in practice never be as perfect as in the world of mathematics”, because a mathematical fractal can be magnified to infinite, while the number of sentences in a book are finite.

“It is not entirely clear whether stream-of-consciousness writing actually reveals the deeper qualities of our consciousness, or rather the imagination of the writers. It is hardly surprising that ascribing a work to a particular genre is, for whatever reason, sometimes subjective,” said Drożdż, suggesting that the scientists’ work “may someday help in a more objective assignment of books to one genre or another”.

Drożdż suggested today that the findings could also be used to posit that writers “uncovered fractals and even multifractals in nature long before scientists”. “Evidently, they (like Joyce) had a kind of intuition, as it happens to great artists, that such a narrative mode best reflects ‘how nature works’ and they properly encoded this into their texts,” he said. “Nature evolves through cascades and thus arranges fractally, and imprints of this we find in the sentence-length variability.”

Eimear McBride, whose multiple award-winning debut novel A Girl is a Half-Formed Thing is written in a stream-of-consciousness style, said she wasn’t taken aback by the results.

“It doesn’t surprise me that works described as “stream of consciousness” appear to be the most fractal. By its nature, such writing is concerned not only with the usual load-bearing aspects of language – content, meaning, aesthetics, etc – but engages with language as the object in itself, using the re-forming of its rules to give the reader a more prismatic understanding of the subject at hand. Given the long-established connection between beauty and symmetry, finding works of literature fractally quantifiable seems perfectly reasonable.”

But she added that she couldn’t “help being somewhat disappointed by the idea that the main upshot of this research may be to make the assigning of genre more straightforward”.

“Surely there are more interesting questions about the how and why of writers’ brains arriving at these complex, but seemingly instinctive, fractals?” she said. “And, given Professor Drożdż’s pretty inarguable contention that it remains unclear whether or not stream-of-consciousness writing does indeed reveal a deeper layer of consciousness, what distance this research may go to explain why some readers believe themselves to be experiencing exactly that while others have the opposite reaction?”