The post New AI is amazing at depixelating images — but it also highlights the problem of data bias originally appeared on the HLFF SciLogs blog.

]]>The algorithm, called PULSE, attempts to produce high-resolution images from pixelated portraits. It’s not the first time algorithms have been developed for the purpose of de-pixelating images, but PULSE does it a bit differently: it’s not ‘zoom and enhance’, it’s entirely another approach.

Instead of trying to see what colors would fit in each pixel, the algorithm actually produces new, original faces. PULSE is essentially a GAN — a Generative Adversarial Network, in which two different algorithms work in an adversarial fashion. In this context, one algorithm would produce an original face not belonging to any human, and the other algorithm tries to find differences between the pixelated image and the generated face.

In recent times, advances in this field have surged. You need only visit This Person Does Not Exist and click refresh several times — you’ll see just how eerily realistic these AI-generated faces can be. PULSE uses a somewhat similar approach, except it also compares the generated images with the pixelated image to produce a plausible, realistic portrait.

Even when facial features are barely recognizable, “our algorithm still manages to do something with it, which is something that traditional approaches can’t do,” said co-author Alex Damian ’20, a Duke math major.

However, there’s a catch: none of these faces are real. In other words, what the algorithm is producing isn’t a high-resolution version of the pixelated image, it’s a brand-new face that fits with the input data.

This means that it can’t, and shouldn’t be used for something like facial recognition or crime scene investigation. Instead, researchers say it could be used to complement satellite imagery and medical imaging, as well as microscopy and astronomy.

You can see the results for yourself here or by checking the published paper at arXiv. You can also check out the AI and use it yourself via GitHub, and this is where things get even more interesting.

As expected, when you expose an AI to the online world, people start testing and experimenting with it.

First, one of the study authors themselves played with the AI, generating a human image of the famous game character B.J. Blazkowicz, who starred in the famous Wolfenstein games. For millions of old-school gamers, it was a chance to see how the protagonist of several cult classics may have looked like in reality. It’s hard to imagine that a man like B.J. Blazkowicz could exist in reality, but if he did, that’s probably what he would have looked like.

But then, other people came across something weird. In some cases, the algorithm behaved weirdly. Here’s an example of the type of unexpected result:

Most people would look at the left picture and they’d see a pixelated photo of former US President Barack Obama. Yet, the image on the right looks nothing like Obama.

As mentioned, the faces don’t belong to an actual person so it was bound to generate some differences, but this is more than an isolated example: it’s a trend, Twitter users found.

Here’s another example, depicting a pixelated an unpixelated image of US Congresswoman Alexandria Ocasio-Cortez.

Twitter user Robert Osazuwa Ness posted another example, of his wife:

… and another one of actress Lucy Liu:

By now, you probably see the trend: the AI appears to have a bias in how it depixelates faces. Obviously the AI has no opinion or biases, so what’s going on?

The problem with any AI, or any data project really, is that it’s only as good as its input data. If you want to make good wine, you need good grapes, and finding the right grapes is challenging.

This is probably what’s happening here: the algorithm was trained with a specific dataset, and if most people in that dataset tend to look in a specific way, the AI is more inclined to generate images that fit these trends.

This data bias is an artifact of the dataset, and the authors themselves did not appear fully aware of it until it was pointed out.

“It does appear that PULSE is producing white faces much more frequently than faces of people of color,” wrote the algorithm’s creators on Github. “This bias is likely inherited from the dataset […] though there could be other factors that we are unaware of.”

At this point, it’s still too soon whether this is a shortcoming of the algorithm itself or an artifact of the training data, but the problem is surprisingly widespread in machine learning.

It’s actually a well-known problem in facial recognition: algorithms often work worse on non-white people. It’s not entirely clear why this happens, but an often-quoted NIST report found that even the best algorithms still struggle with this.

Data bias can be a major pitfall of machine learning, and it’s an issue that researchers need to be aware of, both for socially and technical reasons. These are just a few (potentially isolated) examples of bias, but there can be many more problem

Of course, the algorithm itself isn’t perfect, and could also be improved upon.

But in the grand scheme of things, it’s more important than ever to be aware of this bias and address it. This is an interesting and important study, highlighting both the potential and the shortcomings of current machine learning.

We’re experiencing an advent of AI, and while still in its infancy, the technology is taking major strides, so the earlier we can set it on a healthy course, the better.

The post New AI is amazing at depixelating images — but it also highlights the problem of data bias originally appeared on the HLFF SciLogs blog.

]]>The post The Five Bridges Puzzle originally appeared on the HLFF SciLogs blog.

]]>*There are times when I feel like I’m in a big forest and don’t know where I’m going. But then somehow I come to the top of a hill and can see everything more clearly. When that happens, it’s really exciting.*

A little over a year ago, I wrote here about the Seven Bridges of Königsberg puzzle and its mathematical history. Recently I was reminded of another bridge-related puzzle, which also has some interesting mathematics behind it

The image shows an arrangement of bridges, which can be used by the intrepid hero of the tale (pictured, top) to cross this river, via a pair of islands located in the center of the river. There are many ways to get from one side of the river to the other, and any subset of the five bridges might be used as part of such a crossing.

The set-up of the puzzle is as follows:

Last night, there was a ferocious storm in the area, which was sufficiently strong that it had a 50% chance of washing each of the five bridges completely away, so they’re impassable. Each bridge separately has a 50-50 chance of being destroyed, and our adventurer arrives at the river the following morning. Given the layout of bridges and islands, what is the probability that they’ll be able to find a route across?

If you’d like to take some time to go away and think about the puzzle, do so now.

**Crossing that bridge when you come to it**

There are several ways to approach this puzzle. You might begin by thinking about all the possible ways our brave explorer could get from one side of the river to the other. They could go down the left-hand side of the diagram, crossing to the left-hand island then over to the far side; they could do the same down the right-hand side; or they could cross the first bridge to an island, then move to the other island, then use the second bridge to finish the crossing, and there are two mirror-image variants on this route.

Since each bridge has a 50-50 chance of washing away, we can analyze each possible route across the river separately. For example, if the adventurer were to choose the route down the left-hand side of the diagram, crossing two bridges to get to the far bank, each of these has ½ chance of being intact, so the chances the route is passable can be calculated by p(top bridge is intact) × p(bottom bridge is intact) = ½ × ½ = ¼.

For the other two-bridge route, the same calculation applies, and for the three-bridge routes that involve crossing between the two islands, the probability is ½ × ½ × ½ = ⅛. Since any one of these routes being passable would result in our hero being able to cross, we could find the probability by adding together all the options – ¼ + ¼ + ⅛ + ⅛, which gives a total of ¾ (75%) chance.

However, this naive approach has some issues. For example, the case where none of the bridges get washed away, which would be included in all of these possibilities, has been counted multiple times. This also applies to several other combinations that involve only one, or even two bridges being washed away. So the actual probability will be less than 75% – since including them all separately will give an overestimate.

The thorough way to check all these overlapping possibilities is to list all the possible combinations of intact and destroyed, for each of the five bridges. Since there are five things with two possibilities for each, we should have 2×2×2×2×2 = 2^{5} = 32 combinations, which we could list.

Once we’ve written out all 32 combinations, we can consider that each of them occurs with probability 1/32 (since each of them involves five things each being in one of two equally likely states, so they all have the same probability). Then, we simply need to count how many of them contain an intact route between the two banks.

Doing so results in a total of 16 of the 32 possibilities resulting in a successful crossing – which means the probability is ½.

While the earlier route-based method gave the wrong answer, it can also be adapted – by carefully removing any overlap in the cases you’re counting (given that the bridges you need to travel that route are intact, what is the state of the remaining bridges?) and this also results in the same answer.

**The Puzzle With Five Bridges**

