# Happy Pi Day!

Some random thoughts for #PiDay.

I usually mark occasions like this with flags, but I don’t have a particularly good mathematics flag or a Pi flag. I’ll have to work on that for next year.

I’ll start off with a brain check. How much Pi is in there? Let’s see.

3.14159265358979323846. That’s 20 places past the decimal point. Is that right? Wolfram Alpha says yes.

Learning the digits of Pi was kinda fun and every few years I’d get it in my head to learn a few more digits, usually in clumps of three. Still, I never understood why someone would memorize Pi to 100 or 1000 decimal places.

This begs a question then. Are 21 significant figures enough? I thought about this last year, inspired by an article called “How Much Pi Do You Really Need.” The website asked me to sign up for a membership so I didn’t read it. Thinking about it was more fun anyway. So let’s go!

The radius of the Milky Way Galaxy is about 52,850 light years. That’s kinda-sorta the distance from Trantor to Terminus for my #Foundation friends if we assume that Trantor was in the middle of that big black hole in the center of the galaxy.

Fifty-two thousand, eight hundred and fifty light years is about: 3.1 x 1017 miles or 1.97 x 1022 inches. We’d need 18 significant figures to measure the circumference of the galaxy to the nearest mile or 23 to get to the nearest inch. So, assuming we could measure everything else as accurately (which, of course, we can’t) we’d need Pi accurate to 17 or 22 digits respectively. Thus π = 3.1415926535897932384626 is all the Pi you need for even the most impractical purposes. My 20 digits are more than enough.

For practical purposes? The serious answer can’t be more than four or five.

Featured Image: Some art done by mathematics students at Elmira College on Pi Day, 2019. The pictures were built out of graphs of functions in Cartesian and polar coordinates.

# The Grouping Number Method

This is an excerpt from a previous post, but if I want to introduce someone to the grouping number method, they don’t need all of the commentary about the AC method.

Are you looking for a nice and intuitive method for factoring quadratics when the leading coefficient isn’t one? Most people were probably taught to break these these things down by trial and error. That isn’t awful once you’ve developed some intuition, but if you haven’t, trial and error quickly becomes tedious. What should we start with instead? The grouping number method works well, especially if you’re just starting out.

To set up the Grouping Number Method, let’s think about what happens in the following polynomial multiplication.

$(4x-1)(2x-3)$

$=2x(4x-1)-3(4x-1)$

$=8x^2 -2x -12x +3$

$=8x^2 -14x +3$

Normally, you’d just skip the second step, but it’s important to realize that what you’re really doing is using the distributive property twice. Additionally, let’s think about the -12 and the -2. It’s clear that they add up to the final coefficient of x, but it’s also true that their product (-12)(-2) = 24 is the same as the product of the leading coefficient and the constant term, (8)(3). Notice this has to be true. In either case, it’s the product of 4, -1, 2 and -3, merely in a different order.

So, how do we go in the other direction? That is, how do we factor instead of multiply? We’ll demonstrate the grouping number method on the polynomial $8x^2 - 14x + 3$.

The grouping number of a quadratic polynomial is the leading coefficient multiplied by the constant term.

So, in this case, it would be $8 times 3 = 24$.

Next, you want to look for two factors of your grouping number that add up to the coefficient of $x$. In this case, $(-12)(-2) = 24$ and $(-12)+(-2) = -14$. We use these two numbers to rewrite the middle term to get the following.

$8x^2 - 14x + 3 = 8x^2 - 2x - 12x + 3$.

In other words, to rewrite the polynomial in this way, you find two factors of your grouping number that add up to the coefficient of $x$ and use those to break down the middle term.

Why rewrite the polynomial in this way? Because it sets us up perfectly to factor by grouping.

Factoring by grouping is a technique for factoring a polynomial with four terms. In a nutshell, to factor by grouping, you remove the greatest common factor from the first two terms, then remove the greatest common factor from the last two terms. If the resulting binomial factors are the same you can factor this out to get the product of two binomials. Notice, that’s using the distributive property twice, just in the opposite direction as before.

Therefore, to finish factoring the polynomial we can factor by grouping.

$8x^2 - 14x + 3$

$= 8x^2 - 2x - 12x + 3$

$= 2x(4x - 1) - 3(4x - 1)$

$= (4x - 1)(2x - 3)$

Notice this exactly reverses the steps of the multiplication with which we started.

In short, as long as you have no common factors, the quadratic polynomials where the grouping number can be factored into two numbers that add up to the middle coefficient are exactly the ones that can be factored by grouping. All the others are prime.

# Two Flags for Election Day

