## Oscar Fernandez: A Healthier You is Just a Few Equations Away

This post appears concurrently on the Wellesley College Summer blog.

How many calories should you eat each day? What proportion should come from carbohydrates, or protein? How can we improve our health through diets based on research findings?

You might be surprised to find that we can answer all of these questions using math.  Indeed, mathematics is at the heart of nutrition and health research. Scientists in these fields often use math to analyze the results from their experiments and clinical trials.  Based on decades of research (and yes, math), scientists have developed a handful of formulas that have been proven to improve your health (and even help you lose weight!).

So, back to our first question: How many calories should we eat each day?  Let’s find out…

Each of us has a “total daily energy expenditure” (TDEE), the total number of calories your body burns each day. Theoretically, if you consume more calories than your TDEE, you will gain weight. If you consume less, you will lose weight. Eat exactly your TDEE in calories and you won’t gain or lose weight.

“Great! So how do I calculate my TDEE?” I hear you saying. Good question. Here’s a preliminary answer:

TDEE = RMR + CBE + DIT         (1)

Here’s what the acronyms on the right-hand side of the equation mean.

• RMR: Your resting metabolic rate, roughly defined as the number of calories your body burns while awake and at rest
• CBE: The calories you burned during the day exercising (including walking)
• DIT: Your diet’s diet-induced thermogenesis, which quantifies what percentage of calories from dietary fat, protein, and carbohydrates are left over for your body to use after you ingest those calories

So, in order to calculate TDEE, we need to calculate each of these three components. This requires very precise knowledge of your daily activities, for example: what exercises you did, how many minutes you spent doing them, what foods you ate, and how much protein, carbohydrates, and dietary fat these foods contained. Luckily, nutrition scientists have developed a simpler formula that takes all of these factors into account:

TDEE = RMR(Activity Factor) + 0.1C.         (2)

Here C is how many calories you eat each day, and the “Activity Factor” (below) estimates the calories you burn through exercise:

 Level of Activity Activity Factor Little to no physical activity 1.2 Light-intensity exercise 1-3 days/week 1.4 Moderate-intensity exercise 3-5 days/week 1.5 Moderate- to vigorous-intensity exercise 6-7 days/week 1.7 Vigorous daily training 1.9

As an example, picture a tall young man named Alberto. Suppose his RMR is 2,000 calories, that he eats 2,100 calories a day, and that his Activity Factor is 1.2. Alberto’s TDEE estimate from (2) would then be

TDEE = 2,000(1.2) + 0.1(2,100) = 2,610.

Since Alberto’s caloric intake (2,100) is lower than his TDEE, in theory, Alberto would lose weight if he kept eating and exercising as he is currently doing.

Formula (2) is certainly more user-friendly than formula (1). But in either case we still need to know the RMR number. Luckily, RMR is one of the most studied components of TDEE, and there are several fairly accurate equations for it that only require your weight, height, age, and sex as inputs. I’ve created a free online RMR calculator to make the calculation easier: Resting Metabolic Heart Rate. In addition, I’ve also created a TDEE calculator (based on equation (2)) to help you estimate your TDEE: Total Daily Energy Expenditure.

I hope this short tour of nutrition science has helped you see that mathematics can be empowering, life-changing, and personally relevant. I encourage you to continue exploring the subject and discovering the hidden math all around you.

Oscar E. Fernandez is assistant professor of mathematics at Wellesley College. He is the author of Everyday Calculus: Discovering the Hidden Math All around Us and The Calculus of Happiness: How a Mathematical Approach to Life Adds Up to Health, Wealth, and Love. He also writes about mathematics for the Huffington Post and on his website, surroundedbymath.com.

## Joshua Holden: Quantum cryptography is unbreakable. So is human ingenuity

Two basic types of encryption schemes are used on the internet today. One, known as symmetric-key cryptography, follows the same pattern that people have been using to send secret messages for thousands of years. If Alice wants to send Bob a secret message, they start by getting together somewhere they can’t be overheard and agree on a secret key; later, when they are separated, they can use this key to send messages that Eve the eavesdropper can’t understand even if she overhears them. This is the sort of encryption used when you set up an online account with your neighbourhood bank; you and your bank already know private information about each other, and use that information to set up a secret password to protect your messages.

The second scheme is called public-key cryptography, and it was invented only in the 1970s. As the name suggests, these are systems where Alice and Bob agree on their key, or part of it, by exchanging only public information. This is incredibly useful in modern electronic commerce: if you want to send your credit card number safely over the internet to Amazon, for instance, you don’t want to have to drive to their headquarters to have a secret meeting first. Public-key systems rely on the fact that some mathematical processes seem to be easy to do, but difficult to undo. For example, for Alice to take two large whole numbers and multiply them is relatively easy; for Eve to take the result and recover the original numbers seems much harder.

Public-key cryptography was invented by researchers at the Government Communications Headquarters (GCHQ) – the British equivalent (more or less) of the US National Security Agency (NSA) – who wanted to protect communications between a large number of people in a security organisation. Their work was classified, and the British government neither used it nor allowed it to be released to the public. The idea of electronic commerce apparently never occurred to them. A few years later, academic researchers at Stanford and MIT rediscovered public-key systems. This time they were thinking about the benefits that widespread cryptography could bring to everyday people, not least the ability to do business over computers.

Now cryptographers think that a new kind of computer based on quantum physics could make public-key cryptography insecure. Bits in a normal computer are either 0 or 1. Quantum physics allows bits to be in a superposition of 0 and 1, in the same way that Schrödinger’s cat can be in a superposition of alive and dead states. This sometimes lets quantum computers explore possibilities more quickly than normal computers. While no one has yet built a quantum computer capable of solving problems of nontrivial size (unless they kept it secret), over the past 20 years, researchers have started figuring out how to write programs for such computers and predict that, once built, quantum computers will quickly solve ‘hidden subgroup problems’. Since all public-key systems currently rely on variations of these problems, they could, in theory, be broken by a quantum computer.

