## Bet You Can’t Solve The Birthday Paradox

If you’ve heard of the Birthday Paradox and/or like math puzzles and/or want to know how it connects with Computational Genomics and the Seven Bridges of Konigsberg, this is for you.

Math cake! By Sarah Lynn

The Birthday Paradox (which would be more accurately named The Birthday Somewhat Unintuitive Result) asks “How many people do you need in a group before there’s a 50% chance that at least two share a birthday?”

It’s easier to flip it around and ask “For a given number of people, what are the chances that NONE of them share a birthday?” This makes it simpler: each time we add another person to the group, we just need to calculate the number of “open” birthdays and multiply by the odds of our new member having one of those.

P(no shared birthdays for n people) =

If we just keep increasing n and calculating the probability, we find that with 23 people there’s a 50% chance of at least two people sharing a birthday.

(Ok, technically we answered “Given a number of people what probability…” and used brute force instead of “Given a probability what number of people…” but let’s ignore that; everyone else does.)

#### How about if we want to know the probability that no THREE people in a group share a birthday?

This variant is trickier, and has tripped up many smart people. Do you think you can solve it?

Give it a shot! I’ll talk about the solution after some context for why it matters and some graphics/tools made with Wolfram Mathematica. I started as a machine learning research scientist with Wolfram earlier this year and I’ve been really enjoying playing with the tools!

### Birthdays, Bridges, de Bruijn Graphs, and… Bgenomics

This is more than an idle math puzzle; it’s related to a fascinating challenge in Computational Genomics. (It was actually a question on my homework in grad school.)

When we want to read a DNA sequence, it’s usually far too long for our machines to process all at once. Instead, we copy the sequence a bunch, slice the copies up, and gather all the pieces of a chosen, more manageable, length — say, 4 base pair “letters”.

In the end, we know every length-four subsection in our DNA sequence, we just don’t know their order. For example, if we had a length-7 sequence and took all the random chunks of 4, we might end up with

TACA, ATTA, GATT, TTAC

Now, as though it were a one-dimensional jigsaw puzzle, we try to piece them together. Each chunk of 4 will overlap with its neighbors by 3 letters: the chunk ATTA ends with TTA, so we know the next chunk must start with TTA. There’s only one which does — TTAC — so those pieces fit together as ATTAC. Now we look for a piece that begins with TAC, and so on.

In our case, there’s only one unique way to arrange the five chunks:

GATTACA

As the sequences get longer, scientists turn to graph theory to find this arrangement. Treating each DNA chunk as an edge, we can form a directed graph indicating which chunks could follow (overlap with) each other.

This overlapping-ness graph is called a De Bruijn Graph, and if there’s a path which uses every edge exactly once, we’ve done it: we’ve found a way to order the DNA chunks and reconstruct the larger sequence!

If this sounds a bit like the Seven Bridges of Konigsberg problem, there’s a reason — it’s the same issue. It’s as though we were walking from “overlap island” to “overlap island”, each time saying to ourselves “Ok, if I have a piece ending in GCA, what bridge-chunk could come next?” and hoping to find a path that uses every chunk.

Since Euler solved the Bridges of Konigsberg problem, this type of path — using every edge exactly once — is known as an Eulerian Path. The great thing is that we have really efficient algorithms to find them!

However, we can run into trouble if some of our “overlap” sections aren’t distinct. If a section of DNA is repeated, that’s ok — we can probably still find the Eulerian Path through the graph.

…But if a section of the original DNA repeats three times, we’re screwed. When the repeat is at least as long as our “overlap” we can no longer find a unique path — multiple Eulerian Paths exist.

Let’s take the sequence AACATCCCATGGCATTT, in which the phrase “CAT” repeats three times. Once we reach the “ACAT” chunk, we don’t know what comes next. Overlapping with chunk “CATT” would lead us straight to the end — leaving out many chunks — so we know that comes last. But the loops starting either CATG or CATC could come next.

So, if we’re going to read a long DNA sequence, we might ask:
How many overlapping chunks of 4 can we take before there’s a 50% or a 5% or 1% chance that we see a triple-repeat which ruins our attempt to reconstruct the original?

### Back to the Birthday Problem

