In September, 2009, while on a four-week writing retreat at the Ucross Colony in Clearmont, Wyoming, I came to a startling realization. The novel, The City of Devi, that I’d started nine years ago was hopeless—I needed to abandon it. No matter how I proceeded, I would not be able to tie up its myriad strands. I even had a mathematical proof of this fact!
Mathematicians all over the world will denounce this outrageous claim, so before facing math excommunication, let me qualify. What I mean is that I used a mathematical construct, a possibility tree, to arrive at my conclusion. Starting from any juncture of a novel, there are many paths along which an author can choose to take the plot, just like a player has several moves available at any turn in a chess game. To proceed, you have to think of not only these moves, but also the steps that might come immediately after, to envision the different ways the story (or chess game) might unfold. This leads to the tree-like structure shown in the figure—each sequence of connected branches (one per level) then represents a distinct storyline (or way in which the play might progress). Computer chess programs use such trees to algorithmically decide on the best strategy, while seasoned players might learn to proceed with such searches intuitively.

I essentially used such a tree to map out the different plotlines for my novel-in-progress. The setting was the near future, when the threat of doomsday impels the characters to take inordinate risks in searching for the ones they love. The first hundred pages or so were done—Karun had disappeared into the war-torn landscape of Mumbai, and his wife, Sarita, recounted their courtship and marriage in flashback as she set out to find him. I also had a good draft for the next hundred-odd pages: Jaz (Muslim, gay, buff, and irreverent) narrates the history of a past relationship while searching for his own lover. Now, amidst the wide open spaces of the colony at Wyoming, I had to figure out where to go from this base configuration. How would I lead Sarita and Jaz (who had by now teamed up) to Karun?
Unfortunately, at this point, I didn’t know if Karun was even alive any more, much less where he was, or what would happen if they found him. What I did know was that a goddess (Devi) figure, derived from a supposed Bollywood movie Superdevi, had appeared somewhere in the north of the city, promising to save Mumbai. Another ingredient I knew needed to be worked in was the villain Bhim, responsible for much of the carnage in the country. There were nebulous thoughts of an elephant as well.

OK, so let’s see how I proceeded through the various levels of my possibility tree, by looking at my actual notes from Wyoming. Level A was to decide why Karun (who worked at a research institute in South Bombay—called TIFR in these notes) had left for Bandra, in North Bombay. Possibility A1 was that Karun, being a scientist, needed protection, so the institute squirreled him away there. (But if so, why all this secrecy?) Possibility A2 was that he was running away from Sarita (named Sunita in an earlier draft) and Jaz. A3 depended on Karun being spiritually affiliated with a guru, who perhaps could be tied to the just-materialized Superdevi goddess. A4 involved Karun being marooned in Bandra by accident, not design. And the verdict? A1 was too sci-fi, A4 not dramatic enough, so I could simply terminate these threads. A2 seemed the most promising, but A3 could also have potential, so I would carry these two options on to the next level.

On to Level B on Page 2. By now (independently of whether I chose A2 or A3 in the previous level) Sarita and Jaz would have made it to Bandra, and I had to decide what happened next. I rejected possibility B1 (Karun awaiting them) almost immediately: the mystery of his disappearance needed to be prolonged. B2 also got quickly eliminated: visiting the Superdevi first would be anticlimactic—her presence was too intriguing, she needed to linger over the proceedings. Which left B3: Karun must be missing when they reached Bandra. But where had he gone? The next step, Level C, had only two options: either he was away for some other reason (C1), or he had gone to see the Devi (C2). C2 was clearly preferable, since the disparate strands needed to entwine.

But how, exactly? That’s what I considered in Level D, on Page 3. At this point readers might justifiably be disappointed by the lack of mathematical diagrams (surely that’s what this piece promised?). So instead of commenting on these choices, let me first illustrate how all the various possibilities so far can be plotted as branches of a tree.