Cryptographers aren’t just giving up, however. They’re exploring replacements for the current systems, in two principal ways. One deploys quantum-resistant ciphers, which are ways to encrypt messages using current computers but without involving hidden subgroup problems. Thus they seem to be safe against code-breakers using quantum computers. The other idea is to make truly quantum ciphers. These would ‘fight quantum with quantum’, using the same quantum physics that could allow us to build quantum computers to protect against quantum-computational attacks. Progress is being made in both areas, but both require more research, which is currently being done at universities and other institutions around the world.

Yet some government agencies still want to restrict or control research into cryptographic security. They argue that if everyone in the world has strong cryptography, then terrorists, kidnappers and child pornographers will be able to make plans that law enforcement and national security personnel can’t penetrate.

But that’s not really true. What is true is that pretty much anyone can get hold of software that, when used properly, is secure against any publicly known attacks. The key here is ‘when used properly’. In reality, hardly any system is always used properly. And when terrorists or criminals use a system incorrectly even once, that can allow an experienced codebreaker working for the government to read all the messages sent with that system. Law enforcement and national security personnel can put those messages together with information gathered in other ways – surveillance, confidential informants, analysis of metadata and transmission characteristics, etc – and still have a potent tool against wrongdoers.

In his essay ‘A Few Words on Secret Writing’ (1841), Edgar Allan Poe wrote: ‘[I]t may be roundly asserted that human ingenuity cannot concoct a cipher which human ingenuity cannot resolve.’ In theory, he has been proven wrong: when executed properly under the proper conditions, techniques such as quantum cryptography are secure against any possible attack by Eve. In real-life situations, however, Poe was undoubtedly right. Every time an ‘unbreakable’ system has been put into actual use, some sort of unexpected mischance eventually has given Eve an opportunity to break it. Conversely, whenever it has seemed that Eve has irretrievably gained the upper hand, Alice and Bob have found a clever way to get back in the game. I am convinced of one thing: if society does not give ‘human ingenuity’ as much room to flourish as we can manage, we will all be poorer for it.

Joshua Holden is professor of mathematics at the Rose-Hulman Institute of Technology and the author of The Mathematics of Secrets.

This article was originally published at Aeon and has been republished under Creative Commons.

## A peek inside The Calculus of Happiness

What’s the best diet for overall health and weight management? How can we change our finances to retire earlier? How can we maximize our chances of finding our soul mate? In The Calculus of Happiness, Oscar Fernandez shows us that math yields powerful insights into health, wealth, and love. Moreover, the important formulas are linked to a dozen free online interactive calculators on the book’s website, allowing one to personalize the equations. A nutrition, personal finance, and relationship how-to guide all in one, The Calculus of Happiness invites you to discover how empowering mathematics can be. Check out the trailer to learn more:

Oscar E. Fernandez is assistant professor of mathematics at Wellesley College and the author of Everyday Calculus: Discovering the Hidden Math All around Us. He also writes about mathematics for the Huffington Post and on his website, surroundedbymath.com.

## Keith Devlin: Fibonacci introduced modern arithmetic —then disappeared

More than a decade ago, Keith Devlin, a math expositor, set out to research the life and legacy of the medieval mathematician Leonardo of Pisa, popularly known as Fibonacci, whose book Liber abbaci has quite literally affected the lives of everyone alive today. Although he is most famous for the Fibonacci numbers—which, it so happens, he didn’t invent—Fibonacci’s greatest contribution was as an expositor of mathematical ideas at a level ordinary people could understand. In 1202, Liber abbaci—the “Book of Calculation”—introduced modern arithmetic to the Western world. Yet Fibonacci was long forgotten after his death. Finding Fibonacci is a compelling firsthand account of his ten-year quest to tell Fibonacci’s story. Devlin recently answered some questions about his new book for the PUP blog:

KD: This is my third book about the history of mathematics, which already makes it different from most of my books where the focus was on abstract concepts and ideas, not how they were discovered. What makes it truly unique is that it’s the first book I have written that I have been in! It is a first-person account, based on a diary I kept during a research project spread over a decade.

If you had to convey the book’s flavor in a few sentences, what would you say?

KD: Finding Fibonacci is a first-person account of a ten-year quest to uncover and tell the story of one of the most influential figures in human history. It started out as a diary, a simple record of events. It turned into a story when it became clear that it was far more than a record of dates, sources consulted, places visited, and facts checked. Like any good story, it has false starts and disappointments, tragedies and unexpected turns, more than a few hilarious episodes, and several lucky breaks. Along the way, I encountered some amazing individuals who, each for their own reasons, became fascinated by Fibonacci: a Yale professor who traced modern finance back to Fibonacci, an Italian historian who made the crucial archival discovery that brought together all the threads of Fibonacci’s astonishing story, an American math professor who fought against cancer to complete the world’s first (and only) modern language translation of Liber abbaci, and the widow who took over and brought his efforts to fruition after he lost that battle. And behind it all, the man who was the focus of my quest. Fibonacci played a major role in creating the modern commercial world. Yet he vanished from the pages of history for five hundred years, made “obsolete,” and in consequence all but forgotten forever, by a new technology.

What made you decide to write this book?

KD: There were really two key decisions that led to this book. One was deciding, back in the year 2000, to keep a diary of my experiences writing The Man of Numbers. My first history book was The Unfinished Game. For that, all I had to do was consult a number of reference works. It was not intended to be original research. Basic Books asked me to write a short, readable account of a single mathematical document that changed the course of human history, to form part of a series they were bringing out. I chose the letter Pierre De Fermat wrote to his colleague Blaise Pascal in 1654, which most experts agree established modern probability theory, in particular how it can be used to predict the future.