Happy Election Day 2020! I hope every one who hasn’t is planning to vote. More on that later. Here are two flag related things about this year’s elections.

We’ve decided to fly a 48-Star American Flag to mark the day of one of our most important patriotic duties. Why the 48-star flag? Well, the 48-star flag had the second-longest tenure as the nation’s official flag, from 1912 to 1959, and not once in that time did we suffer an electoral inversion where the Electoral College failed to elect the winner of the popular vote.

The 48-star flag was also the flag for the 1936 Election which is notable for two reasons. It’s the election where Literary Digest predicted a landslide victory for Republican Alf Landon. Don’t recall President Landon? There’s a good reason for that. The Literary Digest poll is literally a textbook example of how not to predict the winner of an election. Predicting that Landon would win 57% to 43%, they were off by a whopping 19 points! That’s the largest error ever in an important opinion poll. Don’t worry though, we’re a lot better at it now.

The other reason that the 1936 election is noteworthy is that it holds the record for the largest electoral-vote landslide in American History. President Roosevelt won 527 electoral-votes to Landon’s 8. That, to borrow a joke from Barbara Holland, was the start of that old saying, “As Maine goes, so goes Vermont.”

There’s one other flag with a connection to Election Day this year because Joanne and I actually cast our ballots on the 24th of October, the first day of early voting. It took us just over an hour standing in line and chatting with some friendly people. Toward the front of the line, in front of the Board of elections, I finally got a good look at a Chemung County flag. It’s the only one I’ve ever seen in the wild and it’s pretty good. It’s got an eagle and a wreath and some stars and it only uses three colors. It ticks off some of the NAVA standards. It could do without all the text and I have no clue about the symbolism but as a municipal flag, it’s above average.

Have a great day and don’t forget to vote!

A couple of weeks ago I covered factoring in my College Algebra class, which we’ll mainly use for working with quadratic equations. This always makes me think about a method for factoring quadratics that I’d never seen before moving back to New York state. Years ago, I looked it up on what I think was an NYS Department of Education website which called it the “AC method” for factoring quadratics. When I tried to find this again, I only found it on YouTube called “slide and divide” and the “Berry Method.” Both of those names seem unnecessarily arcane to me, but for this post, I’ll call this process “slide and divide.” The references to an “AC Method” that I say today were actually talking about the “grouping number method” which we’ll come back to.

I hope that the fact that it’s become difficult to find references to what I think of as the AC Method is evidence that it’s going away. It needs to.

When I was in high school, I remember that factoring quadratics that looked like $ax^2 +bx + c$ was pretty straight forward when $a = 1$, but when $a$ was different from $1$ it got trickier. The only tool we were taught was trial and error, but you need to develop some intuition to use trial and error efficiently. Both the grouping number method and slide and divide attempt to give students a systematic process that builds on the experience of the $a = 1$ case to help them with the $a \neq 1$ case. If you’re a mathematician, and you’ve seen the slide and divide approach, you probably found it horrifying. I know I did. It goes something like this: say you want to factor the following polynomial.

$6 x^2 - x - 12$

You begin by replacing the leading coefficient with $1$ while replacing the constant term with the product of itself and the leading coefficient.

$x^2 - x - 72$

Why do we do this? I’m not sure it’s ever made clear. But this is a lot easier to factor since the leading coefficient is one. We just need to find two factors of $-72$ that add up to the coefficient of the middle term, $-1$, namely $-9$ and $8$ . These become the constant terms of the factors

$(x-9)(x+8)$

We then replace each $x$ with $6x$

$(6x-9)(6x+8)$

…and then remove the common factor from each binomial.

$(2x-3)(3x+4)$

With that, our quadratic polynomial is factored.

The single redeeming feature of this process is that it actually works, but think about these steps. Where did the $6$ in front of the $x^2$ go? Why does it make sense to multiply it into the $-12$? For that matter, why do the $6x$s magically reappear? And why is it okay to just cancel the common factors from the penultimate step? If I thought about it for a moment, I bet I’d actually have even more questions.

I’ve had a few students who wanted to use this method to factor, but none of them was ever able to explain why it works. That’s the ultimate problem with this method. It’s a list of meaningless steps that, once forgotten, will be gone forever because it doesn’t attach to any understanding. If you teach mathematics, it’s incumbent upon you to make your material meaningful to your students. Some people naively believe that this means you have to teach mathematics in a context that is directly relevant to the students’ interest, but in my opinion, that’s not true. You need to help them understand what’s happening and why it’s being done. Each step should have a clear and understandable rationale that helps to drive the process forward. Slide and divide does none of these things.

This process is not irredeemable, however. It is possible to work slide and divide in a way that gives it these characteristics. Let’s go through this in our original example.

