### The Volokh Conspiracy

Mostly law professors | Sometimes contrarian | Often libertarian | Always independent

# Math Puzzle

|

The formula

(x-5)(x-4)(x-3)(x-2)(x-1)x(x+1)(x+2)(x+3)(x+4)(x+5)

could of course be expanded out into a polynomial. As you might gather, it would be a polynomial of order 11, with 12 coefficients, i.e., ax11+bx10…+jx2+kx+l. So far, nothing mysterious here.

What is the value of the sum of all the coefficients, a+b+…+j+k+l? Show all work!

UPDATE: Relatedly, what is the value of a-b+…-j+k-l (with the +s and -s alternating)?

Editor's Note: We invite comments and request that they be civil and on-topic. We do not moderate or assume any responsibility for comments, which are owned by the readers who post them. Comments do not represent the views of Reason.com or Reason Foundation. We reserve the right to delete any comment for any reason at any time. Report abuses.

1. Group the polynomial by pairing the (x+c) and (x-c) terms, recognizing that these pairs can be written as (x^2 - c^2); that gives:
(x^2 - 25)(x^2 - 16)(x^2 - 9)(x^2 - 4)(x^2 - 1)x

If you were to expand that, you'd essentially be summing all possible subset multiplications of -25, -16, -9, -4, and -1. However, that's equivalent to all possible subset multiplications of (-25, -16, -9, and -4, call this C) and (-25, -16, -9, -4, and -1) (i.e. all possibilities with, and without, -1).

That reduces to C + C * -1, or 0.