With our Birthday Problem, there are 365 different birthdays a person can have. With DNA chunks of 4, there are 64 different three-letter ways each chunk could end. If any three chunks have the same ending, we won’t know how to reconstruct our sequence.

As the chunks get longer, we have a much better chance of producing a unique Eulerian Path from our graph.

While we can’t move the Earth farther from the Sun (nor should we (probably)) to increase the number of possible birthdays in a year, we CAN use chunks larger than 4 and increase the number of ways each chunk can end. So if we know we’re sequencing a genome 100,000 letters long, how long do our chunks need to be in order for us to have a >99% chance of reconstructing it?

Since starting my job at Wolfram Research, I’ve been playing with their graph capabilities and put together this little interactive tool. It generates a random gene and shows the De Bruijn Graph when you take chunks of different lengths. It’s amazing how quickly a totally chaotic graph becomes more orderly!

(The cloud-deployment can be a bit sluggish, but give it a second after clicking a button. If you get the desktop version of Wolfram Mathematica you can play with things like this incredibly quickly. They’re so cool.)

Heck if I know. Sorry.

I can get the right answer of about 88 by running simulations, but I didn’t manage to derive the general formula for my class.

Every time I’ve shown this question to a friend — and the first time I saw it on my Computational Genomics homework — the response has been “Oh, this is simple. You just… wait, no, that won’t work. We can just… well… hm.”

Stack Exchange confirmed my fears: it’s ugly and we typically try to find approximations. I was momentarily excited to find Dr. Math claim to solve it, but they’d made a mistake and other mathematicians corrected them.

This 2005 paper in The Journal of Statistical Planning and Inference by Anirban DasGupta provides an answer, but it’s way more involved than I expected:

### Why is this so ugly?

In the original version, there’s a unique situation — each person has different birthdays. But in our version, for 23 people:

• each person could have distinct birthdays
• one pair could share a birthday and the other 21 are distinct
• two pairs could share birthdays and the other 19 are distinct
• three pairs could share birthdays and the other 17 are distinct
• eleven pairs could share birthdays and the last one is distinct

For each scenario, we need to calculate the number of ways it can occur, the probability of each, and how it impacts our chance of getting a triple. It’s a mess.

But enough of my complaining about an old homework problem I never solved and which I’m clearly over and never think about.

How did you approach the problem? Did you solve it? Let me know!

Personal note: In my continuing efforts against Perfectionism, I’m going to declare this done. It’s taken up real estate in my head long enough.

## Forget 3-D Chess; Here’s My 1-D Chess Rules

Chess is sometimes held up as the embodiment of strategy and brilliance — if you’re playing chess while your opponent is playing checkers, you’re out-thinking them. Those even smarter can play chess in higher dimensions, with 3-D chess often used as a metaphor for politics. (There’s even a 5-D chess game on Steam which looks mind-bending.)

But going the other direction, the existence of 5-D, 3-D, and 2-D chess made me wonder: is there a way 1-D chess could work? And be fun, that is.

I’m not the first to have this thought; many people have tried their hand at designing one-dimensional chess including the late great Martin Gardner. His approach was for each side to have a single King, Knight, and Rook at the ends of an eight-tile long board. With so few pieces and spaces it’s fairly easy to “solve” the game, mapping out every possible move the same way we can solve tic-tac-toe.

I set out to create 1-D Chess which kept the spirit of the game as much as possible. It was initially inspired by conversations with Brienne years ago about designing mobius chess (which is topologically identical to playing on a loop, but is *obviously* cooler.)

## Values to Preserve

1. Low complexity – Piece moves are simple, there are few rules
2. High depth – Many games are possible, with a mix of strategy and tactics
3. Full information – No fog of war, no hidden cards, no randomness
4. Personalized openings – Different opening play/counter-play options to match your aesthetics and strengths.

The last one is contentious — I know many people bemoan the amount of memorization required to learn the various chess openings. Bobby Fischer even famously proposed Fischer Random Chess which randomized the back row each game, thus stripping the game down to a player’s ability to understand the situation and respond.