In The Man of Numbers, in contrast, I set out to tell a story that no one had told before; indeed, the consensus among the historians was that it could not be told—there simply was not enough information available. So writing that book would require engaging in a lot of original historical research. I had never done that. I would be stepping well outside my comfort zone. That was in part why I decided to keep a diary. The other reason for keeping a record was to ensure I had enough anecdotes to use when the time came to promote the book—assuming I was able to complete it, that is. (I had written enough popular mathematics books to appreciate the need for author promotional activities!)

The second decision, to turn my diary into a book (which only at the end found the title, Finding Fibonacci), came after The Man of Numbers was published in 2011. The ten-year process of researching and writing that book had turned out to be so rich, and so full of unexpected twists and turns, including several strokes of immense luck, that it was clear there was a good story to be told. What was not clear was whether I would be able to write such a book. All my other books are third-person accounts, where I am simply the messenger. In Finding Fibonacci, I would of necessity be a central character. Once again, I would be stepping outside my comfort zone. In particular, I would be laying out on the printed page, part of my inner self. It took five years and a lot of help from my agent Ted Weinstein and then my Princeton University Press editor Vickie Kearn to find the right voice and make it work.

Who do you expect will enjoy reading this book?

KD: I have a solid readership around the world. I am sure they will all read it. In particular, everyone who read The Man of Numbers will likely end up taking a look. Not least because, in addition to providing a window into the process of writing that earlier book, I also put in some details of that story that I did not fully appreciate until after the book had been published. But I hope, and in fact expect, that Finding Fibonacci will appeal to a whole new group of readers. Whereas the star of all my previous books was a discipline, mathematics, this is a book about people, for the most part people alive today. It’s a human story. It has a number of stars, all people, connected by having embarked on a quest to try to tell parts of the story of one of the most influential figures in human history: Leonardo of Pisa, popularly known as Fibonacci.

Now that the book is out, in one sentence if you can, how would you summarize writing it?

KD: Leaving my author’s comfort zone. Without a doubt. I’ve never been less certain how a book would be received.

Keith Devlin is a mathematician at Stanford University and cofounder and president of BrainQuake, an educational technology company that creates mathematics learning video games. His many books include The Unfinished Game: Pascal, Fermat, and the Seventeenth-Century Letter That Made the World Modern and The Man of Numbers: Fibonacci’s Arithmetic Revolution. He is the author of Finding Fibonacci: The Quest to Rediscover the Forgotten Mathematical Genius Who Changed the World.

## Oscar E. Fernandez on The Calculus of Happiness

If you think math has little to do with finding a soulmate or any other “real world” preoccupations, Oscar Fernandez says guess again. According to his new book, The Calculus of Happiness, math offers powerful insights into health, wealth, and love, from choosing the best diet, to finding simple “all weather” investment portfolios with great returns. Using only high-school-level math (precalculus with a dash of calculus), Fernandez guides readers through the surprising results. He recently took the time to answer a few questions about the book and how empowering mathematics can be.

The title is intriguing. Can you tell us what calculus has to do with happiness?

Sure. The title is actually a play on words. While there is a sprinkling of calculus in the book (the vast majority of the math is precalculus-level), the title was more meant to convey the main idea of the book: happiness can be calculated, and therefore optimized.

How do you optimize happiness?

Good question. First you have to quantify happiness. We know from a variety of research that good health, healthy finances, and meaningful social relationships are the top contributors to happiness. So, a simplistic “happiness equation” is: health + wealth + love = happiness. This book then does what any good applied mathematician would do (I’m an applied mathematician): quantify each of the “happiness components” on the left-hand side of the equation (health, wealth, and love), and then use math to extract valuable insights and results, like how to optimize each component.

This process sounds very much like the subtitle, how a mathematical approach to life adds up to health, wealth, and love. But just to be sure, can you elaborate on the subtitle?

That’s exactly right. Often we feel like various aspects of our lives are beyond our control. But in fact, many aspects of our lives, including some of the most important ones (like health, wealth, and love), follow mathematical rules. And by studying the equations that emerge from these rules you can quickly learn how to manipulate those equations in your favor. That’s what I do in the book for health, wealth, and love.

Can you give us some examples/applications?

I can actually give you about 30 of them, roughly the number discussed in the book. But let me focus on my three favorite ones. The first is what I called the “rational food choice” function (Chapter 2). It’s a simple formula: divide 100 calories by the weight (say, in grams) of a particular food. This yields a number whose units are calories per gram, the units of “energy density.” Something remarkable then happens when you plot the energy densities of various foods on a graph: the energy densities of nearly all the healthy foods (like fruits and vegetables) are at most about 2 calories per gram. This simple mathematical insight, therefore, helps you instantly make healthier food choices. And following its advice, as I discuss at length in the book, eventually translates to lower risk for developing heart disease and diabetes, weight loss, and even an increase in your life span! The second example comes from Chapter 3; it’s a formula for calculating how many more years you have to work for before you can retire. Among the formula’s many insights is that, in the simplest case, this magic number depends entirely on the ratio of how much you save each year to how much you spend. And the formula, being a formula, tells you exactly how changing that ratio affects your time until retirement. The last example is based on astronomer Frank Drake’s equation for estimating the number of intelligent civilizations in our galaxy (Chapter 5). It turns out that this alien-searching equation can also be used to estimate the number of possible compatible partners that live near you! That sort of equates a good date with an intelligent alien, and I suppose I can see some similarities (like how rare they are to find).

The examples you’ve mentioned have direct relevance to our lives. Is that a feature of the other examples too?