While this might seem like a straightforward probability puzzle, with not much interest, I first encountered it in an interesting context – alongside a second, similar-looking puzzle.

This is the Puzzle With Five Bridges:

A slightly different fearless adventurer, who travels by boat, is attempting to sail along this river. However, the bridges crossing this river are built too low for the boat and its passenger to travel underneath. Luckily for our explorer, there’s been a ferocious storm in the area, which was sufficiently strong that it had a 50% chance of washing each of the five bridges completely away, making it passable by boat.

What are the chances that our boat-based explorer can successfully navigate from one end of this section of river to the other?

I imagine you’re not naive enough to imagine these two puzzles are unrelated, but if you’d like to take a minute to think about how this one works, please do so now.

**Duplicate bridge**

With a little thought, it’s possible to see that this puzzle works in exactly the same way – the river is passable only if the correct subset of the bridges has been washed away, which means we can list all the possibilities and count them – and in this case, again 16 of them result in the river being open, and the other 16 block the route.

These puzzles are very similar – and in fact, it’s worse than that. If we draw a diagram of the routes the boat can take (sections of river they’d sail along if the corresponding bridge were to have been washed away), it actually looks exactly the same as the network of bridges. The two networks look exactly the same, containing the same arrangement of points connected in the same way.

The other crucial point to note here is that the 16 cases in which the boat-based adventurer is successful are exactly those in which our land-based explorer fails – if you can get through in a boat, there must be an unbroken line running along the river between the two banks, which means the land-lubber won’t be able to find a way across. So there are two situations here, each of which has a probability that can be calculated in the exact same way, and which are mutually exclusive – one succeeds exactly when the other fails.

So it’s much less of a surprise now that each of these scenarios is successful with probability ½ – they’re the answer to effectively the same question, and they can’t both succeed at once, so they must each happen half the time. Someone who shrewdly spotted this correspondence straight away might use this as a way to prove that the probability is ½, without even having to calculate it.

**Two sides of the same coin**

This kind of symmetry in probability occurs in other situations too. It’s implicit in the basic assumption that the probability of a fair coin landing heads or tails is 50-50. Neither of ‘heads’ or ‘tails’ is special, as far as the physics of coin tossing is concerned – they are equally likely, so they both end up being 50%.

Similarly, if I asked ‘what’s the probability of getting 5 or more heads out of 9 coin tosses’, you could consider it relative to the probability of getting 5 or more tails – one succeeds exactly when the other fails, and since each instance of heads or tails is equally likely, the probabilities overall are each going to be 50%.

It’s important to note that the requirement isn’t just that the two things are mutually exclusive – for example, it could be considered that if I buy a lottery ticket, there are only two possibilities – I either win or I don’t win – but that very much doesn’t make these things equally likely (sadly for me). I’ve seen this reasoning used before, and it does occasionally warrant a gentle reminder that that’s not quite how these things work.

One nice example of when symmetric probability does apply is in the following problem:

If I deal three cards from the top of a standard deck, what is the probability that the third card is a club?

Many people, faced with this question, would begin working out a series of probabilities – what the first and second cards could be, and if the first two cards are or aren’t clubs, how that affects the options for the third card. Tree diagrams might be employed, and numbers on the top and bottom of fractions would go up or down by one. But wait! This situation can be thought of much more simply if you step back and look at it symmetrically.

I could ask the exact same question but change one of the words – for example, clubs could equally be hearts, spades or diamonds. I could also ask about the first card, or the eighteenth, or the last card.

But in a shuffled deck, each card has an equal probability of being in any of the 52 places, and all clubs are equivalent for the purposes of the puzzle. This means that the chances of the third card being a club, however you choose to work it out, will still be ¼ – since if I’d said hearts, spades or diamonds instead, you could calculate it in exactly the same way, and each of these four options occurs exactly when the others don’t.

Symmetry is a powerful and elegant concept in mathematics, and it’s nice to see it pop up in other areas, like probability. Understanding a situation in this way – being able to step back and see the whole thing – might save you hacking through a forest of calculations, when you could climb above and see the way onward much more easily.

The post The Five Bridges Puzzle originally appeared on the HLFF SciLogs blog.

]]>Try it yourself -- it's a neat experiment. Read more

The post The mystery of why spaghetti never breaks in 2 pieces originally appeared on the HLFF SciLogs blog.

]]>The mysteries of science are truly worth appreciating and exploring. Is the universe infinite? Can we truly understand the human brain? Oh, and of course — why does spaghetti only break into 3 or 4 pieces?

It’s the question you never knew you wanted to answer.

Take a piece of dry spaghetti; don’t worry, you’ll still be able to cook it later, no waste. Grab it from both ends, and bend it more and more, until it breaks. How many pieces are you still left with? The answer (and I’ll bet you a carbonara dinner) is certainly not two.

Why does this happen?

The problem is not as trivial as it sounds. After all, spaghetti doesn’t have any particular physical property: it’s simply a long, brittle object, just like a million other objects — some of which we use for construction. Physicist Richard Feynman famously noticed this problem decades ago, and the problem has some implications for other branches of research, including physics, mathematics, and engineering. It was exactly these three branches that ultimately helped answer this puzzling question.

The first answers to this conundrum came in 2005 when French researchers described the breaking of thin brittle rods, spaghetti in particular. They found that when a rod is pushed past its breaking point, it sends ripples throughout the entire structure, and this almost always breaks the spaghetti into 3 or more pieces. But a team from MIT wasn’t happy with this solution. So they did what any responsible scientist would in this case: they built a spaghetti-breaking machine.

The machine showed that if you want to break spaghetti into exactly two pieces, you first need to twist it in a particular way, and then apply exactly equal force. This is where the machine came in handy: try as they might, researchers just couldn’t apply the force in a controlled way using their hands. The machine was able to show that any asymmetry in the applied force or the bending angle does not lead to the desired responses.

With all the parameters in check, they moved to the next stage: maths. They built a model of this entire process and, after some tweaks, were able to predict how any brittle rod with known parameters will break — an excellent combination of practical experiments and theoretical knowledge.

This may make for a fun party trick, but the conclusions reach far beyond spaghetti-breaking and have implications for understanding the fracture of 2D and 3D materials.

The reason why spaghetti breaks in two rather than four pieces when twisted is that the twist waves travel faster than the bend waves, which prevents stress from accumulating in the spaghetti (as would normally happen). This process can be relevant for construction materials, particularly in the event of an earthquake, and could allow engineers to better understand the breaking point of beams and rods in the case of such an event.

It’s also noteworthy that this finding only stands true for “classic” pasta — which is cylindrical in shape. The study does not apply for fusilli, ravioli, or other types of pasta.

“It will be interesting to see whether and how twist could similarly be used to control the fracture dynamics of two-dimensional and three-dimensional materials,” said co-author Jörn Dunkel, associate professor of physical applied mathematics at MIT, in a press release. “In any case, this has been a fun interdisciplinary project started and carried out by two brilliant and persistent students — who probably don’t want to see, break, or eat spaghetti for a while.”

*Important note: No spaghetti were harmed in the writing of this article, though hundreds of pieces were broken in the studies.

The post The mystery of why spaghetti never breaks in 2 pieces originally appeared on the HLFF SciLogs blog.

]]>The post Can we track the coronavirus outbreak without sacrificing privacy? originally appeared on the HLFF SciLogs blog.

]]>In the early days of the pandemic, back when it was still “only” an epidemic, the world looked in shock at the suppression methods deployed in China. Even South Korea, a country hailed for its remarkable success in containing the outbreak, used invasive surveillance technology to track people’s whereabouts and monitored card transactions to help break the chain of infection. Now, virtually every country is faced with a choice.