However, I happen to enjoy the way you can study various opening strategies and say “I prefer to use the Alapin Variation to counter the Accelerated Dragon Sicilian Defense — I hate ceding the middle of the board.” Being able to steer the game toward your preferred style before getting into tactical elements of the game is a key part of what makes a game feel like *chess* to me.

So, after a lot of brainstorming and a lot of rejected ideas — see the last section — I whittled it down to a few core concepts. Pictures are worth a thousand words (although I’m sure there are opportunities for arbitrage somewhere…) so here’s a screenshot of the game I started building in Tabletop Simulator:

## My Proposal for 1D Chess

1. Ring Board – 28 squares; the outside of a standard chess board
2. 12 Pieces per side – 4 fewer pawns, but otherwise the same pieces
3. Placement Control – Players take turns placing non-pawns in their region to set up

### Ring Board

Look, nobody said it had to be a line segment. Since each square has exactly two neighbors and the entire board is connected, it counts as 1-D.  Put it into polar coordinates if you have to.

Using a 28-square ring allows us to keep the standard chess board, but it also allows much more depth of play without adding complexity to the rules. Like in 2-D chess, you can focus your attack on one side or the other, and you have the ability to try interrupting your opponent’s plans by striking and causing havoc on the other side of the fight.

### 12 Pieces, Simple Moves

Similarly, I stuck with the original pieces and kept their movement as close in spirit as I could:

• Pawn: Move forward one or capture two spaces ahead, ignoring the square in front. Cannot turn around.
• Bishop: Moves up to 6 spaces, 2 at a time (hopping over every other square).
• Rook: Moves up to 3 spaces forward, 1 at a time. [EDIT: Because the Rooks slide instead of hop, they get stuck easily. My current solution is that they can move *though* the King.]
• Knight: Jumps either 3 or 5 squares
• Queen: Can move like the Rook or Bishop
• King: Moves one square.

This move set creates parallels to the 2-D version: Bishops stay on their color, pawns can get locked together, and Knights have a unique move (5 squares) that not even the Queen has.

The moves themselves stay fairly simple, but allow the kind of interplay that I like in 2-D chess with pieces defending each other and getting in each other’s way.

### Opening Placement

Each player has 12 opposite squares to start, with 2 on each end filled by pawns. The remaining 8 squares are up to the players to arrange.

Starting with White, the players take turns placing one of their pieces on an empty square between their pawns.

It’s up to you: You can choose to create an unbalanced attack with both Knights on one side, ready to jump over the pawns and storm the enemy. You can choose to put your Bishops on the inside, where they have an easier time of getting out, or on the outside so that the Rooks are the last line of defense to mop up any attacks. You can leave the King with the Queen — your strongest piece — or between two Rooks…

There are lots of possibilities which rely on how you enjoy playing and how your opponent seems to be setting up. While the complexity of this rule is low, it adds immense depth to the game and prevents it from being quite so easily “solved”.

By requiring the pawns to take up the outermost two spaces, initial move choices are limited to advancing a pawn or using a Knight to hop over them. Moving one pawn can give your Bishops or Queen a way to move through them and enter the fray.  This is all just like in the 2-D version in a way I find aesthetically very pleasing.

If you prefer to just focus on the tactical side of things, you can use the normal ordering or give both players mirrored random arrangements.

### Ideas that I considered but didn’t use:

Here are some snippets of ideas that I had but rejected because the complexity/depth tradeoff wasn’t good enough, or the game strayed too far and stopped being recognizable as “Chess”.

• Making pieces face a direction, limiting them to moving forward
• Allowed to turn around if the square immediately in front of them is filled
• Might allow rules that make it easier to capture pieces from the back
• Pieces can only capture certain types of pieces (in either a rock-paper-scissors style or Stratego style)
• Ranged attacks without moving
• Allow pieces to swap with each other
• Either upon landing on your own, or as a type of movement
• Pieces that push or pull rather than capture
• Pieces that move differently when next to certain others
• Rooks launch pawns, for example
• The Queen could move in the pattern of any piece in a contiguous chain with her
• Different terrain
• Mud tiles which must be stopped on
• Rocky terrain which prevents knights from landing on it
• Pieces spawn new pieces next to them as an action

## A Pretty-Good Mathematical Model of Perfectionism

