Project 5: The Binomial Theorem

This project requires a program that can symbolically multiply polynomials, such as Maple, Mathematica, or Wolfram|Alpha. (This link will open a new tab or window on your browser.)

If you have taken any algebra course in your past, you probably encountered the mnemonic “FOIL” which stands for “First, Outside, Inside, Last”. This device reminds you how to multiply two binomials, such as (a+b) and (x+y), by combining the first terms (ax), the outside terms (ay), the inside terms (bx), and the last terms (by), before adding them all together. Multiplying out larger algebraic expressions is best left to computer programs, but understanding how this works will allow us to solve some otherwise very challenging counting problems.

Part 1
  1. Verify the correctness of “FOIL” by asking your symbolic calculator to expand the expression: (a+b)(x+y):

    Notice this is the result of making every possible combination using one item from the first binomial (a+b) and one item from the second binomial (x+y). Since there are two choices for the first and two choices for the second, we get 2 × 2 = 4 different terms.

  2. Try to guess how many terms you get from multiplying (a+b+c+d)(x+y+z) before entering it into your symbolic calculator. Then calculate it to check the answer: terms.

  3. Use the same counting principle to guess how many terms will be generated by multiplying the expression (a+b)(j+k)(p+q)(y+z). Once again, calculate it to check your answer: terms.
  4. Term from the expansion of (a+b)(j+k)(p+q)(y+z) Corresponding term from (1+x)(1+x)(1+x)(1+x)
    a × j × p × y 1 × 1 × 1 × 1 = 1 
    b × j × q × y x × 1 × x × 1 = x²
    a × j × q × z 1 × 1 × x × x = x²
    a × k × q × y × × ×
    In this last example, each term has four factors (like bjqy), one factor from each of the binomials. If you imagine replacing each of the binomials with the binomial (1+x), a correspondence will indicate the terms you will find in the expansion. Some example correspondences are shown here (fill in the missing boxes):

    One thing you may notice is that multiple combinations correspond to the term x². This is because there are multiple ways to choose which two of the four binomials will contribute an x, and which two of the four binomials will contribute a 1 to the product. In fact, there are C4,2 ways to do this. A symbolic calculator will gather these x² terms together, so the coefficient of the x² term will conveniently count the number of ways x² appears in the expansion.

  5. Verify the value of C4,2 by looking at the coefficient of x² in the expansion of (1+x)4. Then calculate the value of C10,4 by looking at the expansion of (1+x)10. Entering (1+x)4 into a symbolic calculator will probably require typing something like: (1+x)^4

  6. In general, to find the value of Cn,k using a polynomial expansion, look for the coefficient of x in the expansion of (1+x).
Part 2 While the theorem at the end of part 1 may be interesting, it does not help solve any problems we could not solve before, as we already had a good formula for calculating Cn,k. However, we can use this feature of multiplying polynomials to answer much harder questions. But first another simpler example.

When rolling two six-sided dice (imagine the dice are different colors), it is possible to get any sum from 2 to 12, but these are not equally likely. There is only one way to roll a sum of twelve (a pair of sixes ), but there are five ways to roll an eight (namely: , , , , ). If you multiply the polynomial (x+x2+x3+x4+x5+x6) by itself and expand the result, imagining the first polynomial is red, and the second one is blue, every term will have one red factor and one blue factor: (x+x2+x3+x4+x5+x6) × (x+x2+x3+x4+x5+x6). So, rolling a red three and a blue five would correspond to the term generated by picking the x3 from the first red polynomial and multiplying it by the x5 from the second blue polynomial, creating a term of x3 × x5 = x8.

Since your symbolic calculator will collect all the x8 terms together, the number of ways to roll eight on two distinct six-sided dice will be the coefficient of the x8 term in the expansion of (x+x2+x3+x4+x5+x6)2. Use this to answer the following: (remember, the carat symbol ^ is often used to indicate a power)

  1. Use a polynomial expansion to calculate the number of ways to roll a sum of five on two six-sided dice: and determine which sum is most commonly rolled on two six-sided dice:
  2. We can change the number of sides of the die by adding or subtracting terms of the polynomial, and you can roll more dice by raising the power of the polynomial.

  3. In general, the number of ways to roll a sum of k using n d-sided dice will be the coefficient of x in the expansion of (x+x2+x3+...+x).

  4. Use this general theorem and your symbolic calculator to answer the following:
    1. The number of ways to roll a sum of 10 on five four-sided dice is:
    2. The number of ways to roll a sum of 37 on seven eight-sided dice is:
    3. The number of ways to roll a sum of 75 on 20 six-sided dice is:

    That last answer looks very big, but when you calculate the total number of ways 20 six-sided dice could be rolled using the die-rolling model (which is ), you will see that large number is quite reasonable.

  5. Bonus question: The number of ways to roll a sum of 12 using a four-sided die, a six-sided die, and an eight-sided die is:
Unlike part one of this worksheet, these counting problems do not have other simple formulas for finding their answers.

Once completed, this page to a pdf document; then hand it in through your course's Learning Management System.


 Neil Simonetti

 Back to Intro to QR Worksheets Page

 Back to Neil's Intro to QR Page