As the world is going through an understandable frenzy to control the COVID-19 pandemic, the lines of what is considered acceptable are shifting and blurring. After all, closing everything down for two months would have been a laughable idea in 2019, yet here we are.

Unfortunately, there are no simple solutions to this problem, and countries are realizing they are faced with a ‘trilemma’ — a dilemma where you have 3 options, but you can only pick 2. In this case, the options are:

- saving lives;
- reopen the economy as quickly as possible;
- ensure people’s freedoms and privacy.

The lockdown has proven effective at suppressing viral transmission, but you can’t lock everything down forever. Deploying technology to track the disease can be effective, but it can be invasive — and outright scary.

In Spain and Belgium, drones are telling people to stay home and wash their hands. In France and Romania, those leaving the house need a declaration stating their purpose for going out. In Poland, the quarantined must submit daily geotagged photos. Several contact tracing apps are being deployed to track people’s whereabouts using geographical data, with Israel’s app using repurposed terrorist-tracing protocols for this purpose. In the hands of authoritarian leaders, these tools might easily be turned to nefarious purposes and human rights organizations have highlighted this as a threat not only to privacy, but to civil rights and democracy in general.

So how can healthy democracies use technology to track the outbreak without infringing privacy?

I imagine we’ll be hearing a lot about contact tracing apps in the near future. “Manual” contact tracing has been used for a long time against infectious diseases. It is one of the methods that helped keep Ebola under control, for instance, and was also used against TB. But traditional contact tracing is time-consuming, expensive, and requires a large and well-trained team.

Contact tracing is typically used in the beginning stages of the outbreak because once the disease starts to spread throughout the entire community, it becomes almost impossible to keep track of all the cases — especially with a disease such as COVID-19, where many cases are asymptomatic. This is where Bluetooth contact tracing apps could come in to help.

As an alternative to apps that use geographical data to locate smartphone users, this type of apps uses Bluetooth as a proximity indicator and can preserve user privacy.

It works like this: the app sends out a signal that devices around it can pick up on (this signal can be anonymized and covered with a layer of cryptography). The app then records your proximity to other users, and if someone tests positive, everyone who was in proximity to that person gets an alert. But here, too, there are different takes on how this should be achieved.

The most important difference in regards to privacy is whether the data is centralized or decentralized. In a centralized app, the data is stored on an external server where it can be analyzed by health officials to trace elements of interest (such as who is likely to be a superspreader). This is the most straightforward approach, and probably the most effective one. But it also comes with risks: what if the database is used for other purposes, or what if it is broken into?

That will just not do, say Apple and Google. The two tech giants have teamed up in a rare example of collaboration to develop a decentralized app, where no data is stored externally — every contact recording is made directly on users’ phones. This leaves users in charge of their data, and even the developers themselves couldn’t say where the users are or who they are in contact with.

This approach goes a long way towards protecting user privacy, but since authorities don’t have access to a centralized repository, it could be more difficult to break the chain of infection and detect disease hotspots.

While several national apps have already been developed, the Apple-Google solution could easily become the largest player in the field, particularly as the tech companies are also working with national service providers for custom solutions. In a notable example, Germany initially announced its intention to produce a centralized app but has since shifted its stance due to privacy concerns and mounting social pressure. Instead, Germany will likely use the Apple-Google interface.

It’s a pretty weird turn of events that big tech companies seem more determined to protect user privacy than some governments though again, there are few guarantees that this data won’t be used other purposes (such as targeted advertising).

It’s not clear if decentralized apps will be as effective as centralized apps. In fact, it’s not clear if centralized apps are effective either — there is no precedent for deploying technology in this way. If we want them to have any chance of succeeding, they must first be downloaded by a substantial part of the population, and if we’re looking at early implementers of such apps, this is not an easy task.

But if sufficient people download such an app, privacy only becomes more important. Winston Churchill’s famous “Never let a crisis go to waste” comes to mind, and no doubt, authoritarian leaders are rubbing their hands looking at ways this technology could be used for their own purposes.

This is why it’s extremely important to ensure that such technology is not only based on the best epidemiological guidance but also respects cybersecurity and privacy guidance.

The European Union, which has the most stringent privacy rules in the world, has issued its own guidance toolbox about what contact tracing apps should and shouldn’t do. Among these recommendations, the EU stresses that any such technology should be “based on anonymized data”, “fully compliant with data protection and privacy rules”, and “dismantled as soon as no longer needed”.

The post Can we track the coronavirus outbreak without sacrificing privacy? originally appeared on the HLFF SciLogs blog.

]]>As well as writing for this blog, I have several other roles, all of which relate to communicating mathematics in some form. Part-time, I’m a freelance maths communicator, delivering talks and workshops as part of …

The post Lecturing in Lockdown originally appeared on the HLFF SciLogs blog.

]]>As well as writing for this blog, I have several other roles, all of which relate to communicating mathematics in some form. Part-time, I’m a freelance maths communicator, delivering talks and workshops as part of events and science festivals, and making videos for YouTube, appearing on TV and radio to explain bits of maths, and writing books, puzzles and online content to engage people with mathematical ideas. The rest of the time, I’m a lecturer at Sheffield Hallam University in the UK, where I have been teaching some pure mathematics modules to undergraduates.

The effect of the coronavirus pandemic, and the resulting lockdown that’s been imposed to varying degrees by governments around the world, has been huge for many people. Those who can’t do their jobs from home have had major disruption to their lives, and those that can have had to adapt quickly and drastically to a new way of working – hours of video calls, learning how to use new software and hardware, and making do with cramped home ‘offices’ improvised on the dining table.

As someone who spent a fair amount of time before the pandemic working from home, that aspect of my work hasn’t changed much (except for the addition of a newly-working-from-home spouse, who uses the other end of the dining table and borrows my webcam sometimes). I was already familiar with video calling, as many of my colleagues live in other parts of the country, so we’d often catch up and plan events using video chats. I also already had, and was familiar with, plenty of the equipment needed to work online – having already made plenty of videos for YouTube.

One aspect of my freelance work that’s changed dramatically is the number of public speaking gigs – obviously, these have dropped to zero, but a few have had enough time to plan a switch to online, which means I’ve been preparing to deliver interactive video versions of what would have been an in-person hands-on workshop. This has involved a lot of rethinking of the way I’d deliver such a session, and educating myself about online learning.

This has also fed into my university teaching – in the lead-up to lockdown, when it was becoming gradually more apparent that the pandemic was a serious concern, and might require some kind of distancing action, I saw increasingly many articles and blog posts shared about how online teaching is different to in-person teaching, which I soaked up with interest.

Many universities in the UK switched to online teaching with relatively short notice – made worse by the fact that we’d just finished a period of strike action, which meant many hadn’t been in work for the previous few weeks, and there was a frantic scramble to go in to offices to collect materials before the university buildings officially closed. With a few weeks of teaching still to deliver, we had to hastily work out a plan and teach the remaining module content – without even knowing yet exactly how it was going to be examined or assessed, if at all.

Since this part of the teaching was clearly assembled without much prep time, it was not necessarily at the high standard we’d all have liked it to be. Many of our students were in a period of upheaval – moving back home, from their carefully crafted study environment at uni to a home life with potential distractions, different access to technology (I’ve had to post printed notes for the last few lectures to around a fifth of my second-year students, as they can’t access a printer) – and the same stresses and worries we’re all going through about the pandemic, their loved ones, and the future.

There will be some serious moderation occurring with this year’s exam results – UK school students have been told their GCSE and A-level grades will be determined based on their predicted grades. For many, this is based in part on the results of their mock exams (which I’m sure many of them would have prepared for better if they’d had an inkling this might be the case!). Some universities, including ours, are exempting first-year students from having to take any exams this year, allowing them to pass into the second year automatically.