Absolutely. And it’s more than just relevance—the examples and applications I chose are all meant to highlight how empowering mathematics can be. Indeed, the entire book is designed to empower the reader—via math—with concrete, math-backed and science-backed strategies for improving their health, wealth, and love life. This is a sampling of the broader principle embodied in the subtitle: taking a mathematical approach to life can help you optimize nearly every aspect of your life.

Will I need to know calculus to enjoy the book?

Not at all. Most of the math discussed is precalculus-level. Therefore, I expect that nearly every reader will have studied the math used in the book at some point in their K-12 education. Nonetheless, I guide the reader through the math as each chapter progresses. And once we get to an important equation, you’ll see a little computer icon next to it in the margin. These indicate that there are online interactive demonstrations and calculators I created that go along with the formula. The online calculators make it possible to customize the most important formulas in the book, so even if the math leading up to them gets tough, you can still use the online resources to help you optimize various aspects of health, wealth, and love.

Finally, you mention a few other features of the book in the preface. Can you tell us about some of those?

Sure, I’ll mention two particular important ones. Firstly, at least 1/3 of the book is dedicated to personal finance. I wrote that part of the book to explicitly address the low financial literacy in this country. You’ll find understandable discussions of everything from taxes to investing to retirement (in addition to the various formulas derived that will help you optimize those aspects of your financial life). Finally, I organized the book to follow the sequence of math topics covered in a typical precalculus textbook. So if you’re a precalculus student, or giving this book to someone who is, this book will complement their course well. (I also included the mathematical derivations of the equations presented in the chapter appendixes.) This way the youngest readers among us can read about how empowering and applicable mathematics can be. It’s my hope that this will encourage them to continue studying math beyond high school.

Oscar E. Fernandez is assistant professor of mathematics at Wellesley College and the author of Everyday Calculus: Discovering the Hidden Math All around Us and The Calculus of Happiness: How a Mathematical Approach to Life Adds Up to Health, Wealth, and Love.

## PUP math editor Vickie Kearn: How real mathematicians celebrate Pi Day

Who doesn’t love Pi (aka Pie) Day? Residents here in Princeton, NJ love it so much that we spend four days celebrating. Now, to be honest, we’re also celebrating Einstein’s birthday, so we do need the full four days. I know what I will be doing on 3.14159265 but I wondered what some of my friends will be doing. Not surprisingly, a lot will either be making or eating pie. These include Oscar Fernandez (Wellesley), Ron Graham (UCSD), and Art Benjamin (who will be performing his mathemagics show later in the week). Anna Pierrehumbert (who teaches in NYC) will be working with upper school students on a pi recitation and middle school students on making pi-day buttons. Brent Ferguson (The Lawrenceville School) has celebrated at The National Museum of Mathematics in NYC, Ireland, Greece, and this year Princeton. Here he is celebrating in Alaska:

The Princeton University Math Club will be celebrating with a party in Fine Hall. In addition to eating pie and playing games, they will have a digit reciting contest. Tim Chartier (Davidson College) will be spending his time demonstrating how to estimate pi with chocolate chips while also fielding interview requests for his expert opinion on March Madness (a lot going on this month for mathematicians). Dave Richeson (Dickinson College) goes to the local elementary school each year and talks with the fifth graders about pi and its history and then eats creatively rendered pi themed pie provided by the parents.

You might be wondering why we celebrate a mathematical constant every year. How did it get to be so important? Again I went back to my pi experts and asked them to tell me the most important uses of pi. This question is open to debate by mathematicians but many think that the most important is Euler’s Identity, e(i*pi) + 1 = 0. As Jenny Kaufmann (President of the Princeton University Math Club) puts it, “Besides elegantly encoding the way that multiplication by i results in a rotation in the complex plane, this identity unites what one might consider the five most important numbers in a single equation. That’s pretty impressive!” My most practical friend is Oscar and here is what he told me: “There are so many uses for pi, but given my interest in everyday explanations of math, here’s one I like: If you drive to work every day, you take many, many pi’s with you. That’s because the circumference of your car’s tires is pi multiplied by the tires’ diameter. The most common car tire has a diameter of about 29 inches, so one full revolution covers a distance of about 29 times pi (about 7.5 feet). Many, many revolutions of your tires later you arrive at work, with lots and lots of pi’s!” Anna is also practical in that she will be using pi to calculate the area of the circular pastry she will be eating, but she also likes the infinite series for pi (pi/4 = 1 – 1/3 + 1/5 – 1/7 etc.). Avner Ash (Boston College) sums it up nicely, “ We can’t live without pi—how would we have circles, normal distributions, etc.?”

One of the most important questions one asks on Pi Day is how many digits can you recite? The largest number I got was 300 from the Princeton Math Club. However, there are quite a few impressive numbers from others, as well as some creative answers and ways to remember the digits. For example, Oscar can remember 3/14/15 at 9:26:53 because it was an epic Day and Pi Time for him. Art Benjamin can recite 100 digits from a phonetic code and 5 silly sentences. Ron Graham can recite all of the digits of pi, even thousands, as long as they don’t have to be in order. Dave Richeson also knows all of the digits of pi which are 0,1,2,3,4,5,6,7,8,and 9.

No matter how you celebrate, remember math, especially pi(e) is useful, fun, and delicious.

Vickie Kearn is Executive Editor of Mathematics at Princeton University Press.

## Marc Chamberland: Why π is important

On March 14, groups across the country will gather for Pi Day, a nerdy celebration of the number Pi, replete with fun facts about this mathematical constant, copious amounts pie, and of course, recitations of the digits of Pi. But why do we care about so many digits of Pi? How big is the room you want to wallpaper anyway? In 1706, 100 digits of Pi were known, and by 2013 over 12 trillion digits had been computed. I’ll give you five reasons why someone may claim that many digits of Pi is important, but they’re not all good.