$6 x^2 - x - 12$

The idea behind this method is that, if we can rewrite the polynomial with a leading coefficient of one, it will be easier to factor. To do this we need the leading term to be a perfect square. We can make that happen by multiplying the polynomial by $6$. Because we don’t want to change the polynomial, we’ll divide by $6$ at the same time.

$= \frac{36 x^2 - 6x - 72}{6}$

A simple substitution will give us a leading coefficient of $1$. We define $u = 6x$.

$= \frac{u^2 - u - 72}{6}$

Just like we did above, to factor our numerator we need two factors of $-72$ that add up to $-1$, that’s still $-9$ and $8$ .

$= \frac{(u - 9)(u+8)}{6}$

To get back to expressions that involve $x$s, we undo the substitution. That makes it clear why the $6x$s return.

$= \frac{(6x - 9)(6x+8)}{6}$

And now, we’d like to get rid of the $6$s since we don’t need them any longer. Where did the $6$ in the numerator go? It’s inside the common factors of the two binomials. We can factor those out…

$= \frac{3(2x - 3)2(3x+4)}{6}$

…and they clearly cancel with the $6$ in the denominator. That leaves us with our answer.

$= (2x - 3)(3x+4)$

That’s pretty cumbersome and so slide and divide leads you to a no-win-scenario. The quick way doesn’t engender understanding while the more rigorous approach isn’t quick.

So, what should we teach instead? The grouping number method that I mentioned earlier. To set it up, let’s think about what happens in the following polynomial multiplication.

$(4x-1)(2x-3)$

$=2x(4x-1)-3(4x-1)$

$=8x^2 -2x -12x +3$

$=8x^2 -14x +3$

Normally, you’d just skip the second step, but it’s important to realize that what you’re really doing is using the distributive property twice. Additionally, let’s think about the -12 and the -2. It’s clear that they add up to the final coefficient of x, but it’s also true that their product (-12)(-2) = 24 is the same as the product of the leading coefficient and the constant term, (8)(3). Notice this has to be true. In either case, it’s the product of 4, -1, 2 and -3, merely in a different order.

So, how do we go in the other direction? That is, how do we factor instead of multiply? We’ll demonstrate the grouping number method on the polynomial $8x^2 - 14x + 3$.

The grouping number of a quadratic polynomial is the leading coefficient multiplied by the constant term.

So, in this case, it would be $8 \times 3 = 24$.

Next, you want to look for two factors of your grouping number that add up to the coefficient of $x$. In this case, $(-12)(-2) = 24$ and $(-12)+(-2) = -14$. We use these two numbers to rewrite the middle term to get the following.

$8x^2 - 14x + 3 = 8x^2 - 2x - 12x + 3$.

In other words, to rewrite the polynomial in this way, you find two factors of your grouping number that add up to the coefficient of $x$ and use those to break down the middle term.

Why rewrite the polynomial in this way? Because it sets us up perfectly to factor by grouping.

Factoring by grouping is a technique for factoring a polynomial with four terms. In a nutshell, to factor by grouping, you remove the greatest common factor from the first two terms, then remove the greatest common factor from the last two terms. If the resulting binomial factors are the same you can factor this out to get the product of two binomials. Notice, that’s using the distributive property twice, just in the opposite direction as before.

Therefore, to finish factoring the polynomial we can factor by grouping.

$8x^2 - 14x + 3$

$= 8x^2 - 2x - 12x + 3$

$= 2x(4x - 1) - 3(4x - 1)$

$= (4x - 1)(2x - 3)$

Notice this exactly reverses the steps of the multiplication with which we started.

In short, as long as you have no common factors, the quadratic polynomials where the grouping number can be factored into two numbers that add up to the middle coefficient are exactly the ones that can be factored by grouping. All the others are prime.

# My Favorite Math Comic Strip

This began life as an answer to “What is your favorite math comic strip?” on Quora. Within hours it became my most viewed, most commented and most liked answer on that site. I share it here for your enjoyment.

What is your favorite math comic strip?

There’s a lot to choose from. You really can’t go wrong with Calvin and Hobbes, Foxtrot, XKCD and Math With Bad Drawings. I’m hoping to find some new favorites when I read through all the other answers here.

But, three comics immediately come to mind. Here’s two runners-up and my favorite.

The second runner up:

As a mathematician, I can’t help but appreciate this one.

The first runner-up:

Based on the artwork, his one has to be pretty early in the strip’s history. The look on Calvin’s face as he exclaims, “Imaginary Numbers?!” makes me chuckle to this day. Hobbes’ definition, “Eleventeen, thirty-twelve and all those” is priceless. What is your favorite math comic strip Lovely.