For higher years, we’ll be comparing the results from the same modules last year, the students’ performance in previous years, and their performance in other modules this year, in what is likely to be a long and difficult exam board meeting, in order to determine fair grades – taking into account all the disruption they’ve faced to their learning and environment, and making sure the work they’ve put in is reflected in their results.

Beyond this year, the path is still muddy. The university isn’t able to commit to a decision yet on whether teaching in September is going to be business as usual (unlikely), entirely delivered online (a possibility) or a blend of both, with small group classes combined with online content. In the meantime, our only option is to prepare as though it’ll be entirely online delivery; discussions are ongoing about how extra hours will be allocated for this extra prep time, especially since the industrial action this year focused on too-high workloads as one of the main issues.

University management teams are often seen to make assumptions about the way teaching works, some of which are true of only some subjects (teaching maths is very different to teaching history, or chemistry, or art!) and some of which aren’t true at all.

An example of this is a push for increasing student numbers (to increase the amount of income from tuition fees) without adding additional teaching staff hours – if you can explain something to 30 students in a room, surely you can explain it to 100 students in the same way? Aside from this not making sense (when you factor in the time needed for marking, office hours and other associated admin, which definitely does increase with numbers!) it also fails to take into account that teaching a larger group needs different preparation, and different skills – and that if your goal is educationally sound, high-quality teaching, it takes more work to adapt this to larger groups.

A lot of this applies even more strongly to online teaching: not being able to see students’ faces makes a huge difference to the way I explain things: my usual approach is to see whether people look like they understand, and tailor my explanation and examples to the responses I get in the room. The sea of grey rectangles I face in an online classroom, only some of whom only occasionally make comments in the text chat, doesn’t give me this luxury.

Marking is also harder if you’re not being handed in physical copies of students’ work – staring at scans and PDFs on a screen for hours on end, and not being able to scribble a quick note in the margin, makes the whole process much more laborious and mentally draining – and I’m sure my students would prefer me not to be exhausted and cross-eyed when determining their grades.

Organisations like the Open University in the UK have offered distance learning courses for many years, which of late have made increasing use of online formats – but when they develop content, they spend years putting the materials together, and while they might cover the same topics as an in-person teaching course, they will need to be delivered in a different way.

Since the content we’re teaching was developed, planned and honed in face-to-face formats, it’s built for that environment and moving it to online versions is not as simple as just saying the same thing to a webcam instead of a room. For mathematics, students need to have time to work on problems and be able to ask questions, and they can learn a lot by talking to other students on the same table; all of these processes are stilted and awkward, or in some cases impossible, in an online video format.

The challenge of teaching online from September will be a big one, and the hours needed to develop the content and adapt it to the new format will be taken away from other crucial work. This will mainly be research, but in my case, one of my responsibilities in the department is the development of outreach activities, which has been completely sideswiped by the amount of time I’ve had to put into adapting my teaching and marking.

If universities want to be seen to be taking this problem seriously, they will need to build in structures to allow their staff to produce good-quality online and remote teaching content. It’s difficult since already tight budgets are likely to be reduced by lower student numbers – the big funding source represented by tuition fees from international students will sharply decrease – and staff are not working at peak efficiency, also trying to juggle caring responsibilities and high-stress levels.

The effects of this pandemic are wide-ranging and devastating for many, and the state of education is only one of many things on a long list of priorities – but for those of us who go to work because we want to share our love of the subject and support the next generation of mathematical minds, we’ve all got our work cut out, and our fingers crossed that this is something we’ll be able to do.

The post Lecturing in Lockdown originally appeared on the HLFF SciLogs blog.

]]>I recently found myself playing with a plastic sliding puzzle, of the kind that children often get as a gift from a party bag. It had an image on it, and 15 pieces that could …

The post A Puzzling Diversion originally appeared on the HLFF SciLogs blog.

]]>I recently found myself playing with a plastic sliding puzzle, of the kind that children often get as a gift from a party bag. It had an image on it, and 15 pieces that could be slid around to rearrange them into the correct picture. Such puzzles are not just a momentary diversion for small people – adults, and in particular mathematicians, have found this type of object fascinating, and it’s linked to some interesting mathematical ideas.

The general idea of such puzzles is that there’s a square or rectangular region you can move square pieces around in, and it contains one fewer piece than can fit in that space. This means there’s always a gap somewhere in the puzzle, and your options for a move each turn are to move one of the pieces next to that gap, into the gap.

Depending on where the gap is, this means there are either two, three or four options for which move to make on any given turn. Given a square puzzle with 16 spaces and 15 pieces, this gives a reasonable amount of challenge – puzzles with 9 spaces and 8 pieces also exist, and can be completed more easily, but the 15 piece version is a good level of difficulty.

The most mathematical version of this puzzle is of course to dispense with the idea of completing a picture – mathematicians don’t have time for art – and to instead number the pieces from 1 up to 15. The challenge is then to rearrange the pieces so they run in order from 1 in the top left to 15 in space next to the bottom right, with the gap ending up in the bottom right corner.

If you’d like to try this puzzle, and you don’t happen to have been to any children’s birthday parties recently, a version of it can be created using pieces of paper you move around on the table, making sure you only ever make valid legal moves; I’d recommend starting with a solved version and making moves to jumble it up, then going for a cup of tea and seeing if you can repair it when you come back. Alternatively, there’s an online version which will set puzzles for you.

This particular version of the puzzle, often called ‘The 15 Puzzle’, was invented in the 1870s, and became somewhat of a craze in America in the early 1880s, with versions of the puzzle being widely manufactured and sold as a curiosity.

As soon as mathematicians get their hands on this kind of puzzle, which can easily be abstracted to a mathematical structure, it opens up all kinds of interesting insights into how such things work. The 15 Puzzle is a nice example of a problem which can be tackled with **heuristics** – an area of maths and computer science concerned with finding efficient solutions to problems.

Commonly, heuristics involves finding a way to determine how difficult a particular problem is – to give sense of how many moves away from solved you are in a given state of the puzzle, and hence how ‘difficult’ that state is. A simple heuristic for the 15 Puzzle might be to count the number of tiles currently out of place – which is 0 for a solved puzzle, and gets larger the more pieces are out of place. This is easy to compute, but might not give you as much information as you’d like – it would be better to have some notion of how far we need to move the pieces as well.

We could use the conventional metric, or way of measuring distance: a ruler. Also known as the Euclidean metric, this involves measuring the straight-line distance between each square and the place it’s supposed to be in the puzzle. This isn’t quite what we need though, since in this puzzle moves must happen in straight lines, as the squares always stay on the grid.

Luckily, we have a metric for that too! Called the Taxicab metric, this measures the distance between two squares on a grid, essentially by counting the number of squares across and down to travel between the two squares (like a taxicab driving in a city with a grid system – there’s no diagonals to cut across). This will give the same value for any pair of squares, no matter which route you choose (assuming you don’t go out of the way).

For a more detailed heuristic for how difficult a particular starting state for the 15 Puzzle is, measure the Taxicab distance (across and down) from each tile to its correct position, and add them all together. This heuristic is known as an **admissible** heuristic – that is, it will give you a minimum number of moves needed, and any efficient solution will need at least that many moves.

The more moves you need to do, the harder the problem. Now you can judge how difficult different configurations are, and feel an appropriate amount of pleased with yourself when you solve them!

When the 15-puzzle craze was at its height, recreational mathematician Sam Loyd issued a challenge, with an associated $1,000 prize, to anyone who could find a solution to the puzzle from a particular starting state – with all the pieces in their finishing places, except that the 14 and 15 have been swapped. Called the ‘14-15 Puzzle’, this was a popular diversion, and caused quite some consternation among puzzlers.