Now that we have a respectable-looking tree established, let’s examine it. At the lower right corner, one can see that Level D is where the “guru” strand A3 finally met its demise. Both options D1 and D3 (described on Page 3) were too problematic—establishing a credible presence for the guru at this late stage in the novel would have required too much finessing, too much industry. This left A2-B3-C2 as the sole surviving feasible path. Initially, I selected D4 as the next step (see the arrow of approval on Page 3). However, I couldn’t quite convince myself (never mind the reader) that scientists would band together and march to the Devi’s lair in order to expose her as a charlatan. Option D2 had Karun making repeated trips to see the Devi (perhaps the TIFR lodge was on the same beach, and he got gradually drawn in). Except this would be physically impossible: with hundreds of thousands of people coming to glimpse the Devi, Karun would hardly be able to stroll through the crowds daily. Which left the villain Bhim to engineer the Karun-Devi union somehow (D5, D6). But wasn’t this the kind of contrivance more suited to a potboiler, not the literary novel I was (hopefully) writing?
The more I brooded about these and other Level D options, the more my confidence ebbed. Everything seemed too hackneyed or unconvincing or simply impossible. Even the plausible scenarios crashed and burned by Levels E or F. Which led to my revelation one fine Wyoming afternoon. The reason I couldn’t find a solution was because none existed!
Rather than throw me into a complete funk, this insight liberated me. I had done my duty not only as a writer, but also a mathematician: exhausted all possibilities. This story simply could not be completed—the proof smoldered on the notepad in front of me. I went for a cleansing hike, then returned to the studio and started a completely different novel.
Nicole, my literary agent, seemed to have trouble accepting my liberation. “All my other authors have always managed to work through such difficulties.” Clearly her lack of appreciation for my proof resulted from her not being a mathematician. To humor her, I promised to send over the unfinished manuscript, which she wanted to examine herself.
As I was tidying up the draft and compiling all my blocked plotlines for her, something unexpected happened. I noticed that my three main characters, Sarita, Karun and Jaz, formed a trinity just like Vishnu, Shiva, and Devi. A reflection of the very deities who’d lent their names to my trilogy of novels—how could something so obvious have eluded me! Suddenly, other trinities began to emerge: the geopolitical triangle of India, Pakistan, and China responsible for the nuclear threat unleashed on Mumbai, the three generations of quarks Karun researches as a physicist (which make up all matter). This resonance with the number three gave the novel the metaphorical depth it needed—one whose absence had stymied me. I suddenly sighted a future level shimmering in the distance—my characters had to come together, fuse quite literally.
It still took almost two years more to get to the end, but I had discovered the key. My Level X epiphany became a beacon to guide me, one that made it much easier to negotiate intervening levels of the tree. At each step, I now searched for the branch which could be extended towards my goal most convincingly. I felt optimistic enough to mail my agent the cartoon below soon after returning from Wyoming.

But what does this imply about my “proof?”—was it repudiated by the fact that I did complete my book eventually? Surprisingly, no. My possibility tree still communicated something essential: a warning that the story could not be satisfactorily completed under the conditions I was imposing. I had been too beholden to literary orthodoxy, too insistent that the narrative obey the strictures of reality. It was time to loosen these constraints, let the plot freely borrow from whatever genre it pleased: adventure, Bollywood, fantasy.
Letting go was harder than it might seem. At each subsequent level, I worried about how my genre subversion would be perceived. Two things helped. First, I had no choice—my “proof” had convinced me there was no other way. Second, even if I made a detour through uncharted territory, the trinity metaphor would remain solidly underneath—the heft it contributed was enough to reassure me. If anything, I needed to take the narrative even more over the top, to cue readers in on the game I was playing. Trains running off the tracks, sarees glowing in the dark, rescues on the backs of elephants—nothing seemed too outrageous once I broke free.
Instead of speculating whether readers (and critics) will go along for the ride, let me end by returning to the mathematics. Consciously or not, I suspect that most of us use such possibility trees. In fact, we’re wired to optimize, approximate, iterate—employ a whole bunch of mathematical techniques. After all, we’ve only developed so many tools to tackle analytic problems as human beings. For example, literary deconstruction has a clear algebraic analog: decomposition in terms of so-called “basis functions” (see my YouTube presentation for more on this). The names of these processes might change, and there might be enormous differences in the way we implement them, but the underlying ideas remain the same.