I struggle with perfectionism. Well, not so much “struggle with” — I’m f*cking great at it. It comes naturally.

There are some upsides, but perfectionism is also associated with anxiety, depression, procrastination, and damaged relationships. Perhaps you, like I, have spent far too much time and emotional energy making sure that an email had the right word choice, had no typos, didn’t reuse a phrase in successive sentences/paragraphs, and closed with the ‘correct’ sign-off. (‘Best,’ is almost always optimal, by the way).

“If I couldn’t do something that rated 10 out of 10 — or at least close to that — I didn’t want to do it at all. Being a perfectionist was an ongoing source of suffering and unhappiness for me … Unfortunately, many of us have been conditioned to hold ourselves to impossible standards. This is a stressful mind state to live in, that’s for sure.” ~ Tony Bernard J.D.

The topic of perfectionism confused me for years. Of course you want things to be perfect; why would you ever actively want something to be worse? However, there’s way more to it than that: It’s a complex interplay between effort, time, motivation, and expectations.

Far too many self-help recommendations essentially said “Be ok with mediocrity!” which… did not speak to me, to say the least.

To better understand the concept, I went through a number of books and papers before building a quasi-mathematical model. You know, like ya’do.

I’ve come to see perfectionism as a mindset with a particular calibration between the quality of your work and your emotional reaction — with decreased sensitivity to marginal differences in lower-quality work and increasing sensitivity as the quality goes up.

• In a “Balanced” mindset, you become happier in linear proportion to how much better your work is going. (y = x)
• In a “Satisficing” mindset — taking a pass/fail test, for example — you care about whether something is “good enough”. Most of your emotional variance comes as you approach and meet that threshold.  ( e^x / (1+e^x) )
• In a Perfectionist mindset, the relationship between quality and emotion is polynomial. You feel almost equally bad about scoring a 40% on a test vs. a 65%, but the difference between a 90% and 93% looms large. (y = x^7)

Looking at the model, I realized it could explain a number of experiences I’d had.

### Why even small tasks seem daunting to a perfectionist

A common experience with a perfectionist mindset is having trouble ‘letting go’ of a project — we want to keep tinkering with it, improving it, and never feel quite comfortable moving on.  (I don’t want to say how long this draft sat around.)

This make sense given the model:

When I think about clicking ‘send’ or ‘post’ before I’ve checked for typos, before I’ve reread everything, before considering where it might be wrong or unclear… it just feels, well, WRONG. I’m not yet happy with it and have trouble declaring it done.

Apart from requiring more time and effort, this can make even seemingly trivial tasks feel daunting. Internally, if you know that a short email will take an hour and a half it’s going to loom large even if you have trouble explaining quite why such a small thing is making you feel overwhelmed.

What’s helped me: A likely culprit is overestimating the consequences of mistakes. One solution is to be concrete and write down what you expect to happen if it turns out you have a typo, miss a shot, or bomb a test. Sometimes all it takes to readjust is examining those expectations consciously. Other times you’ll need to experience the ‘failure’, at which point you can compare it to your stated expectations.

### Why perfectionists give up on hobbies and tasks easily

Another way to look at this is: if you don’t expect to reach high standards, a project just doesn’t seem worth doing.

The result is a kind of min-max of approach to life: If you can’t excel, don’t bother spending time on it.

That’s not necessarily a bad thing!

However, we don’t always have control. In my nonprofit communications career, I sometimes got assigned to write press releases on topics that *might* get attention, but which seemed not newsworthy to me. It may have still been worth the few hours of my time in case it grabbed a reporter’s eye. It was important to keep my job. But I had so. much. trouble. getting myself to do the work.

Even in the personal realm, picking up a new hobby is made difficult. If it doesn’t seem like you’re going to be amazing at it, the hobby as a whole loses its luster.

What’s helped me: A big problem for me has been overlooking the benefits gained from so-called “failure”. Once I start to factor in e.g. how much I expect to learn (so that I can do better in the future) I end up feeling much better about giving things a shot.

### Why procrastination (and anxiety) are common

At a granular scale, the problem becomes worse. Rather than “How good do I expect to feel at the end of this?” our emotional reaction is probably trained by the in-the-moment “How much happier do I expect to feel as a result of one more bit of work?”