The reason people found this so frustrating was that while switching two pieces seems like a simple change, it makes a big difference to how difficult the puzzle is to solve. I’ve written previously here about permutations – ways of reordering a set of objects, and assuming you consider the empty space to be a sixteenth object in this puzzle, you can think of all positions in the puzzle as being a permutation of those sixteen things (15 pieces and a space).

The crucial thing in this puzzle is that any move you make swaps two pieces (the piece you’re sliding into the space swaps with the space), and represents what we call a transposition: a permutation that just swaps two of the objects.

It’s known that any permutation can be made up from a combination of transpositions, which means in theory any position you start from should be possible to solve, if you chain the right transpositions together in the right order.

However, permutations divide themselves into two types – called **odd** and **even**. If a permutation is odd, it can be written as a combination of transpositions, possibly in multiple different ways – but any way you do this will involve an odd number of transpositions. Similarly, even permutations can only ever be written as a product of an even number of transpositions.

Since the solved version of the puzzle is zero transpositions away from solved – an even number – this means only even permutations of the pieces will actually be solvable. The 14-15 puzzle, exactly one swap away from solved, is clearly an odd permutation, and therefore impossible. Sam Loyd’s $1,000 was safe – although anyone who was keeping up with the latest mathematical literature would have known not to even try, as the impossibility of such a puzzle was proved and published in 1879 by Johnson & Storey, over a decade earlier.

Since I started writing this post, a Numberphile video has covered the topic, which looks at some of the impossible combinations; there’s also a video by James Grime from 2009 in which he offered $1,000 to anyone who can solve the 14-15 Puzzle, but then posted a follow-up explaining why it can’t be done – and giving some solvable starting positions you can have a go at.

The division of permutations into odd and even splits the universe of this puzzle in half – solvable starting states, and unsolvable ones. This kind of idea can be applied to other common puzzles as well – for example, the Rubik’s cube famously has over 43 trillion possible positions – but that’s only the solvable ones.

Any state you can reach by taking a solved cube and scrambling it should be solvable (eventually), but if you’re one of those people who cheats by taking the stickers off the cube, beware! Sticking the stickers back on in different places could potentially produce a state which can’t be reached from a solved cube – and the number of possible states reachable by moving around the stickers is significantly larger than 43 trillion, so your chances of guessing right, if moving the stickers around randomly, are tiny.

The easiest, and most fixable way to mess up someone’s Rubik’s cube is if it’s a specialist speed-cuber’s cube, and has flexible joints so the pieces can move around easily. Such cubes are often loosely connected enough that you can rotate one of the corner pieces, without even disconnecting it from the cube. To be clear, I’m not advocating this (if you’re in lockdown and at close quarters with a speed-cuber who holds grudges, it’s definitely not recommended) – merely stating the mathematical possibility.

Turning the corner piece three times puts it back as it was, but moving it once or twice will put the cube in an unsolvable state! This is from a smaller set of unsolvable states than you can get to by moving stickers, and can easily be fixed by rotating the corner piece back again – but not before providing some amusement (and frustration).

The post A Puzzling Diversion originally appeared on the HLFF SciLogs blog.

]]>The P vs. NP conjecture in complexity theory is one of the most prominent open problems in mathematics and computer science. There are many reasons for this. It is reasonably easy to get an intuitive …

The post Explaining the P vs. NP conjecture – a different approach originally appeared on the HLFF SciLogs blog.

]]>The *P vs. NP conjecture* in complexity theory is one of the most prominent open problems in mathematics and computer science. There are many reasons for this. It is reasonably easy to get an intuitive idea of what it states, it has many deep implications for everyday life in both science and society. Last but not least, there is a million-dollar prize, the *Clay Mathematics Institute, *offered to the one to finally solve it. Naturally, this inclusion to the selected group of *Millennium Problems* confirms the importance of the conjecture. However, throughout the years, it turned out to be a tough brain twister, a hard nut to crack for the most distinguished scientists in the area and there is still no solution in sight.

Being such an important issue among mathematicians, it undoubtedly is of significance to share and explain the meaning of the P vs. NP conjecture to the non-mathematical society. In this context, I hoped to find different and appealing ways to describe the conjecture. Looking for ideas, during the *7 ^{th} Heidelberg Laureate Forum* in 2019 I had a very interesting conversation with Stephen Cook – the father of this conjecture. Here I would like to share my personal conclusions on how to visually describe the conjecture. There will be an open problem for the reader at the end. 🙂

First, and perhaps in contradiction to the motivation of this article but ultimately necessary to ensure we are all on the same page, a brief description of what the P v. NP conjecture says. The conjecture is a statement about easy and difficult problems and how they are related. In mathematical language, we talk about classes, the P class and the NP class, which are both a collection of mathematical problems. One example of such a problem might be, “Given a group of cities and the distances between them, is there a way to visit each city once without traveling more than a given amount of km?” We say that the problem has a solution if there is an algorithm that describes a way of finding such a path. Naturally, the time the algorithm needs to obtain the solution will depend on the input, in this example on the number of cities you are considering. Some algorithms are more sensitive to size changes than others. The P class is the class of problems solvable in polynomial time, which means that the time the algorithm needs to find a solution can be expressed as a polynomial function, depending on the input size. We like these kinds of algorithms since they are not that sensitive to size changes and therefore we like these kinds of problems. Whenever we face a new problem, it is desired to find a polynomial time algorithm in order to include the problem in the P class. The NP class is a more general class. Here Cook makes an initial observation, explaining a common misconception: NP does *not* mean non-polynomial, which would be the opposite to the P class. NP stands for nondeterministic polynomial time and the class consists rather of all those problems for which we may not possess a polynomial time algorithm, but for which a positive answer to the question can be derived in polynomial time from a given certificate. In our example, if I give you a specific path that goes through all cities in less than the given amount of km, it would be quite straightforward to check that this path actually solves the problem: you confirm that the path goes through all cities and add up all the distances and there you go. This specific path is the certificate that gives us a positive answer. It is easy to see that the whole P class is contained in the NP class and the *P vs. NP problem* asks whether there are problems in NP that are not in P. In other words: is P strictly contained in NP or not?

Joan Miró’s work on the entrance of the Palacio de Congresos in Madrid (Image: Zaqarbal to wikimedia)

Now, how can we visually represent this problem? My first two approaches were quite descriptive, like putting into images what I just explained with words. The first idea was a Joan Miró fashioned Venn diagram. Joan Miró was a Spanish artist from the past century who interpreted the world mostly in terms of black lines and circles and colorful intersections. Many landscapes of his seem familiar and strange at the same time, which is parallel to visualizing a well-studied but open mathematical problem. Different circles and shapes would represent the different classes. This would also fit another observation by Cook: there are far more classes in this theory besides the P and NP class. In fact, there are more than 50 different classes which mathematicians are currently working on and just like with the famous pair, there is still work to be done concerning the relationship between the different classes. However, this was precisely the problem with this first approach: if we do not know the relationship between the different classes, how can we represent the problem like a Venn diagram?

Domino effect (Image: Ranveig to Flickr)

The second idea was, again, mostly descriptive, but referring to a different aspect of this theory. In fact, among the different classes, there is a particular one which is quite interesting to the P vs. NP conjecture. It is the* NP-complete class*. A problem is NP-complete if all other problems in NP can be reduced to it in polynomial time. The importance of this class is hidden behind the fact that if only one NP-complete problem is proved to be solvable in polynomial time, then immediately each problem in NP would have a polynomial time solution. In other words, this would prove that P=NP. So proving that just one such problem belongs to P, means that there would be no hard problems left. I picture a circular domino effect: no matter which piece falls, all other pieces would fall as well. So a circular domino sculpture would describe this fact very well. In addition to this, if the dominoes are glued to a platform, this would also make an further, hidden statement: it does not seem like the dominoes will fall at all. Cook himself joins the common scientific opinion, that P does not equal to NP. We will not find a loose domino.