Reason 1
It provides accuracy for scientific measurements

This argument had merit when only a few digits were known, but today this reason is as empty as space. The radius of the universe is 93 billion light years, and the radius of a hydrogen atom is about 0.1 nanometers. So knowing Pi to 38 places is enough to tell you precisely how many hydrogen atoms you need to encircle the universe. For any mechanical calculations, probably 3.1415 is more than enough precision.

Reason 2
It’s neat to see how far we can go

It’s true that great feats and discoveries have been done in the name of exploration. Ingenious techniques have been designed to crank out many digits of Pi and some of these ideas have led to remarkable discoveries in computing. But while this “because it is there” approach is beguiling, just because we can explore some phenomenon doesn’t mean we’ll find something valuable. Curiosity is great, but harnessing that energy with insight will take you farther.

Reason 3
Computer Integrity

The digits of Pi help with testing and developing new algorithms. The Japanese mathematician Yasumasa Kanada used two different formulas to generate and check over one trillion digits of Pi. To get agreement after all those arithmetic operations and data transfers is strong evidence that the computers are functioning error-free. A spin-off of the expansive Pi calculations has been the development of the Fast Fourier Transform, a ground-breaking tool used in digital signal processing.

Reason 4
It provides evidence that Pi is normal

A number is “normal” if any string of digits appears with the expected frequency. For example, you expect the number 4 to appear 1/10 of the time, or the string 28 to appear 1/100 of the time. It is suspected that Pi is normal, and this was evidenced from the first trillion digits when it was seen that each digit appears about 100 billion times. But proving that Pi is normal has been elusive. Why is the normality of numbers important? A normal number could be used to simulate a random number generator. Computer simulations are a vital tool in modeling any dynamic phenomena that involves randomness. Applications abound, including to climate science, physiological drug testing, computational fluid dynamics, and financial forecasting. If easily calculated numbers such as Pi can be proven to be normal, these precisely defined numbers could be used, paradoxically, in the service of generating randomness.

Reason 5
It helps us understand the prime numbers

Pi is intimately connected to the prime numbers. There are formulas involving the product of infinitely numbers that connect the primes and Pi. The knowledge flows both ways: knowing many primes helps one calculate Pi and knowing many digits of Pi allows one to generate many primes. The Riemann Hypothesis—an unsolved 150-year-old mathematical problem whose solution would earn the solver one million dollars—is intimately connected to both the primes and the number Pi.

And you thought that Pi was only good for circles.

Marc Chamberland is the Myra Steele Professor of Mathematics and Natural Science at Grinnell College. His research in several areas of mathematics, including studying Pi, has led to many publications and speaking engagements in various countries. His interest in popularizing mathematics resulted in the recent book Single Digits: In Praise of Small Numbers with Princeton University Press. He also maintains his YouTube channel Tipping Point Math that tries to make mathematics accessible to a general audience. He is currently working on a book about the number Pi.

## David Alan Grier: The Light of Computation

by David Alan Grier

When one figure steps into the light, others can be seen in the reflected glow. The movie Hidden Figures has brought a little light to the contributions of NASA’s human computers. Women such as Katherine Goble Johnson and her colleagues of the West Area Computers supported the manned space program by doing hours of repetitive, detailed orbital calculations. These women were not the first mathematical workers to toil in the obscurity of organized scientific calculation. The history of organized computing groups can be traced back to the 17th century, when a French astronomer convinced three friends to help him calculate the date that Halley’s comet would return to view. Like Johnson, few human computers have received any recognition for their labors. For many, only their families appreciated the work that they did. For some, not even their closest relatives knew of their role in the scientific community.

My grandmother confessed her training as a human computer only at the very end of her life. At one dinner, she laid her fork on the table and expressed regret that she had never used calculus. Since none of us believed that she had gone to college, we dismissed the remark and moved the conversation in a different direction. Only after her passing did I find the college records that confirmed she had taken a degree in mathematics from the University of Michigan in 1921. The illumination from those records showed that she was not alone. Half of the twelve mathematics majors in her class were women. Five of those six had been employed as human computers or statistical clerks.

By 1921, organized human computing was fairly common in industrialized countries. The governments of the United States, Germany, France, Great Britain, Japan, and Russia supported groups that did calculations for nautical almanacs, national surveys, agricultural statistics, weapons testing, and weather prediction. The British Association for the Advancement of Science operated a computing group. So did the Harvard Observatory, Iowa State University, and the University of Indiana. One school, University College London, published a periodical for these groups, Tracts for Computers.

While many of these human computers were women, most were not. Computation was considered to be a form of clerical work, which was still a career dominated by men. However, human computers tended to be individuals who faced economic or social barriers to their careers. These barriers prevented them from becoming a scientist or engineer in spite of their talents. In the book When Computers Were Human, I characterized them as “Blacks, women, Irish, Jews and the merely poor.” One of the most prominent computing groups of the 20th century, the Mathematical Tables Project, hired only the impoverished. It operated during the Great Depression and recruited its 450 computers from New York City’s unemployment rolls.

During its 10 years of operations, the Math Tables Project toiled in obscurity. Only a few members of the scientific community recognized its contributions. Hans Bethe asked the group to do the calculations for a paper that he was writing in the physics of the sun. The engineer Philip Morse brought problems from his colleagues at MIT. The pioneering computer scientist John von Neumann asked the group to test a new mathematical optimization technique after he was unable to test it on the new ENIAC computer. However, most scientists maintained a distance between themselves and the Mathematical Tables Project. One member of the Academy of Science explained his reservations about the Project with an argument that came to be known as the Computational Syllogism. Scientists, he argued, are successful people. The poor, he asserted, are not successful. Therefore, he concluded, the poor cannot be scientists and hence should not be employed in computation.