In other words, we can view the derivative/slope of these graphs as motivation:

With a perfectionist mindset, the bigger and further away a goal is, the more difficult it will be to feel motivated in the moment.  For much of the time, we’re trying to push ourselves to work without getting any internal positive reinforcement.

This is a particular issue in the Effective Altruism movement where the goal is to *checks notes* Save the World. Also, to (“Figure out how to do the most good, and then do it.”)

It’s true that as a perfectionist nears their goal, they’re extremely motivated! But that also means that the stakes are very high for every decision and every action.  …Which is a recipe for anxiety. Terrific.

What’s helped me: To the extent that I can, I find that breaking tasks into pieces helps. If I think of my goal as “Save the World”, another day of work won’t feel very important. But a goal of “Finish reading another research paper” is something I can make real progress on in a day!

## All models are wrong, but some are useful

This framework isn’t perfect. Neither is this writeup. (I’m hyper-aware.) But this idea has been in my head, in my drafts folder, and unfinished for months. Rather than give in to the sense that I “should” keep working on it, I’m going to try following my own advice. I’m remembering that:

• I’ve clarified my thinking a ton by writing everything down.
• The consequences of a sloppy post in are minimal in the big scheme of things.
• This isn’t supposed to be my final conclusion – it’s one step on the path

Even if it’s not perfect, perhaps the current iteration of this framework can help you understand me, yourself, or perfectionists in your life.

I used to have this “DONE IS BETTER THAN PERFECT” poster draped over a chair in my office. I never got around to hanging it up, but honestly? It seems better that way.

The-Perfectionist-Script-for-self-defeat by David Burns (pdf)

When Perfect Isn’t Good Enough by

Mastering the Art of Quitting by Peg Streep & Alan Bernstein

Better By Mistake by Alina Tugend

The Procrastination Equation by Piers Steel

## How has Bayes’ Rule changed the way I think?

People talk about how Bayes’ Rule is so central to rationality, and I agree. But given that I don’t go around plugging numbers into the equation in my daily life, how does Bayes actually affect my thinking?
A short answer, in my new video below:

(This is basically what the title of this blog was meant to convey — quantifying your uncertainty.)

## Colbert Deconstructs Pop Music, Finds Mathematical Nerdiness Within

Stephen Colbert channeling Kurt Godel

And here I thought I didn’t like pop music. Turns out I just hadn’t found the songs that invoke questions about the foundations of logic and mathematics. Fortunately, Stephen Colbert brings our attention to the fascinating – and paradoxical! – pop song “That’s What Makes You Beautiful” by One Direction. Watch Stephen do his thing deconstructing the lyrics with glorious nerdy precision before we take it even further (the good part starts at 1:54 or so):