And the winner is…

I knew immediately this one was the answer because I remember reading it in the Palm Beach Post and laughing really hard. It’s interesting to me that the real punchline is in the third panel. In retrospect, the first panel may be even funnier once you’ve read the rest of the comic.

Somewhere there’s more. If I can find it, there’s a file of the comics I used to have taped to my office door at the University of Miami. It’s not directly Mathematics-related, but it contains a nice comic about the “Academic Beer Head Theory.” The basic idea is that you shouldn’t cram for exams because if you pour the knowledge into your brain too quickly it gets all foamy and spills out your ears. I’ve been quoting that to students for years. When it surfaces, if it ever surfaces, I’ll add a couple more here.

# Election 2018: Vote Anyway.

I have some intense opinions about politics and generally, I’m happy to engage.  But I don’t want to make this a blog about politics.  If someone stumbles on this blog wanting to read about comics or mathematics or whatever they may not be interested in my opinions about candidate X or birthright citizenship or the current occupant of the Oval Office.  And that should be fine.  Some politics may sneak in from time to time but I’d like this to be a place that’s free from the most divisive arguments we’ve seen in my lifetime.

On the other hand, I’ve been fascinated with elections since I was 12.  I’ve done some work in voting theory and I’ve tried my hand at prognostication.  It’s been my  intention to eventually write about elections on this site.  But the problem, then, was what to write about?  We know the broad strokes of the 2018 election.  The democrats are doing remarkably well in the Generic Congressional Ballot and appear to be poised to retake the House.  That’s pretty remarkable given how heavily gerrymandered a lot of states are. Some of that has to do with the intensity of emotion engendered by President Trump.  It also helps that some of the most egregious gerrymandering we saw after the 2010 election has been overturned in the courts.

In the Senate, it’s a very different story. This is the class of senators that was elected in 2006, a Democratic wave that gave them the majority for the first time in four years. In 2012, despite defending more than 2/3 of the seats up for election, the Democrats actually increased their majority by two. So the Democrats are faced with what fivethirtyeight.com calls “the most unfavorable Senate mapthat any party has ever faced in any election.” Of the 35 senate elections being held this year, only 9 are held by Republicans and only one of those is in a state that’s bluish, namely Nevada. Meanwhile a lot of the seats being defended by democrats are in deep red states like North Dakota and Missouri. Despite being ahead on the Generic Congressional Ballot, it’s entirely possible that the Democrats will lose seats in the Senate.

Aside from the National stage, the most important elections that are happening this year are, in my opinion, the races for State Legislature. We don’t see much national coverage on these elections, but they’re crucially important. This is our first opportunity to elect some of the people who will be drawing the political maps in the wake of the 2020 Census. The candidates we elect now could determine control of the House of Representatives and of State Legislatures for a decade or more.

But all of this is known and it hasn’t shifted much. I could have written the last three paragraphs a month ago. Or two.  But the thing that motivates this post is that I stumbled across this.

A lot of folks pay attention to polls.  The polls influence their tendency to vote.

Democrats in Texas or Republicans in New York might decry their need to go to the polls because the opposition is going to “win anyway.”  But here’s the thing: according to this article (originally published in 2014) the average House poll has, since 1998, been off the final result by 6.2 percentage points.  Polls in senate races and gubernatorial elections have fared somewhat better, missing the final result by 5.1% and 5.2% respectively.  And polling is getting harder.  Response rates are declining making polls more expensive.  The decline in the prevalence of landlines along with laws about contacting people on cell phones are making it harder to get a representative sample.  You might think your Senate candidate is behind by three points, but the race could be a dead heat.

I see this graphic on Twitter a lot in Nate Silver’s feed.  The implication being made that Silver “predicted” that Clinton would win the White House and so, 538 “got it wrong.”  That’s not what this says at all.  This is a probability.  What this says is that, if you could repeat the election a bunch of times, Clinton would only win about 71.4% of the time.  In 28.6% of the “elections” Trump would be elected.  A Trump election isn’t surprising.

Imagine tossing a coin twice.  Would you be surprised if you got two tails?  You shouldn’t be.  The probability of that outcome is 25%.  Sure, it’s more likely that one of the other three outcome will happen, but it isn’t surprising at all.

The Trump victory, according to this analysis, is slightly less surprising than throwing two tails. The difference is that most people are not emotionally invested in the coins toss.

So, what’s the point?  Vote anyway.

Do you want the Democrats to win the senate?  Current estimates say there’s only a 1 in 6 chance of that happening.  Vote anyway.

