How Many Knots Exist? A New Computing Trick Is Untangling The Answer

Finding how many knots there are for a given number of string crossings was thought to be an impossibly complex task. Now, algorithm engineering is cracking it – and showing us how to solve other fiendishly intricate maths problems.

IT USED to be one of the most frustrating part of any journey on public transport. You squeeze your way past the other bodies, sit down and fish your earphones out of your pocket. You didn’t bother to wind up the wires into a neat loop the last time you used them, and so – sigh – you now need to spend the next 5 minutes untangling this knot. Thank goodness for the invention of wireless earbuds.

Knots aren’t just an everyday annoyance, though. They are also a source of endless inspiration for researchers. Take mathematician Benjamin Burton, who is fascinated by one simple question: how many knots are there? “There is something tantalising about problems that you can describe to a 10-year-old, but that mathematicians have not yet solved,” he says.

Taking a census of knots is one of those problems that ought to be impossible to solve because of its complexity. There are so many ways the strings can be crossed and looped that even the fastest computer could never catalogue them all. Yet Burton has been giving it a shot, and along the way he is showing that, with a few clever computational tricks, many maths problems that seem insurmountable might not be.

Knots and science have been, ahem, entangled for quite a while. In the dying decades of the 19th century, scientists were grappling with how to understand atoms. One hypothesis saw them as little vortices of fluid that became stable when knotted. Lord Kelvin, who went on to become the president of the UK’s Royal Society, was the first to suggest that each chemical element corresponded to a different type of knot.

The idea was abandoned after the discovery of the electron, but at the time it seemed vital to understand knots. Physicist Peter Guthrie Tait was the first to make a stab at creating a comprehensive list of them. Cards on the table: there are an infinite number of possible knots, because you can keep on adding extra knotty flourishes forever. The question mathematicians are interested in is more subtle. A defining feature of a knot is its crossing number, the number of times the strings cross. The question is, for a given number of crossings, how many different knots are possible? In 1885, Tait, working with mathematician Thomas Kirkman, considered all the knots with up to and including 10 crossings. Drawing them all by hand, he tabulated 364 configurations.

Try to go further and things quickly get a lot more difficult. As you allow more crossings, the number of possible knots rapidly increases. The last major extension to the knot tables was published in 1998. Mathematicians Jim Hoste, Morwen Thistlethwaite and Jeff Weeks recorded all the knots up to and including 16 crossings – all 1.7 million of them.

Going beyond this has, until recently, been unfeasible. To see why, we need to know a bit more about how mathematicians think about knots (see “When is a knot not a knot?“). Unlike real-world knots that are often pieces of string with loose ends, mathematical knots are closed. Imagine tying a knot in a piece of spaghetti, then melding the free ends.

Stretch, twist, bend

Mathematicians treat knots according to the rules of topology, a branch of geometry. These say that a knot remains fundamentally the same if you stretch, twist or bend the strands – but making cuts or new joins is a no-no. This leads to the concept of a prime knot, a knot that can’t be mathematically broken down into two or more simpler knots.

The job of tabulating knots, then, boils down to comparing elaborate tangles to see if they are really the same prime knot. Don’t underestimate how tricky this can be. For 75 years, two knots with 10 crossings were listed separately in tables. But in 1973, Kenneth Perko, a New York lawyer who had studied maths, realised that if you take the mirror image of one, you can manipulate it to become equivalent to the other. The knots are known as the “Perko pair”.

When dealing with millions of knots, the job of identifying doppelgangers becomes so time-consuming that even the fastest supercomputers shouldn’t be theoretically capable of it in a reasonable amount of time. Still, in 2019, Burton, who is based at the University of Queensland in Australia, decided the time was ripe to take a punt.

He knew there is a difference between a knot-sorting algorithm in the abstract and how that algorithm is implemented in computer code. The art of bridging this gap is known as algorithm engineering and Burton thought that with the right tricks, the problem wouldn’t be as hard as it seemed. “Part of what motivated me was creating a showpiece to see if the tools were good enough,” he says.