[gigya src=”http://media.mtvnservices.com/mgid:cms:item:comedycentral.com:418915&#8243; width=”512″ height=”288″ quality=”high” wmode=”transparent” allowFullScreen=”true” ]

For those of you who can’t watch the video, here’s the nerdy part, hastily transcribed:

Their song “That’s What Makes You Beautiful” isn’t just catchy, it has a great message. “You don’t know you’re beautiful. That’s what makes you beautiful.”

First of all: great dating advice. Remember girls, low self esteem – very attractive to men. Guys always go for the low hanging fruit, easy pickings.

Second: the lyrics are incredibly complex! You see, the boys are singing “You don’t know you’re beautiful, that’s what makes you beautiful.” But they’ve just told the girl she’s beautiful. So since she now knows it, she’s no longer beautiful!

But – stick with me, stick with me, oh it goes deeper! – but she’s listening to the song, too. So she knows she’s not beautiful. Therefore, following the syllogism of the song, she’s instantly beautiful again!

It’s like an infinite fractal recursion, a flickering quantum state of both hot and not. I mean, this lyric as iterated algorithm could lead to a whole new musical genre. I call it Mobius pop, which would include One Direction and of course the rapper MC Escher.

They say the way to a man’s heart is through his stomach but honestly, talking about recursion, fractals, and flickering quantum states does far more to win my love.  We can find intellectual stimulation in anything!

And there’s more – we can go nerdier!

### Stick With Me, Stick With Me, Oh It Goes Deeper

Let’s analyze the dilemma a bit further:

1. She can’t KNOW she’s beautiful because, as Stephen points out, that leads to a logical contradiction – she would no longer be beautiful.
2. She can’t KNOW that she isn’t beautiful, because that also leads to a logical contradiction – she would be beautiful again.
3. It’s impossible for the girl to know that she is or isn’t beautiful, so she has to be uncertain – not knowing either way.
4. This uncertainty satisfies the requirements: she doesn’t know that she’s beautiful, therefore, she’s definitely beautiful and can’t know it.

It turns out she’s not in a flickering state of hot and not, she’s perpetually hot – but she cannot possibly know it without logical contradiction! From an external perspective, we can recognize it as true. From within her own mind, she can’t – even following the same steps. How weird is that?

Then it hit me: the song lyrics are a great example of a Gödel sentence!

Gödel sentences, from Kurt Gödel’s famous Incompleteness Theorems, are the statements which are true but unprovable within the system.  Gödel demonstrated that every set of mathematical axioms complex enough to stand as a foundation for arithmetic will contain at least one of these statements: something that is obviously true from an outside perspective, but isn’t true by virtue of the axioms.  (He found a way to coherently encode “The axioms do not prove this sentence to be true.”)  This raises the question: what makes a mathematical statement true if not the fact that it can be derived from the axioms?

Gödel’s findings rocked the world of mathematics and have had implications on the philosophy of mind, raising questions like:

• What does it mean to hold a belief as true?
• What are our minds doing when we make the leap of insight (if insight it is) that identifies a Gödel sentences as true?
• How does this set us apart from the algorithmic computers, which are plagued by their own version of Incompleteness, the Halting Problem?

I had no idea pop music was so intelligent!

Was the boy band comparing her, not to a summer’s day, but a turing-complete computer?  Were they glorifying their listeners by reminding us that, according to some interpretations of Incompleteness Theory, we’re more than algorithmic machines?  Were they making a profound statement about mind/matter dualism?

I don’t know, but apparently I should turn on the radio more often.

[For related reading, see various analyses of Mims’ “This is Why I’m Hot”]

As they say in the Sirius Cybernetics Corporation: Share and Enjoy!

## Easy Math Puzzle – Or is it?

How good are you at basic math? Can you solve this simple logic puzzle? Here, give it a go and let me know how long it took you to answer:

Got it yet?

It looks easier than it is. The options are presented beautifully to cause maximum mental confusion.

As my dad put it, the answer depends on the answer. If the answer is 60%, it’s 25%. If the answer is 25% it’s 50%. If the answer is 50% it’s 25%. There’s an endless loop with no correct answer.

Don’t lose sleep, I “found” an answer, it was hidden: [edited for clarity]

Yes, I photoshopped this. I’m either cheating or engaging in outside-the-box thinking. Sometimes it’s tough to tell the difference.

My preferred set of answers would be:

• A) 25%
• B) 50%
• C) 75%
• D) 50%

Though I’m tempted to throw a “0%” in for good measure…

(Puzzle via PostSecret by way of Spencer of Ask a Mathematician/Ask a Physicist)

[Edited for clarity]

## Spinoza, Godel, and Theories of Everything

On the latest episode of Rationally Speaking, Massimo and I have an entertaining discussion with Rebecca Goldstein, philosopher, author, and recipient of the prestigious MacArthur “genius” grant. There’s a pleasing symmetry to her published oeuvre. Her nonfiction books, about people like philospher Baruch Spinoza and mathematician Kurt Godel, have the aesthetic sensibilities of novels, while her novels (most recently, “36 Arguments for the Existence of God: A Work of Fiction”) have the kind of weighty philosophical discussions one typically finds in non-fiction.

It’s a wide-ranging and fun conversation. My main complaint is just over her treatment of Spinoza. Basically, people say he “believed God was nature.” That always made me roll my eyes, because it’s not making a claim about the world, it’s merely redefining the word “God” to mean “nature,” for no good reason. I voice this complaint to Rebecca during the show and she defends Spinoza; you can see what you think of her response, but I felt it to be weak; it sounded like she was just pointing out some dubious similarities between nature and the typical conception of God.