Like the human computers of NASA, the Mathematical Tables Project had a brief moment in the spotlight. In 1964, the leader of the Project, Gertrude Blanch, received a Federal Woman’s Award from President Lyndon Johnson for her contributions to the United States Government. Yet, her light did not shine far enough to bring recognition to the 20 members of the Math Tables Project who published a book, later that year, on the methods of scientific computing. The volume became one of the most highly sold scientific books in history. Nonetheless, few people knew that it was written by former human computers.

The attention to Katherine Goble Johnson is welcome because it reminds us that science is a community endeavor. When we recognize the authors of scientific articles, or applaud the distinguished men and women who receive Nobel Prizes (or in the case of computer science, Turing Medals) we often fail to see the community members that were essential to the scientific work. At least in Hidden Figures, they receive a little of the reflected light.

David Alan Grier is the author of When Computers Were Human. He writes “Global Code” for Computer magazine and products the podcast “How We Manage Stuff.” He can be reached at grier@gwu.edu.

## Cipher challenge #3 from Joshua Holden: Binary ciphers

The Mathematics of Secrets by Joshua Holden takes readers on a tour of the mathematics behind cryptography. Most books about cryptography are organized historically, or around how codes and ciphers have been used in government and military intelligence or bank transactions. Holden instead focuses on how mathematical principles underpin the ways that different codes and ciphers operate. Discussing the majority of ancient and modern ciphers currently known, The Mathematics of Secrets sheds light on both code making and code breaking. Over the next few weeks, we’ll be running a series of cipher challenges from Joshua Holden. The last post was on subliminal channels. Today’s is on binary ciphers:

Binary numerals, as most people know, represent numbers using only the digits 0 and 1.  They are very common in modern ciphers due to their use in computers, and they frequently represent letters of the alphabet.  A numeral like 10010 could represent the (1 · 24 + 0 · 23 + 0 · 22 + 1 · 2 + 0)th = 18th letter of the alphabet, or r.  So the entire alphabet would be:

``` plaintext:   a     b     c     d     e     f     g     h     i     j
ciphertext: 00001 00010 00011 00100 00101 00110 00111 01000 01001 01010

plaintext:   k     l     m     n     o     p     q     r     s     t
ciphertext: 01011 01100 01101 01110 01111 10000 10001 10010 10011 10100

plaintext:   u     v     w     x     y     z
ciphertext: 10101 10110 10111 11000 11001 11010```

The first use of a binary numeral system in cryptography, however, was well before the advent of digital computers. Sir Francis Bacon alluded to this cipher in 1605 in his work Of the Proficience and Advancement of Learning, Divine and Humane and published it in 1623 in the enlarged Latin version De Augmentis Scientarum. In this system not only the meaning but the very existence of the message is hidden in an innocuous “covertext.” We will give a modern English example.

Suppose we want to encrypt the word “not” into the covertext “I wrote Shakespeare.” First convert the plaintext into binary numerals:

```   plaintext:   n      o     t
ciphertext: 01110  01111 10100```

Then stick the digits together into a string:

`    011100111110100`

Now we need what Bacon called a “biformed alphabet,” that is, one where each letter can have a “0-form” and a “1-form.”We will use roman letters for our 0-form and italic for our 1-form. Then for each letter of the covertext, if the corresponding digit in the ciphertext is 0, use the 0-form, and if the digit is 1 use the 1-form:

```    0 11100 111110100xx
I wrote Shakespeare.
```

Any leftover letters can be ignored, and we leave in spaces and punctuation to make the covertext look more realistic. Of course, it still looks odd with two different typefaces—Bacon’s examples were more subtle, although it’s a tricky business to get two alphabets that are similar enough to fool the casual observer but distinct enough to allow for accurate decryption.

Ciphers with binary numerals were reinvented many years later for use with the telegraph and then the printing telegraph, or teletypewriter. The first of these were technically not cryptographic since they were intended for convenience rather than secrecy. We could call them nonsecret ciphers, although for historical reasons they are usually called codes or sometimes encodings. The most well-known nonsecret encoding is probably the Morse code used for telegraphs and early radio, although Morse code does not use binary numerals. In 1833, Gauss, whom we met in Chapter 1, and the physicist Wilhelm Weber invented probably the first telegraph code, using essentially the same system of 5 binary digits as Bacon. Jean-Maurice-Émile Baudot used the same idea for his Baudot code when he invented his teletypewriter system in 1874. And the Baudot code is the one that Gilbert S. Vernam had in front of him in 1917 when his team at AT&T was asked to investigate the security of teletypewriter communications.

Vernam realized that he could take the string of binary digits produced by the Baudot code and encrypt it by combining each digit from the plaintext with a corresponding digit from the key according to the rules:

0 ⊕ 0 = 0
0 ⊕ 1 = 1
1 ⊕ 0 = 1
1 ⊕ 1 = 0

For example, the digits 10010, which ordinarily represent 18, and the digits 01110, which ordinarily represent 14, would be combined to get:

 1 0 0 1 0 ⊕ 0 1 1 1 0 1 1 1 0 0

This gives 11100, which ordinarily represents 28—not the usual sum of 18 and 14.

Some of the systems that AT&T was using were equipped to automatically send messages using a paper tape, which could be punched with holes in 5 columns—a hole indicated a 1 in the Baudot code and no hole indicated a 0. Vernam configured the teletypewriter to combine each digit represented by the plaintext tape to the corresponding digit from a second tape punched with key characters. The resulting ciphertext is sent over the telegraph lines as usual.

At the other end, Bob feeds an identical copy of the tape through the same circuitry. Notice that doing the same operation twice gives you back the original value for each rule:

(0 ⊕ 0) ⊕ 0 = 0 ⊕ 0 = 0
(0 ⊕ 1) ⊕ 1 = 1 ⊕ 1 = 0
(1 ⊕ 0) ⊕ 0 = 1 ⊕ 0 = 1
(1 ⊕ 1) ⊕ 1 = 0 ⊕ 1 = 1

Thus the same operation at Bob’s end cancels out the key, and the teletypewriter can print the plaintext. Vernam’s invention and its further developments became extremely important in modern ciphers such as the ones in Sections 4.3 and 5.2 of The Mathematics of Secrets.

But let’s finish this post by going back to Bacon’s cipher.  I’ve changed it up a little — the covertext below is made up of two different kinds of words, not two different kinds of letters.  Can you figure out the two different kinds and decipher the hidden message?

It’s very important always to understand that students and examiners of cryptography are often confused in considering our Francis Bacon and another Bacon: esteemed Roger. It is easy to address even issues as evidently confusing as one of this nature. It becomes clear when you observe they lived different eras.

Answer to Cipher Challenge #2: Subliminal Channels

Given the hints, a good first assumption is that the ciphertext numbers have to be combined in such a way as to get rid of all of the fractions and give a whole number between 1 and 52.  If you look carefully, you’ll see that 1/5 is always paired with 3/5, 2/5 with 1/5, 3/5 with 4/5, and 4/5 with 2/5.  In each case, twice the first one plus the second one gives you a whole number:

2 × (1/5) + 3/5 = 5/5 = 1
2 × (2/5) + 1/5 = 5/5 = 1
2 × (3/5) + 4/5 = 10/5 = 2
2 × (4/5) + 2/5 = 10/5 = 2

Also, twice the second one minus the first one gives you a whole number:

2 × (3/5) – 1/5 = 5/5 = 1
2 × (1/5) – 2/5 = 0/5 = 0
2 × (4/5) – 3/5 = 5/5 = 1
2 × (2/5) – 4/5 = 0/5 = 0

Applying

to the ciphertext gives the first plaintext:

```39 31 45 45 27 33 31 40 47 39 28 31 44 41
m  e  s  s  a  g  e  n  u  m  b  e  r  o```
```40 31 35 45 46 34 31 39 31 30 35 47 39
n  e  i  s  t  h  e  m  e  d  i  u  m```

And applying

to the ciphertext gives the second plaintext:

```20  8  5 19  5  3 15 14  4 16 12  1  9 14
t  h  e  s  e  c  o  n  d  p  l  a  i  n```
```20  5 24 20  9 19  1 20 12  1 18  7  5
t  e  x  t  i  s  a  t  l  a  r  g  e```

To deduce the encryption process, we have to solve our two equations for C1 and C2.  Subtracting the second equation from twice the first gives:

so

Adding the first equation to twice the second gives:

so

Joshua Holden is professor of mathematics at the Rose-Hulman Institute of Technology.

## Browse Our Mathematics 2017 Catalog

Be among the first to browse our Mathematics 2017 Catalog:

If you are heading to the 2017 Joint Mathematics Meetings in Atlanta, Georgia from January 4 to January 7, come visit us at booth #143 to enter daily book raffles, challenge the SET grand master in a SET match, and receive a free copy of The Joy of SET if you win! Please visit our booth for the schedule.

Also, follow #JMM17 and @PrincetonUnivPress on Twitter for updates and information on our new and forthcoming titles throughout the meeting.

Fibonacci helped to revive the West as the cradle of science, technology, and commerce, yet he vanished from the pages of history. Finding Fibonacci is Keith Devlin’s compelling firsthand account of his ten-year quest to tell Fibonacci’s story.

This annual anthology brings together the year’s finest mathematics writing from around the world. Featuring promising new voices alongside some of the foremost names in the field, The Best Writing on Mathematics 2016 makes available to a wide audience many articles not easily found anywhere else—and you don’t need to be a mathematician to enjoy them.

In The Calculus of Happiness, Oscar Fernandez shows us that math yields powerful insights into health, wealth, and love. Using only high-school-level math, he guides us through several of the surprising results, including an easy rule of thumb for choosing foods that lower our risk for developing diabetes, simple “all-weather” investment portfolios with great returns, and math-backed strategies for achieving financial independence and searching for our soul mate.

If you would like updates of our new titles, subscribe to our newsletter.

## Joshua Holden: The secrets behind secret messages

“Cryptography is all about secrets, and throughout most of its history the whole field has been shrouded in secrecy.  The result has been that just knowing about cryptography seems dangerous and even mystical.”

In The Mathematics of Secrets: Cryptography from Caesar Ciphers to Digital EncryptionJoshua Holden provides the mathematical principles behind ancient and modern cryptic codes and ciphers. Using famous ciphers such as the Caesar Cipher, Holden reveals the key mathematical idea behind each, revealing how such ciphers are made, and how they are broken.  Holden recently took the time to answer questions about his book and cryptography.

There are lots of interesting things related to secret messages to talk abouthistory, sociology, politics, military studies, technology. Why should people be interested in the mathematics of cryptography?

JH: Modern cryptography is a science, and like all modern science it relies on mathematics.  If you want to really understand what modern cryptography can and can’t do you need to know something about that mathematical foundation. Otherwise you’re just taking someone’s word for whether messages are secure, and because of all those sociological and political factors that might not be a wise thing to do. Besides that, I think the particular kinds of mathematics used in cryptography are really pretty.

What kinds of mathematics are used in modern cryptography? Do you have to have a Ph.D. in mathematics to understand it?