He began by setting a computer the task of dreaming up all the possible ways that strings can be knotted with up to and including 19 crossings. This is a comparatively simple task and the computer spat out 21 billion knot candidates after just a few days.

The job was then to check each knot was prime and distinct. This involves storing a full topological description of the knots in a computer’s working memory or RAM. A data set of 21 billion knots would require more than 1 terabyte of RAM to store, and computers with that amount are rare. To get around this, Burton made use of a software package he has developed called Regina. It can convert knots into “knot signatures”, strings of letters that capture each tangle’s defining topological properties. The signatures can be stored far more economically than a knot description. Plus, knots that are tangled differently but are really equivalent have the same signature, making it easy to weed out duplicates. Burton managed to whittle down the candidate knots to about 7 billion in a day.

This method wasn’t powerful enough to identify every last duplicate, however. Burton’s next tactic involved calculating what is known as a knot invariant for each candidate knot. Invariants are mathematical objects that capture the essence of a knot – if two knots have different invariants, they are different knots. Invariants are more powerful than signatures, but they are harder to compute: it would have taken Burton’s computer more than a year to calculate these for all the remaining knots. By sorting them into groups and running them on parallel supercomputers, he got through them in days. The pool was down to 370 million.

Burton also had to grapple with non-hyperbolic knots, an especially challenging category. But after several more rounds of sorting, the supposedly impossible became possible. Burton’s census extended the knot tables to cover everything up to and including 19 crossings. The final tally: 352,152,252 knots.

Ian Agol at the University of California, Berkeley, says he is impressed with the calculations. “It will likely be useful to mathematicians searching for knots with specific properties, or who have a knot that they would like to identify,” he says.

He and other mathematicians think that Burton’s work is also an impressive example of algorithm engineering. “This is a growing trend in pure mathematics, where computational methods are being used in more creative ways,” says Hans Boden at McMaster University in Ontario, Canada.

Lorries and cameras

There are plenty of practical problems where algorithm engineering is used to find efficient solutions to hard problems. Some of the most important are in logistics, where optimised routing can save time and huge sums of money. Others include working out how to cover a space with CCTV cameras. In many cases, a perfect solution is impossible to obtain in a reasonable time frame.

This is also the case when it comes to mapping complex evolutionary histories, particularly for plants and bacteria. Algorithms are used to link DNA data in phylogenetic trees, graphs that group closely related species more closely than distantly related ones. However, sometimes genes don’t pass down from parent to offspring, but rather through what is known as horizontal gene transfer from one species to another. Algorithms designed to map these transfers can be very slow.

One algorithm engineering hack to get around this involves parametrising data inputs to make them smaller. For instance, if you fix the number of potential mutations you are considering, the problem can be solved efficiently. Recently, Edwin Jacox, now at the University of California, Santa Cruz, and his colleagues applied this method to cyanobacteria phylogenetic trees. Cyanobacteria played a major role in Earth’s changing biosphere more than 2 billion years ago. The researchers developed a parametrised algorithm that rebuilds the cyanobacteria phylogenetic trees in just 15 seconds.

Whether it is reconstructing evolutionary trees or listing knots, it is clear than the toughest computing problems can be made tractable. “With algorithm engineering and heuristics, things that are slow in practice turn out to be remarkably, surprisingly fast,” says Burton. It means that even the trickiest problems don’t have to leave us in an inescapable tangle.

When is a knot not a knot?

Here is a problem that needs unpicking: if you pull at a messy tangle of wires, how do you know if it will just get more tangled or come apart into a simple loop? This is a problem mathematicans call “unknot recognition” and it is one we might soon solve. Unknot recognition fascinates mathematicians and computer scientists alike because it is part of the famous “P vs NP” question.