Nevertheless! It’s certainly worth a listen:

http://www.rationallyspeakingpodcast.org/show/rs45-rebecca-newberger-goldstein-on-spinoza-goedl-and-theori.html

## Lies and Debunked Legends about the Golden Ratio

In my eyes, there’s a general pecking order for named mathematical constants. Pi is at the top, e gets a good amount of attention, and Tau, like a third-party candidate, sits by itself on the fringes while its supporters tell anyone who’ll listen that it’s a credible alternative to Pi. But somewhere in the middle is Phi, also known as the Golden Ratio. It’s no superstar, but it gets its fair share of credit in geometry and culture.

I was first introduced to Phi as a kid by watching the charming video Donald in Mathmagic Land. One of the things I remembered over the years is that the Greeks used the Golden Ratio in their paintings and architecture, particularly the Parthenon. Thanks to the power of the internet, I can share this piece of my childhood with you:

How brilliant and advanced of the Greeks, right? But there’s one problem…

It’s probably not true. My faith was first shaken reading Keith Devlin’s The Unfinished Game, where he entertained a quick digression:

Two other beliefs about this particular number [Phi] are often mentioned in magazines and books: that the ancient Greeks believed it was the proportion of the rectangle the eye finds most pleasing and that they accordingly incorporated the rectangle in many of their buildings, including the famous Parthenon. These two equally persistent beliefs are likewise assuredly false and, in any case, are completely without any evidence. For one thing, tests have shown that human beings who claim to have a preference at all vary in the rectangle they find most pleasing, both from person to person and often the same person in different circumstances. Also, since the golden ratio is actually not a ratio of two whole numbers, it is impossible to construct (by measurement) a rectangle having that proportion, even in theory.

What?! Donald, I trusted you! It was tempting to tell myself that the Greeks could have found ways to approximate the ratio, and that this is just one source, and I’ve heard it so many times it must be true, and la la la I don’t want Donald to have lied to me.

But I looked into it a bit more, checking out what Mario Livio had to say about it in his book The Golden Ratio. He acknowledges that it’s a very common belief, but ultimately backed Devlin up:

The appearance of the Golden Ratio in the Parthenon was seriously questioned by University of Maine mathematician George Markowsky in his 1992 College Mathematics Journal article “Misconceptions about the Golden Ratio.” Markowsky first points out that invariably, parts of the Parthenon (e.g. the edges of the pedestal [in a provided figure]) actually fall outside the sketched Golden Rectangle, a fact totally ignored by all the Golden Ratio enthusiasts. More important, the dimensions of the Parthenon vary from source to source, probably because different reference points are used in the measurements… I am not convinced that the Parthenon has anything to do with the Golden Ratio.

So, was the Golden Ratio used in the Parthenon’s design? It is difficult to say for sure… However, this is far less certain than many books would like us to believe and is not particularly well supported by the actual dimensions of the Parthenon. [emphasis mine]

Alas, claims about the Greeks using Phi in their architecture seem overrated. Some sites bring you celebrity gossip, we bring gossip about celebrated mathematical constants. Welcome to Measure of Doubt!

Watching the video again, I can’t tell exactly how they decided where to overlay the Golden Rectangles. How much of the pedestal do we include in the rectangle? How much of the pillar? Does the waist start here, or there? It seems a bit arbitrary, as though we’re experiencing pareidolia and seeing the Golden Rectangle in everything.

## Self-Referential Haikus and Nerdy Math Shirts

I don’t always buy t-shirts. But when I do, I tend to make them really nerdy ones. ThinkGeek is a good source, but Snorg Tees might be my new favorite.

Self-reference, like this sentence, is hilarious.

But you can never have just one haiku. When they get out in public, they have a tendency to spawn as people are inspired to create their own. Here was my contribution to the arts:

Haiku are easy
but the ones I write devolve
into self-reference.

To which a friend responded,

Reference. Syllables?
If reference is two, I’m good.
Three? Then I am screwed.

If self-reference isn’t your cup of tea, SnorgTees also has a couple great math shirts:

That’s right: I keep it real. After I posted the picture to Facebook, a cousin commented:

It might be real…but it’s not natural.