Do you want the Republicans to retain control of the house?  Fivethirtyeight says they’ll “need a systematic polling error” for that to happen.  We’ve seen those before.  Vote anyway.

Do you want Heitcamp to get reelected in North Dakota, but you’re afraid she’s fallen too far behind?  Vote anyway.

Do you want DeSantis to win the Governorship in Florida but you think Gillum has pulled too far ahead? Vote anyway.

Not interested in the winner of the marquee race in your state?  The down ballot races and the initiatives are at least as important.  Vote anyway.

Can’t bring yourself to vote for either of the major party candidates?  You don’t have to use your vote to help determine the winner.  For example, here in New York the results of the Governor’s election determine which parties get dedicated ballot access.  You could vote to help the Working Families Party or the  Conservative Party or the Green Party or the “The Rent is Too Damn High” Party get on the ballot.  Vote anyway.

Elections are important.  We’d be a profoundly different country if everyone who could vote did vote.  But to quote Arron Sorkin or Benjamin Franklin or any number of people, “Decisions are made by those who show up.”  This one is really important.  No matter what you think is likely to happen, vote anyway.

# Writing a Combinatorial Proof

This started life as a post on Quora, answering the question:

For any positive integer $n$, how do you write a combinatorial proof of the identity

$\displaystyle {2n \choose n} = \sum_{i = 0}^{n} {n \choose i} {n \choose n-i}$?

To write a combinatorial proof, the idea is to describe how each side of the equation is actually counting the same set of objects.

Now, if you have a set of $2n$ objects, $\displaystyle {2n \choose n}$ (that is $2n$ choose $n$) is the number of subsets of that set which contain exactly $n$ of them.

Now pretend that you’ve taken your $2n$ objects and put them into two boxes with $n$ objects in each. Think about what each of your terms on the other side of the equation, $\displaystyle {n \choose i}{n \choose n-i}$ represent. Then consider what you get when you add all of these together. You should be able to explain that this really does count the same thing as $\displaystyle {2n \choose n}$.

Now when I wrote the above, I wondered if this was a homework question someone had posted to Quora.  I didn’t fill in all the details since, while I’m happy to help someone with their homework, I don’t want to do it for them.

But in case anyone wants to see a worked out example, here’s the standard initial example of a combinatorial proof.  This is the identity that makes Pascal’s Triangle work as nicely as it does.

Theorem: $\displaystyle {n \choose k} = {n-1 \choose k} + {n-1 \choose k-1}$.

Proof: Let’s start by thinking about the expression on the left.  If we have a set with $n$ objects in it, $\displaystyle {n \choose k}$ is the number of ways we can select a subset of $k$ objects.  To say that another way, it’s the number of ways we can pick $k$ objects out of our set without caring what order they’re in.

Now suppose one of our objects has decided to wear a hat.  If we’re looking to select a subset with $k$ objects, we can decide to include or exclude the one wearing the hat.

Say we don’t want to include the guy with the hat.  In that case, all $k$ objects, have to be selected from the $n-1$ objects that aren’t wearing hats.  We can do this in $\displaystyle {n-1 \choose k}$ different ways.

Now suppose we decide to include the one with the hat.  Well then, to get $k$ objects altogether, we need to select $k-1$ more from the set.  There’s $\displaystyle {n-1 \choose k-1}$ ways to get the rest of the objects that you need.

Putting these two together we see that $\displaystyle {n-1 \choose k} + {n-1 \choose k-1}$ is also the number of ways to select a subset of $k$ objects from a set containing $n$ things.

Therefore, our identity must be true.

If you’d like to try one on your own, $\displaystyle 2^n = \sum_{i = 0}^{n} {n \choose i}$ is another nice example.

# How do you prove a conjecture is false?

First posted to Quora on Friday, 7 September 2018

That depends on the nature of the statement.

If you have a universal statement, which is to say a statement that all of the things in some category share some property, you merely have to provide a counter-example.

So if you wanted to disprove the statement, “all prime numbers are odd” you’d merely have to point out that 2 is even and the statement cannot be true.

Disproving an existential statement is usually more work. These statements say that there is at least one thing that has a particular property. To disprove an existential statement, you need a general argument that that property can never happen.

So to prove that the statement “There is a pair of even integers whose sum is odd” is false, you must prove that the sum of any two even integers must be even.

Those are the cases “all” and “some.” The cases “none” and “some are not” are similar.

To disprove a statement like “None of the items in set A have property B” you simply have to find one that does. If you want to show a statement like “Some of the items in set A do not have property B” is false you need a general argument that everything in A has property B.

In any case, disproving a statement is equivalent to proving its negation.