While science is not yet able to predict which of the many players in George R.R. Martin’s A Song of Ice and Fire will take the Iron Throne, it can pinpoint who the true hero of the epic series is. In “Network of Thrones,” a paper published in the April 2016 issue of Math Horizons, Macalester College associate mathematics professor Andrew J. Beveridge and undergrad Jie Shan doubly geek out: first by using network science to group the ASOIAF characters, and then by drawing conclusions from that research as to who is the most important. And the “winner” is… Tyrion Lannister!

“This is a fanciful application of network science,” Beveridge told Quartz. “But it’s the kind of accessible application that shows what mathematics is all about, which is finding and explaining patterns.” In short, network science shows how information flows from one point to another; in this case, Beveridge and Shan looked at which characters were most influential and most talked-about. Using the text for the third book, A Storm of Swords (because the narrative had “matured” and the characters were far-flung at this point in the story, they explained), they linked characters by how often their names appeared within 15 words of one another. That didn’t mean that the characters had to be speaking or even had to like each other; simply, that they were being brought into the narrative in some way.

Interestingly, the resulting social networks resemble the maps of Westeros, Essos, and the surrounding lands—if not an exact geographical match, it still represents how each of the main characters are working on their own machinations that link up in various ways:

Tyrion has the densest social network, followed closely by Jon Snow and (perhaps surprisingly) Sansa Stark. The researchers explain:

Acting as the Hand of the King, Tyrion is thrust into the center of the political machinations of the capitol city. Our analysis suggests that he is the true protagonist of the book.

Meanwhile, Jon Snow is uniquely positioned in the network, with connections to highborn lords, the Night’s Watch militia, and the savage wildlings beyond the Wall. The real surprise may be the prominence of Sansa Stark, a de facto captive in King’s Landing. However, other players are aware of her value as a Stark heir and they repeatedly use her as a pawn in their plays for power. If she can develop her cunning, then she can capitalize on her network importance to dramatic effect.

Those who might be miffed to not see Daenerys Targaryen make it to the top three may be mollified by this analysis of her still-considerable influence:

Meanwhile, Robert [Baratheon] and Daenarys stand out by overperforming in certain centrality measures. They provide a clear counterpoint to one another and return our attention to the Iron Throne itself. Robert’s memory unifies the crumbling network of the recent past, while Daenarys will surely upend the current network when she returns to Westeros in pursuit of the throne.