To see how it works, take the classic travelling salesperson problem, where we must work out the shortest route for a salesperson to visit a number of cities. If an algorithm designed to solve this problem doesn’t get exponentially harder as more cities are included, it is said to be “P”. This means it is solvable in reasonable – or polynomial, in maths speak – amounts of time. Once you have an answer, you need to check it is correct. If it is easy to check your answer, the problem is classed as “NP”. The big question for mathematicians is whether all NP problems are also P. This is one of the Millennium Prize Problems – answer it conclusively and you will win $1 million.

Unknot recognition dwells in the twilight zone of P vs NP. We already know that this problem is definitely “NP”, or easy to check. If your algorithm can produce an unknotted loop, you can immediately see it has worked. Mathematicians also think it is likely to be P, and we are tantalisingly close to proving it.

In 2014, Benjamin Burton at the University of Queensland in Australia developed an unknotting algorithm that, in practice, solves in polynomial time. His algorithm has held up “for every knot we’ve thrown at it so far”, he says. More recently, Marc Lackenby at the University of Oxford developed an unknot recognition algorithm that is “quasi-P” (which, in maths parlance, means “almost there”). It is unlikely to be converted into executable computer code because it is so complicated, but Lackenby is confident that a simplified version “is going to be genuinely practical”.

Showing that unknot recognition is both P and NP won’t solve the wider Millennium Prize Problem, though it could give us useful pointers. Still, it is an important milestone and mathematicians will be celebrating once we get there.

For more such insights, log into www.international-maths-challenge.com.

*Credit for article given to Larissa Fedunik*


Fields Medal 2022: Work On Prime Numbers And Spheres Wins Maths Prize

Mathematicians who have studied the most efficient way to pack spheres in eight-dimensional space and the spacing of prime numbers are among this year’s recipients of the highest award in mathematics, the Fields medal.

Mathematicians who have studied the most efficient way to pack spheres in eight-dimensional space and the spacing of prime numbers are among this year’s recipients of the highest award in mathematics, the Fields medal.

The winners for 2022 are James Maynard at the University of Oxford; Maryna Viazovska at the Swiss Federal Institute of Technology in Lausanne (EPFL); Hugo Duminil-Copin at the University of Geneva, Switzerland; and June Huh at Princeton University in New Jersey.

Kyiv-born Viazovska is only the second female recipient among the 64 mathematicians to have received the award.

“Sphere packing is a very natural geometric problem. You have a big box, and you have an infinite collection of equal balls, and you’re trying to put as many balls into the box as you can,” says Viazovska. Her contribution was to provide an explicit formula to prove the most efficient stacking pattern for spheres in eight dimensions – a problem she says took 13 years to solve.

Maynard’s work involved understanding the gaps between prime numbers, while Duminil-Copin’s contribution was in the theory of phase transitions – such as water turning to ice, or evaporating into steam – in statistical physics.

June Huh, who dropped out of high school aged 16 to become a poet, was recognised for a range of work including the innovative use of geometry in the field of combinatorics, the mathematics of counting and arranging.

The medal, which is considered to be as prestigious as the Nobel prize, is given to two, three or four mathematicians under the age of 40 every four years.

The awards were first given out in 1936 and are named in honour of Canadian mathematician John Charles Fields. This year’s awards were due to be presented at the International Congress of Mathematicians in Saint Petersburg, Russia, but the ceremony was relocated to Helsinki, Finland.

For more such insights, log into www.international-maths-challenge.com.

*Credit for article given to Matthew Sparkes*


Researchers investigate the veracity of ‘six degrees of separation’

Do you know someone who knows someone? We have all played this game, often to be amazed that despite the extreme scale of human society, random people can be linked through very small chains of acquaintances—typically, around six. Recently, a group of researchers from across the globe discovered that this magic of six degrees can be explained mathematically. The intriguing phenomenon, they show, is linked to another social experience we all know too well—the struggle of cost vs. benefit in establishing new social ties.