and my dad chimed in with the brilliant:

Aren’t you the negative one.

I love my family and friends.

## The darker the night, the brighter the stars?

“The darker the night, the brighter the stars” always struck me as a bit of empty cliche, the sort of thing you say when you want to console someone, or yourself, and you’re not inclined to look too hard at what you really mean. Not that it’s inherently ridiculous that your periods of pleasure might be sweeter if you have previously tasted pain. That’s quite plausible, I think. What made me roll my eyes was the implication that periods of suffering could actually make you better off, overall. That was the part that seemed like an obvious ex post facto rationalization to me. Surely the utility you gain from appreciating the good times more couldn’t possibly be outweighed by the utility you lose from the suffering itself!

Or could it? I decided to settle the question by modeling the functional relationship between suffering and happiness, making a few basic simplifying assumptions. It should look something roughly like this:

Total Happiness = [(1-S) * f(S)] – S

where*
S = % of life spent in suffering
(1-S) = % of life spent in pleasure
f(S) = some function of S

As you can see, f(S) acts as a multiplier on pleasure, so the amount of time you’ve spent in suffering affects how much happiness you get out of your time spent in pleasure. I didn’t want to assume too much about that function, but I think it’s reasonable to say the following:

• f(S) is positive — more suffering means you get more happiness out of your pleasure
• f(0) = 1, because if you have zero suffering, there’s no multiplier effect (and multiplying your pleasure by 1 leaves it unchanged).

… I also made one more assumption which is probably not as realistic as those two:

•  f(S) is linear.**

Under those assumptions, f(S) can be written as:
f(S) = aS + 1

Now we can ask the question: what percent suffering (S) should we pick to maximize our total happiness? The standard way to answer “optimizing” questions like that is to take the derivative of the quantity we’re trying to maximize (in this case, Total Happiness) with respect to the variable we’re trying to choose the value of (in this case, S), and set that derivative to zero. Here, that works out to:

f'(S) – Sf'(S) – f(S) – 1 = 0

And since we’ve worked out that f(S) = aS + 1, we know that f'(S) = a, and we can plug both of those expressions into the equation above:

a – Sa – aS – 1 – 1 = 0
a – 2aS = 2
-2aS = 2 – a
2aS = a -2
S = (a – 2) / 2a

That means that the ideal value of S (i.e., the ideal % of your life spent suffering, in order to maximize your total happiness) is equal to (a – 2)/2a, where a tells you how strongly suffering magnifies your pleasure.

It might seem like this conclusion is unhelpful, since we don’t know what a is. But there is something interesting we can deduce from the result of all our hard work! Check out what happens when a gets really small or really large. As a approaches 0, the ideal S approaches negative infinity – obviously, it’s impossible to spend a negative percentage of your life suffering, but that just means you want as little suffering as possible. Not too surprising, so far; the lower a is, the less benefit you get from suffering, so the less suffering you want.

But here’s the cool part — as a approaches infinity, the ideal S approaches 1/2. That means that you never want to suffer more than half of your life, no matter how much of a multiplier effect you get from suffering – even if an hour of suffering would make your next hour of pleasure insanely wonderful, you still wouldn’t ever want to spend more time suffering than reaping the benefits of that suffering. Or, to put it in more familiar terms: Darker nights may make stars seem brighter, but you still always want your sky to be at least half-filled with stars.

* You’ll also notice I’m making two unrealistic assumptions here:

(1) I’m assuming there are only two possible states, suffering and pleasure, and that you can’t have different degrees of either one – there’s only one level of suffering and one level of pleasure.

(2) I’m ignoring the fact that it matters when the suffering occurs – e.g., if all your suffering occurs at the end of your life, there’s no way it could retroactively make you enjoy your earlier times of pleasure more. It would probably be more realistic to say that whatever the ideal amount of suffering is in your life, you would want to sprinkle it evenly throughout life because your pleasures will be boosted most strongly if you’ve suffered at least a little bit recently.

** Linearity is a decent starting point, and worth investigating, but I suspect it would be more realistic, if much more complicated, to assume that f(S) is concave, i.e., that greater amounts of suffering continue to increase the benefit you get from pleasure, but by smaller and smaller amounts.