(I realize this is pretty informal, but I've not done math proofs for 10 years).

Alternatively: plug "expand (x-5)(x-4)(x-3)(x-2)(x-1)x(x+1)(x+2)(x+3)(x+4)(x+5)" into wolfram alpha and add by hand 🙂

1. More generally, I think any combination of (x+c1)(x+c2)...(x-1) works (in this case we're substituting x^2 or x).

1. You are right, but I think there's a simpler solution.

1. Yeah, you don't actually need the grouping step, just having an (x-1) term is enough.

1. Right -- I think there's a very simple proof that the sum of coefficients is always 0 when there's an (x-1) term.

1. Assume everything but the (x-1) term expands to y = ax^n + ... + k. Then y(x-1) is (ax^(n+1) + ... + kx) - (ax^n + ... + k)), and the sum of those coefficients is (a + ... + k) - (a + ... + k) or 0.

1. Ah, even simpler is to just set x=1 (to reduce x^n terms to just their coefficients) and observe that the (x-1) term is 0, and anything multiplied by that is also 0.

1. Exactly my thinking (as to your "Ah, even simpler" approach).

2. It is a sign of how far I have forgotten math that I struggled to follow your reasoning until it hit me that I was mixing up "coefficient" and "exponent."

2. Also, the grouping step isn't actually necessary.

2. 0.

The sum of the coefficients is the value of the polynomial when x=1.

Each (x+c) term matches an (x-c) term to give (x^2-c^2). Since one of these terms is x^2-1^2 = 0, the product will be 0.

What does this high school math problem have to do with the law?

1. 1. AtR: You're quite right, but you don't even need to match the (x+1) to (x-1) -- just observe that one of the terms is x-1.

2. To answer your question, nothing whatsoever -- or, if you prefer, 0.

1. Yeah ... I realized that just after I made posted - but there was no way to edit and it didn't change the ultimate result.

There are more interesting math problems ... like, for example:
* Which approach produces more girls in expectation - having children until you have one boy and one girl (the position of the House of Hillel) or until you have two boys (the position of the house of Shamai).

* If a COVID-19 test has a 1/1000 false positive rate and you test positive, what is the probability that you have COVID-19?

1. 100%.
Everyone has the Communist Chinese Virus, which is why we all have to wear masks forever.

1. You only have to wear a face mask if you insist on approaching other people. Go back to your hermitage and go barefaced all day, nobody will complain (about missing your company).

1. That's unfair to Longtobefree. Where mask wearing isn't mandatory he only has to wear one when approaching other people if he wants anyone to believe he cares as much about not killing our parents as we do about not killing his.

2. I think the expected number of girls is 1.5 for Hillel (expected number of kids is 3) and 2 for Shammai (expected number of kids is 4).

I can't answer the COVID question without also knowing the false negative rate and the fraction of people who have COVID-19.

1. Exactly! So the takeaway is:

1. Shammai produces more girls than Hillel, despite his apparently discriminatory position (assuming equal and independent prevalence of boys and girls).
2. The probability that you actually have COVID can literally be anything from 0% up to approaching 100%, depending on the prevalence in the population
---
There are simple proofs for both. For (1), consider the first child: if it's a boy, then Hillel is waiting for a girl and Shammai for a boy - which are equivalent; if the first child is a girl, then Hillel is waiting for one boy, but Shammai is waiting until two boys, which will take longer).

For the COVID case, suppose we take the test to a remote Island in the Carribean with no known COVID cases. Then every positive is false (i.e. you are not sick). If we take the test to the Wuhan meat market at the start of the pandemic, presumably everyone is sick, and, regardless of your test result, you are one of them.

1. Who knew that Hillel traditions are a birth control method.

For a more realistic COVID example, assume 10% of the population has been exposed. Let's change your false positive rate to 5% and assume a 5% false negative rate as well. Then, I believe the probability you have been exposed given you test positive is just under 68%.

2. Assume a population of 10,000 people with a test with an effective rate of 99.9% (1/1000). Assume 10% of the population has the disease.

For the 9,000 who have no disease, 9 of them would test positive.

For the 1,000 who have the disease, 1 would miss the test. The other 999 would test positive.

You take the number of people with the disease who tested positive (999) divided by (999 + 9)=99.1%.

Assume instead that the COVID test has a 95% accuracy. In the same population you have 450 false positives. The number of people who tested positive and who had the disease is 950. The chance that you tested positive and had the disease is therefore ~68%.

As you lower the base rate and/or the accuracy, you can see that the accuracy of the test is not a good indicator of your likelihood of actually having the disease. Of course people don't rely exclusively on positive test rates (they also rely on other indicators, like symptoms).

1. I swear I didn't pilfer your hypo numbers Josh. Weird we went to the same places.

2. "What does this high school math problem have to do with the law?"

Lawyers are notoriously bad at math. (YMMV, some exclusions apply).

1. It's EV's least appreciated contribution to the legal profession: boosting mean lawyer math proficiency for 30 years.

3. Just set x=1 on both sides. Since there's a factor of (x-1) on the one side, you get 0 there (regardless of what everything else gives), and setting x=1 on the other gives the sum of the coefficients.

4. Another way to look at it: suppose you have a polynomial P(X) with coefficient sum S. What is the coefficient sum of (x-r)P(x)?

Expanding the product, you get xP(x) - rP(x), so the new sum is S - rS, or S(1 - r). That means that a polynomial with (x - 1) as a factor must have a coefficient sum of 0.

5. \;lfdMXZ

9.88/71 ; a = 1 and the others will cancel out , for example b- k =o

6. Thank you for the puzzle! Maybe TMI but I was on the john when I saw this. The idea of substituting x=1 came right away, but I was, er, stuck and too lazy to multiply 11 numbers in my head, so looking for a cheap way out I realized that an x-1 factor would be just what the doctor ordered, and saw it staring back at me.

(Closing wisecrack about the hidden virtues of constipation left as an exercise for the reader).

1. The value of the expression in your UPDATE is the negative of the value of the polynomial at x = -1, which is the negative of the value of your opening formula at x = -1, which is 0 (since that formula contains the factor x+1, which is 0 when x = -1)

7. Seventeen, perhaps?

8. “Show all work”

My math teacher hated it when kids would go on for pages and pages.

He was glad to see my papers. Often I would fit my answers to all ten questions on the back of the ditto, without having to use any of the scrap paper. “Good show!” he would write.

I was a whiz. I would get 98’s and 100’s. Unfortunately all that math ability has left my brain. I think it’s because I associate it with virginity.

9. tldr

10. My Math Teacher, E. Agreste, for a number of semesters was Ossetian-Georgian. I was an adult retiree in calculus and IIRC I aced every exam and class with him. I skipped no steps in copybook ink. I quit at Advanced Analysis, a couple of decades ago.

I miss him and his family. They sat near me at concerts and I learned culture.

It is all gone now, lost to disuse. My notes might as well be Voynich MS.

11. Math? I was told there wasn't going to be any math!

1. That's why many people become lawyers.

1. Yes. I always tell people that if I could do the math, I wouldn't have become a lawyer.

12. Given: 2 + 2 = 5.
Therefore the answer is the difference in electoral votes between Trump and Harris squared, divided by the number of distinct people groups defined as providing the margin of victory.

1. given: Your IQ is also = 5.

13. 42. The correct answer is always 42.

14. This post brings back memories: https://www.dailymotion.com/video/x8ffip

15. I'm probably late to this party, but I can never resist a good math problem!

First, rearrange (x-5)(x-4)(x-3)(x-2)(x-1)x(x+1)(x+2)(x+3)(x+4)(x+5) as x[(x-1)(x+1)][(x-2)(x+2)][(x-3)(x+3)][(x-4)(x+4)][(x-5)(x+5)]. Now we can easily expand each bracketed pair to give x(x^2 - 1^2)(x^2 - 2^2)(x^2 - 3^2)(x^2 - 4^2)(x^2 - 5^2).

Using this pattern we can define a recurrence relation for the coefficients of the polynomials P(0) = x; P(1) = x(x^2 - 1^2); P(2) = x(x^2 - 2^2); etc.:

Let a_n(i) ("a sub n of i") be the coefficient of x^i in P(n).

a_0(i) = 1 when i is 1, 0 elsewhere.
a_n(i) = a_(n-1)(i-2) - (n^2)a_(n-1)(i).

Using the recurrence relation of the coefficients, we can derive a recurrence relation on the sum S(n) of the coefficients of P(n):

S(n) = Sum from i = -oo to oo of a_n(i)
= Sum from i = -oo to oo of [a_(n-1)(i-2) - (n^2)a_(n-1)(i)]
= Sum from i = -oo to oo of a_(n-1)(i-2) - Sum from i = -oo to oo of (n^2)a_(n-1)(i)
= Sum from i = -oo to oo of a_(n-1)(i) - (n^2)Sum from i = -oo to oo of a_(n-1)(i)
= (1 - n^2)Sum from i = -oo to oo of a_(n-1)(i)
= (1 - n^2)S(n - 1)

We then have:
S(0) = 1
S(1) = (1 - 1^2)(1) = (1 - 1)(1) = 0
S(n>1) = (1 - n^2)(0) = 0

Thus the sum of the coefficients of any polynomial of the form (x - n)...(x - 2)(x - 1)x(x + 1)(x + 2)...(x + n) (where n > 0) is 0.

For the related problem,

T(n) = Sum from i = -oo to oo of {(-1)^[(2n+1-i)/2]}a_n(x)
= Sum from i = -oo to oo of {(-1)^[(2n+1-i)/2]}[a_(n-1)(i-2) - (n^2)a_(n-1)(i)]
= Sum from i = -oo to oo of {(-1)^[(2n+1-i)/2]}a_(n-1)(i-2) - Sum from i = -oo to oo of {(-1)^[(2n+1-i)/2]}(n^2)a_(n-1)(i)
= Sum from i = -oo to oo of -{(-1)^[(2n+1-i)/2]}a_(n-1)(i) - (n^2)Sum from x = -oo to oo of {(-1)^[(2n+1-i)/2]}a_(n-1)(x)
= (-1 - n^2)Sum from x = -oo to oo of {(-1)^[(2n+1-i)/2]}a_(n-1)(x)
= (1 + n^2)Sum from x = -oo to oo of ([-1]^{[2(n-1)+1-i]/2})a_(n-1)(x)
= (1 + n^2)T(n - 1)

I'm still trying to derive a closed form for T(n) -- it grows a little faster than n!^2 -- but to answer the specific question, T(5) = 44200.

1. Interesting, but how about something simpler?

1. Yeah, that's definitely the long way around to get to 0 for the first part, (sum of coefficients is value at x = 1; one of the terms is (x - 1) so the value is clearly 0), but it sets up the derivation of the product for the related question. You did say to show all my work. 😉

1. Consider the applicability of the short approach to the second problem as well.

1. Aaah, been a long week. 🙂 I misread the second problem and was solving the case where the NON-ZERO coefficients alternated sign. In the case where ALL the coefficients alternate sign:

Approach one: all the coefficients with their signs flipped from the first problem are 0 so the sum is unchanged and is still 0.

Approach two: The sum with alternating-sign coefficients is the value of the polynomial at X = -1. Since one of the factors is (x+1), the value will be 0.

16. Thanks so much for sharing this formula of polynomial order!
I also like math puzzle to solve and now I know how this mysterious math puzzle works following some mathematics formula ! Currently, during this pandemic era, like other students, I have to study and practicing math at home! I love doing different mathematics solutions and this resource has become one of my favorite for the best possible ways to get solved a mathematics equation. Thanks for sharing this post which inspires me to understand the scope of application of mathematics!