In 1967, a farmer in Omaha, Nebraska received a peculiar letter in his mailbox. The sender was Prof. Stanley Milgram, of Harvard University, and the intended recipient was one of his peers. “If you happen to know this person,” the message read, “please forward this letter to him.”

Of course, the chances of such a direct acquaintance across such a vast social and geographical distance—from Boston to Omaha—were extremely slim, and therefore, the letter further requested that if the recipient didn’t know the intended addressee, they should forward the letter to someone who might.

This letter was one of about 300 identical packages sent with similar instructions. The 300 independent letters began circulating across the United States in pursuit of a social pathway linking “Joe” from the farmlands of middle America with the academic hub of the East Coast. Not all letters made it through, but the ones that did recorded, for the first time experimentally, the familiar social paths—a friend of a friend of a friend—that connect American society.

Quite surprisingly, the paths were found to be extremely short. In a society of hundreds of millions of individuals, the experiment found that it only takes about six handshakes to bridge between two random people. Indeed, Milgram’s experiment confirmed what many of us sense intuitively, that we live in a small world, divided by a mere six degrees of separation.

As groundbreaking as it was, Milgram’s experiment was also shaky. For example, it did not count the letters that didn’t reach their final destination. Most letters never reached their destination in Boston. The few letters that actually did arrived through six steps on average. His findings, however, were reaffirmed in a series of more systematic studies: for example, the millions of users of Facebook are on average five to six clicks apart from one another. Similar distances were also measured across 24,000 email users, actor networks, scientific collaboration networks, the Microsoft Messenger network and many others. Six degrees kept coming up.

Hence, social networks of vastly different scale and context tend to feature extremely short pathways. And most importantly, they seem to universally favour the magic number of six. But why?

A recent paper published in Physical Review X by collaborators from Israel, Spain, Italy, Russia, Slovenia and Chile, shows that simple human behaviour—weighing the costs and benefits of social ties—may uncover the roots of this intriguing phenomenon.

Consider individuals in a social network. Naturally, they wish to gain prominence by navigating the network and seeking strategic ties. The objective is not simply to pursue a large number of connections, but to obtain the right connections—ones that place the individual in a central network position. For example, seeking a junction that bridges between many pathways, and hence funnels much of the flow of information in the network.

Of course, such centrality in the network, while offering extremely valuable social capital, does not come for free. Friendship has a cost. It requires constant maintenance.

As a result, the research shows, social networks, whether on or offline, are a dynamic beehive of individuals constantly playing the cost-benefit game, severing connections on the one hand, and establishing new ones on the other. It’s a constant buzz driven by the ambition for social centrality. At the end, when this tug-of-war reaches an equilibrium, all individuals have secured their position in the network, a position that best balances between their drive for prominence and their limited budget for new friendships.

“When we did the math,” says Prof. Baruch Barzel, one of the paper’s lead authors, “we discovered an amazing result: this process always ends with social paths centered around the number six. This is quite surprising. We need to understand that each individual in the network acts independently, without any knowledge or intention about the network as a whole. But still, this self-driven game shapes the structure of the entire network. It leads to the small world phenomenon, and to the recurring pattern of six degrees,” adds Prof. Barzel.

The short paths characterizing social networks are not merely a curiosity. They are a defining feature of the network’s behaviour. Our ability to spread information, ideas and fads that sweep through society is deeply ingrained in the fact that it only requires a few hops to link between seemingly unrelated individuals.

Of course, not only do ideas spread through social connections. Viruses and other pathogens use them, as well. The grave consequences of this social connectedness were witnessed firsthand with the rapid spread of the COVID pandemic that demonstrated to us all the power of six degrees. Indeed, within six infection cycles, a virus can cross the globe.

“But on the upside,” adds Prof. Barzel, “this collaboration is a great example of how six degrees can play in our favour. How else would a team from six countries around the world come together? This is truly six degrees in action!”

For more such insights, log into our website https://international-maths-challenge.com

Credit of the article given to Bar-Ilan University