The inscription Hic sunt dracones on the Hunt-Lenox Globe (Image: Rare Book Division, The New York Public Library)

However, as you may imagine, I was not satisfied with these two ideas. The reason for this is that they do not faithfully visualize what this problem represents for the mathematical community. What we feel when we think about it and what a solution to the conjecture would mean. If the known mathematics is a map, then conjectures like this one represent the limits of the known world. Something humankind wishes to know and understand better. We ignore what can be found behind these areas and the mere idea of facing them seems to be a perilous and foolish endeavor. And this is when I got another idea. The first world maps labeled unexplored territories with the inscription *Hic sunt dracones – Here be dragons, *together with the depiction of sea monsters and mythological creatures. Now, what is an open conjecture if not a mysterious, untamed monster waiting to be conquered? We might think that we understand it, but truth is that only the most skilled adventurers may have a serious chance against this beast. Here two observations by Cook come to my mind. The first is a personal anecdote he shared, telling me that he gets 1-2 emails per week from people claiming that they solved the problem (until now they appear to be unsuccessful). The second one is that he highlighted the great effort made by the most distinguished specialists in the area in order to solve the problem. In conclusion, it seems to be a hunt indeed. The glory that comes with a definitive answer to the P vs. NP issue is comparable to the glory of overcoming a beast in tall tales. So, behold the result of all these thoughts.

*Hic est draco*, ink and acrylic on paperboard, 2019, by Demian Goos

In classical medieval style, my monster is a mix of different real world animals. This can frequently be observed in tapestry all around Europe, where the artist creating the tapestry depicted strange and exotic landscapes without ever having visited them. Based on the description of the explorers, strange creatures emerged from this interaction. The inscription in Spanish, *This monster cannot be tamed in polynomial time*, is a reference to the problem I am depicting and follows Magritte’s style, which was the theme of the intercultural science-art project during the 7^{th} HLF. Naturally, this is a very personal interpretation of the problem. I hope you find it interesting and imagine that if this experiment was repeated by anyone else, the result would be entirely different. This, however, is an encouraging thought.

I would like to thank Stephen Cook for the time he spent discussing the conjecture with me. Here I presented a visual representation of P vs. NP, which does not mean that it is the only way of explaining a mathematical idea to the world. In this context, I invite you to join this initiative by

1) thinking of a song you like that could also represent the P vs. NP conjecture

2) thinking of a person of human history of any area you like (not necessarily a scientist) who could have had what it takes to solve the problem (if the person was a mathematician).

Please share your thoughts in the comment section. I am looking forward to reading them!

The post Explaining the P vs. NP conjecture – a different approach originally appeared on the HLFF SciLogs blog.

]]>Quantum computers promised to take the world by storm, and take computation power (and security) to new heights. Have they delivered? Read more

The post Quantum computers are knocking on our door originally appeared on the HLFF SciLogs blog.

]]>“I’m not saying that we are going to invent a completely new way of thinking and managing information. No,” — says Alessandro Curioni, Vice President of IBM, as he presented a new 53-qubit quantum computer in a room packed full of journalists.

He should know. Curioni is the director of the IBM research lab in Zurich, Switzerland, and recently announced what is believed to be the world’s strongest quantum computer, and one of the strongest overall computers in the world.

“The importance of quantum computing is it simply that it is able to take some of the very difficult problems that we have in computing — problems that have a computation complexity that is factorial,” he adds.

The qubit, as we shall see, is much more potent than the bit. It opens up tremendous opportunities not only

Quantum computers make use of quantum phenomena such as entanglement and superposition to perform computation. Unlike “traditional” computers, which use bits that can be either 0 or 1, *qubits* (quantum bits) can take on a number of superpositions.

Think of a qubit as a sort of Schrödinger’s cat. In the famous thought experiment, the cat was placed into the box and left there with a poison flask triggered by any radioactive decay. A radioactive atom with exactly 50-50% chances of triggering was installed. This means that until the cat is observed, it is *both *alive and dead, with both probabilities having 50% — it takes the quantum superposition of the radioactive atom. But when the cat is observed it is either alive *or* dead. Similarly, a classical bit is either a 0 or a 1 — you assign it to one state, and that’s that. A qubit meanwhile, is a coherent superposition of *both *0 and 1, based on a probability distribution.

Let’s take an example. If you have 64 classic bits, they can be either 0 or 1, so you have 2^{64} possible combinations. It would take a 64-bit computer centuries to cycle through all these possible values.

But since qubits can hold a zero, a one, *and *any proportion of both zero and one, an array of qubits can use this superposition to represent all the 2^{64} possible combinations at once (probabilistically), and extracting the desired configuration might be done much quicker.

Due to the way qubits work, quantum computers are well-suited to working on some types of algorithms, especially research algorithms. Simulating quantum phenomena, chemical interactions, or protein folding is one potential application. Cracking codes (or protecting them, as we shall see later) is another area of interest. So quantum computers might not become PCs

Of course, having a theoretical understanding of a quantum computer and actually building one are two different things.

Any two-level quantum system (photon, electron, nucleus, etc) can be used as a qubit. But in practice, this has proven extremely challenging. Qubits also need a universal gate set, and this gate set needs to be faster than the quantum decoherence time — otherwise, the information would be lost.

Building qubits that are scalable, easily read, and stable has seemed a nigh-impossible task for decades. However, in recent years, several research groups have claimed significant progress, including private companies like IBM and Google.

Last year, both mammoth companies laid claim to the world’s strongest quantum computer. IBM unveils its first commercial quantum computer, the 20-qubit IBM Q System One, which can be used by researchers in the cloud. Mere months later, IBM released another, bigger quantum computer, consisting of 53 qubits. Around the same time, Google published a paper claiming quantum supremacy with its own, 54-qubit quantum computer.

Although there was a little back-and-forth with the two companies trading jabs, this is still remarkable progress which suggests that working, scalable quantum computers might be right around the corner.

However, it will be a long time before you can play *Fortnite* on a quantum computer. Nana Liu, a quantum physicist at the John Hopcroft Center for Computer Science, believes that certain algorithms can be sped up on quantum devices — but that’s pretty much all we can hope for in the near future.

“The theoretical development of quantum algorithms is still in the exploratory stages and on the experimental side it’s at the very beginning,” Nana says. “But there are some promising results of demonstrating quantum supremacy in Google’s latest experiment in October 2019.”

In the near term, applications will be very limited, Nana tells me. Most would focus on quantum chemistry or quantum simulations. But as quantum computers become more robust, they could also accelerate search algorithms and machine learning.

Her view is shared by most researchers in the field. Although applications will be fairly niched, it’s exciting that already, we already seeing glimpses of what quantum computers can do.

“Recently, quantum computing has been focused on finding and solving near-term problems that are difficult or impossible to solve for a classical supercomputer,” says Corey Rae McRae, a postdoc in quantum computing at NIST Boulder. “Now that Google has been able to demonstrate the impressive ability of even a small-scale quantum computer, the field is looking to improve the scalability and performance of qubits by implementing lower loss and higher quality materials.”

Another important aspect of quantum computation is security. Quantum cryptography would make communication virtually unbreakable.

Think of it this way: in theory, at least, classical physical systems can be cloned entirely. But if you try to copy a quantum-encrypted message, you observe the quantum system which creates a modification. This will create an easily detectable disruption.

This type of technology is already being applied. Nana mentions the Chinese Micius satellite, a Chinese research project in the field of quantum physics. that set up the first international quantum cryptography service.

Quantum computing opens up truly exciting new avenues, potentially making for a true revolution in computing. It might be a while before we get there — but once we do, the rewards will be worth it.