JH: I once taught a class on cryptography in which I said that the prerequisite was high school algebra.  Probably I should have said that the prerequisite was high school algebra and a willingness to think hard about it.  Most (but not all) of the mathematics is of the sort often called “discrete.”  That means it deals with things you can count, like whole numbers and squares in a grid, and not with things like irrational numbers and curves in a plane.  There’s also a fair amount of statistics, especially in the codebreaking aspects of cryptography.  All of the mathematics in this book is accessible to college undergraduates and most of it is understandable by moderately advanced high school students who are willing to put in some time with it.

What is one myth about cryptography that you would like to address?

JH: Cryptography is all about secrets, and throughout most of its history the whole field has been shrouded in secrecy.  The result has been that just knowing about cryptography seems dangerous and even mystical. In the Renaissance it was associated with black magic and a famous book on cryptography was banned by the Catholic Church. At the same time, the Church was using cryptography to keep its own messages secret while revealing as little about its techniques as possible. Through most of history, in fact, cryptography was used largely by militaries and governments who felt that their methods should be hidden from the world at large. That began to be challenged in the 19th century when Auguste Kerckhoffs declared that a good cryptographic system should be secure with only the bare minimum of information kept secret.

Nowadays we can relate this idea to the open-source software movement. When more people are allowed to hunt for “bugs” (that is, security failures) the quality of the overall system is likely to go up. Even governments are beginning to get on board with some of the systems they use, although most still keep their highest-level systems tightly classified. Some professional cryptographers still claim that the public can’t possibly understand enough modern cryptography to be useful. Instead of keeping their writings secret they deliberately make it hard for anyone outside the field to understand them. It’s true that a deep understanding of the field takes years of study, but I don’t believe that people should be discouraged from trying to understand the basics.

I invented a secret code once that none of my friends could break. Is it worth any money?

JH: Like many sorts of inventing, coming up with a cryptographic system looks easy at first.  Unlike most inventions, however, it’s not always obvious if a secret code doesn’t “work.” It’s easy to get into the mindset that there’s only one way to break a system so all you have to do is test that way.  Professional codebreakers know that on the contrary, there are no rules for what’s allowed in breaking codes. Often the methods for codebreaking with are totally unsuspected by the codemakers. My favorite involves putting a chip card, such as a credit card with a microchip, into a microwave oven and turning it on. Looking at the output of the card when bombarded
by radiation could reveal information about the encrypted information on the card!

That being said, many cryptographic systems throughout history have indeed been invented by amateurs, and many systems invented by professionals turned out to be insecure, sometimes laughably so. The moral is, don’t rely on your own judgment, anymore than you should in medical or legal matters. Get a second opinion from a professional you trustyour local university is a good place to start.

A lot of news reports lately are saying that new kinds of computers are about to break all of the cryptography used on the Internet. Other reports say that criminals and terrorists using unbreakable cryptography are about to take over the Internet. Are we in big trouble?

JH: Probably not. As you might expect, both of these claims have an element of truth to them, and both of them are frequently blown way out of proportion. A lot of experts do expect that a new type of computer that uses quantum mechanics will “soon” become a reality, although there is some disagreement about what “soon” means. In August 2015 the U.S. National Security Agency announced that it was planning to introduce a new list of cryptography methods that would resist quantum computers but it has not announced a timetable for the introduction. Government agencies are concerned about protecting data that might have to remain secure for decades into the future, so the NSA is trying to prepare now for computers that could still be 10 or 20 years into the future.

In the meantime, should we worry about bad guys with unbreakable cryptography? It’s true that pretty much anyone in the world can now get a hold of software that, when used properly, is secure against any publicly known attacks. The key here is “when used properly. In addition to the things I mentioned above, professional codebreakers know that hardly any system is always used properly. And when a system is used improperly even once, that can give an experienced codebreaker the information they need to read all the messages sent with that system.  Law enforcement and national security personnel can put that together with information gathered in other waysurveillance, confidential informants, analysis of metadata and transmission characteristics, etc.and still have a potent tool against wrongdoers.

There are a lot of difficult political questions about whether we should try to restrict the availability of strong encryption. On the flip side, there are questions about how much information law enforcement and security agencies should be able to gather. My book doesn’t directly address those questions, but I hope that it gives readers the tools to understand the capabilities of codemakers and codebreakers. Without that you really do the best job of answering those political questions.

Joshua Holden is professor of mathematics at the Rose-Hulman Institute of Technology in Terre Haute, IN. His most recent book is The Mathematics of Secrets: Cryptography from Caesar Ciphers to Digital Encryption.

## This Halloween, a few books that won’t (shouldn’t!) die

If Halloween has you looking for a way to combine your love (or terror) of zombies and academic books, you’re in luck: Princeton University Press has quite a distinguished publishing history when it comes to the undead.

A post shared by Princeton University Press (@princetonupress) on

As you noticed if you follow us on Instagram, a few of our favorites have come back to haunt us this October morning. What is this motley crew of titles doing in a pile of withered leaves? Well, The Origins of Monsters offers a peek at the reasons behind the spread of monstrous imagery in ancient empires; Zombies and Calculus  features a veritable course on how to use higher math skills to survive the zombie apocalypse, and International Politics and Zombies invites you to ponder how well-known theories from international relations might be applied to a war with zombies. Is neuroscience your thing? Do Zombies Dream of Undead Sheep? shows how zombism can be understood in terms of current knowledge regarding how the brain works. Or of course, you can take a trip to the graveyard of economic ideology with Zombie Economics, which was probably off marauding when this photo was snapped.

If you’re feeling more ascetic, Black: The History of a Color tells the social history of the color black—archetypal color of darkness and death—but also, Michel Pastoureau tells us, monastic virtue. A strikingly designed choice:

A post shared by Princeton University Press (@princetonupress) on

Happy Halloween, bookworms.