The post Quantum computers are knocking on our door originally appeared on the HLFF SciLogs blog.

]]>The post Maths to get you through the coronavirus crisis originally appeared on the HLFF SciLogs blog.

]]>One way to stop the virus spreading is through social distancing, and many governments are advocating that while people are out and about they try to maintain a two-metre distance from each other at all times. This means in theory each person is surrounded by a circular region of radius one metre, and if we can move around in such a way that these regions do not overlap, we’ll always be 2m away from everyone.

This kind of problem is called disc packing or circle packing, and there are many well-understood results in this area. For example, the most efficient way to arrange discs on an infinite plane, to fit the most discs in the space and leave the minimum area not covered by discs, is to pack them on the vertices of a hexagonal grid.

As seen in the diagram, this is a very efficient way to fill the space, and leaves only around 10% of the space unused. It was proven by Joseph Lagrange in 1773 that this is the most efficient arrangement for circles of equal size.

So if you’re standing in a large open space with other people, and want to maintain your 2m distance, the most efficient arrangement for you to stand in is at the corners of a hexagonal grid – each person should have six people around them, and if your arms are 1m long, you should just be able to touch the fingertips of each of the people around you (although obviously, don’t do that). This will allow you to fit the maximum number of people in the park without breaking the rules.

However, this result only works in the case of an infinite plane. If the region in which you’re standing has a boundary – like the walls of a room – the most efficient way to pack circles becomes a lot more complicated. Depending on the size of the room relative to your 1m radius circles, you may find that a regular lattice arrangement doesn’t give you the greatest efficiency, and depending on whether your room is square or circular, some suggestions are given on Wikipedia.

Densest packing of eleven congruent circles in a circle The densest packing of thirteen equal circles in a square

These examples show the most efficient way to pack unit circles into the smallest possible shape, so the size of the room will affect your best option. In general, finding an optimal packing arrangement is achieved by trial and error using computer algorithms – so make sure you take your laptop with you to the shops, and find a quiet spot outside to do your computations before attempting to enter the room.

One major concern for people in many areas at the moment is a shortage of toilet paper. Whether you believe this is caused by unscrupulous hoarders buying more than their fair share, or simply the increase in demand caused by everyone now spending all day at home instead of using the bathroom at work, applied to an already fragile supply chain – it makes no difference if you find yourself sitting next to an empty roll on the holder.

One way to combat this might be to keep a good eye on how much toilet paper you have left, and this paper “How Long is My Toilet Roll? – A Simple Exercise in Mathematical Modelling” discusses a way to answer this question, by asking: if I have a partly-used toilet roll, and know the radius of the roll of paper that’s left, can I work out how long the paper is (and crucially, how many sheets I have left)?

Modelling this is fairly simple – if you assign variables for the inner and outer radius (from the centre of the roll to the cardboard tube, and from the cardboard tube to the outside layer of paper), the thickness of the paper, and the number of layers, you can construct an equation to find the answer.

It’s slightly complicated to model, since the paper can be thought of as being in concentric circles around the roll (even though it’s actually a spiral, the numbers are very similar) but the radius, and hence the circumference of these circles, increases as you go more turns around the roll. One way to model this, discussed in the paper, is to find the average radius of these circles – halfway between the smallest and largest it could be, and assume they all have this radius. Doing so gives an equation which simplifies to:

Length of paper = (2π × R × n) + (π × n² × h)

Here, R is the radius of the inner cardboard tube, n is the number of layers of paper wrapped around the tube, and h is the thickness of one sheet. To find the number of layers, you can measure the outer radius and divide by the thickness of one sheet. Now, where are my precision calipers?

Many of you may now find that as well as your usual work, which you might be continuing with from home, you also have the responsibility of looking after, and potentially providing education for, one or more small humans. It may be that you’re finding it hard to work out how to schedule your day, plan lessons and also get your work done.

This kind of problem is faced by administrators in schools, universities and even businesses all the time – matching up lecturers or teachers with students taking different combinations of classes within their course, and finding the right sized rooms to put them all in, while making sure no lecturer or student is timetabled to be in two different places at the same time.

Timetabling falls into the category of a constraint satisfaction problem – correctly encoding and applying all of the necessary constraints to a set of teachers, students, rooms and classes and finding an algorithm to solve it, or at least come up with an arrangement that’s good enough. It’s such a big deal that there’s even an International Timetabling Competition, in which people compete to determine whose algorithms are best or most efficient.

If you’re struggling with this kind of logistics, mathematics can reassure you – the problem of timetabling is well understood and studied, and falls into a category of problems classed as ‘NP’. This is part of a categorisation of the complexity of problems which falls somewhere between maths and computer science – the computational complexity of a problem boils down to how many calculations a computer would need to do in order to solve it, or to check that the answer you’ve found is correct.

There are two main categories of problems: P and NP. P includes all problems that can be solved ‘efficiently’ – such as, ‘take two numbers and add them together’ – since this is one calculation for a computer to do. Efficiency, in this context, has a strict definition: if the number of calculations can be expressed in terms of the size of the input as a polynomial, that is, if the size of the input is x, the number of calculations is something like x² + 2x + 4 – rather than e.g. growing exponentially.

NP is the set of problems that, if you have a solution to them, you can efficiently check that the solution is correct. For example, the problem could be ‘given this set of numbers, can you split it into N smaller sets such that each one has the same sum?’. If you have a solution, checking it is as simple as finding the sum of each set and checking they’re the same. But finding a solution to an NP problem might be more complicated – the number of things to check, or calculations to do, could be too big.

Whether a problem is P or NP is an important distinction in the theory of complexity – one of the major unsolved problems in maths, and one of the Clay Institute’s Millennium Prize Problems, is the question of P vs NP – do polynomial time algorithms exist for solving NP problems – i.e. are P and NP the same thing? If anyone can answer this question (we think the answer is probably ‘no’, but we’re not sure) there’s a million dollar prize waiting for them.

The problem of timetabling can be shown to be NP – it’s equivalent to partitioning a set into triples, which is NP (many problems can be shown to be NP by finding an existing NP problem that they’re equivalent to when you boil them down to their simplest statement, like ‘match up students and lecturers with time slots and rooms’). So if you’re struggling to schedule everything – even if your class is small, and your room allocation options are limited – don’t worry: anyone would find this hard, and you’re doing a great job.

The post Maths to get you through the coronavirus crisis originally appeared on the HLFF SciLogs blog.

]]>This month is Women in History Month, and 8th March was International Women’s Day. In celebration of all the brilliant women who’ve made mathematics what it is, here’s a celebration of mathematical firsts – pioneers …

The post Women Pioneers of Mathematics originally appeared on the HLFF SciLogs blog.

]]>This month is Women in History Month, and 8th March was International Women’s Day. In celebration of all the brilliant women who’ve made mathematics what it is, here’s a celebration of mathematical firsts – pioneers who changed history and paved the way for others to follow.

Using the links in this article, you can read much more about their lives and work on Wikipedia – and I include these links with special thanks to Jess Wade for her sterling work in improving coverage of female scientists and mathematicians on Wikipedia, and to anyone who has helped her in that goal.

Historical accounts are patchy, and obviously people did a lot of mathematics without leaving a record of it – but one of the oldest well-documented examples of a female mathematician is Hypatia of Alexandria, who lived in Alexandria from around 350CE. Being from a mathematical family, Hypatia was also a philosopher and astronomer, and was known to walk around the city in philosopher’s robes, giving impromptu public lectures.

She was considered to be a great teacher, and much of her work in mathematics was in the form of preserving existing maths texts and contributing commentary on the work of others, as was common for mathematicians at the time. She developed an improved method for long division for use in astronomical calculations, and showed people how to construct astronomical calculation devices like astrolabes and hydrometers.

She is also known to have written a commentary on Diophantus’ Arithmetica – a book of algebraic problems and their numerical solutions (you may remember Diophantine equations from our post around this time last year) – verifying the solutions and adding problems of her own. The number system in use at the time was sexagesimal – base 60 – and Hypatia used her own algorithm for division, which has allowed historians to determine which parts of the text she contributed.

Hypatia became embroiled in politics, acting as an advisor to one of the Roman prefects, and as part of an unfortunate political spat she was brutally murdered by a mob of Christians in 415CE.

Cambridge University has a long and distinguished history of producing excellent mathematicians. The Mathematical Tripos examination – their official undergraduate exam for maths students – is the oldest Tripos examined at the university. The tradition of announcing the results from a balcony in the Senate House continues to this day.

The Tripos has historically been considered a gruelling test of mathematical knowledge – in 1854, the Tripos was made up of 16 papers totaling 211 questions taken over 8 days – a combined 44.5 hours of examination. Only around a quarter of students taking the exam achieved a passing mark, and passing students awarded a first-class degree were referred to as ‘Wranglers’ – with the ‘Senior Wrangler’ being the highest scoring student, ‘Second wrangler’, ‘Third wrangler’ etc below that, with ‘Senior Optime’ being the highest scoring student awarded a second-class degree, and so on.

Women were not officially allowed to take the Tripos (with few exceptions) until 1880, when Charlotte Scott got special permission to take the exam, and placed eighth – but the title of ‘Eighth Wrangler’ went to a male student. However, this opened the doors for more women to take the exam.

The first woman to achieve the top score on the Tripos was Phillippa Fawcett, who did so in 1890 – but since women still weren’t considered officially part of the system, she was ranked ‘Above the Senior Wrangler’. Her achievement gained worldwide media coverage, and created much discussion around women’s rights. The first woman to officially be awarded the position of Senior Wrangler was Ruth Hendry, in 1992.

Sofya Kovalevskaya, born in 1850, was a Russian mathematician notable for her contributions to analysis, mechanics and partial differential equations. She was also a pioneer in several aspects – as well as being the first woman to obtain a doctorate in mathematics (in the modern sense), she was also the first woman to be appointed to a full professorship in Northern Europe, and among the first women to be appointed as an editor of a scientific journal (the prestigious maths journal Acta Mathematica, in 1884).

Also of note is Martha Euphemia Lofton Haynes, the first African-American woman to achieve a PhD, in 1943. Her dissertation title was *The Determination of Sets of Independent Conditions Characterizing Certain Special Cases of Symmetric Correspondences*, and she became a leading figure in maths education, teaching in schools for 47 years, chairing the D.C. board of education and going on to establish the mathematics department at the University of the District of Columbia.

The name Agnesi might already be familiar to mathematicians because of the cubic curve which has become called the ‘Witch of Agnesi’. The curve was studied by, among others, Maria Gaetana Agnesi, an Italian mathematician, philosopher and theologian.

As well as being considered to be the first woman in the Western world to have achieved a reputation in mathematics, Agnesi was the first woman to write a mathematics handbook and the first woman appointed as a mathematics professor at a university (the second woman ever to be appointed a professor in any subject – a physicist, Laura Bassi, being the first).

The Royal Society in London grants fellowships to individuals who have made a ‘substantial contribution to the improvement of knowledge’, and is considered a significant honour – past luminaries include Isaac Newton, Srinivasa Ramanujan and Alan Turing, and the total list of around 8000 Fellows of the Royal Society (FRS) includes over 280 Nobel Laureates.

Around 60 new Fellows have been elected each year since 1663, including many mathematicians, but it took until 1947 before one of those mathematicians was a woman. While she wasn’t the first woman to be an FRS (that happened two years earlier, in 1945, when crystallographer Kathleen Lonsdale was awarded the honour), mathematician Mary Cartwright was the first mathematician.

(CC BY-SA Anitha Maria S)

Having graduated from St. Hugh’s College at Oxford University in 1923 (being the first woman to attain the final degree lectures there, and the first woman to obtain a first) Cartwright has a mathematical theorem named after her (Cartwright’s Theorem) and also published a simplified elementary proof of the irrationality of π.

Incidentally, mathematician and engineer Hertha Ayrton was nominated for fellowship in 1902, on the basis of her work on the electric arc, her application was turned down by the Council of the Royal Society, who decreed that married women were not eligible to be Fellows.

The Royal Statistical Society, the UK’s professional body for statisticians and data scientists, was founded in 1834, and fellows of the society represented a huge section of fields, including politics, the army, law, history, physical science, philosophy, the church, art, journalism, medicine and philanthropy as well as economists and statisticians.

The first woman to be granted the honour of membership was someone you may well have heard of, but possibly not in her capacity as a statistician – founder of modern nursing Florence Nightingale used statistical charts and evidence in her campaigns for social reform, and the RSS proudly claims her as their first female member in 1858. The first female president of the RSS was Stella Cunliffe, who took the role in 1975.

The various mathematical learned societies all have long histories of queues of similar-looking male presidents, but thankfully all of them have at least once been led by a female mathematician. The Institute of Mathematics and its Applications had its first female president in 1978, lattice researcher and education reformer Kathleen Ollerenshaw. Dorothy Lewis Bernstein, who worked in applied maths, statistics and on the Laplace Transform, was the first female president of The Mathematical Association of America, elected in 1979.

The London Mathematical Society and the Mathematical Association (a more teaching-focused organisation) both had their first female presidents in the form of previously mentioned Mary Cartwright – a pioneer in so many things. The American Mathematical Society’s first female president was Julia Bowman Robinson, elected in 1983, and the European Mathematical Society has Marta Sanz-Solé, who along with many other directorships and council memberships throughout the mathematical field, was elected president of the EMS in 2010.

As well as achievements in learning and in being part of mathematical organisations, mathematicians are often honoured for their work by prizes and awards. The National Medal of Science is awarded annually since 1963 by the President of the United States to individuals in science and engineering who have made important contributions to the advancement of knowledge.

The National Medal of Science is awarded in many categories, and in the Mathematical, Statistical, and Computer Sciences category, it’s been given to many famous mathematicians including Kurt Gödel, Donald Knuth, Saunders MacLane and Solomon Golomb. The first (and only, as far as I can tell) time it was awarded to a woman was in 1998, when it was given to dynamicist (and second ever female president of the AMS) Cathleen Morawetz.

The higher up the mathematical ladder of achievement you go, the more recently you need to look to see women achieving honours. The Fields Medal, one of the prizes whose laureates are invited to the HLF each year, is awarded to four mathematicians once every four years, at the International Congress of the International Mathematical Union. It is regarded as one of the highest honors a mathematician can receive, and considered to be the mathematician’s equivalent of a Nobel Prize.

In its 84-year history, the Fields medal has been awarded to a woman exactly once – in 2014, when geometer Maryam Mirzakhani was awarded the prize “For her outstanding contributions to the dynamics and geometry of Riemann surfaces and their moduli spaces.” Mirzakhani was also the first Iranian to be awarded the prize.

(Image: Encyclopædia Britannica)

The Abel prize, a similarly prestigious honour and HLF laureate criterion, has been awarded annually since 2003 by the King of Norway, and laureates include the late Michael Atiyah, Fermat’s Last Theorem prover Andrew Wiles and game theory founder John Forbes Nash Jr.

The award was finally given to a woman just last year, in 2019, when it was awarded to American mathematician and founder of the field of geometric analysis Karen Uhlenbeck, as I wrote about last April.

These giants of mathematics have opened the gates to many more women studying and working in the subject over the years. We salute their courage and willingness to pave the way for future generations – and we enjoy the fruits of their mathematical labours whenever we quote their theorems or reference their work, especially knowing that they made their contributions despite the extra challenge of being the first.

The post Women Pioneers of Mathematics originally appeared on the HLFF SciLogs blog.

]]>