This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 173: Discrete Structures, Spring 2010 Homework 10 Solutions This homework contains 5 problems worth a total of 50 regular points. 1. Counting and polynomials [10 points] (a) How many terms are contained in ( x + y + z ) 20 after carrying out all multiplications? Solution: Note that ( x + y + z ) = 1 which has 1 = 3 terms. Similarly, ( x + y + z ) 1 = x + y + z which has 3 = 3 1 terms. Each time we increase the exponent by one, we are multiplying each of the terms from the previous expression by each of x , y , and z tripling the total number of terms. Thus, ( x + y + z ) 20 has 3 20 terms. (b) How many terms are contained in ( x + y + z ) 20 after carrying out all multiplications and collecting similar terms? Solution: After performing the multiplications and collecting similar terms, we are left with a sum of terms of the form C x i y j z k , where C, i, j, k N and i + j + k = 20. Think of each term as having space for exactly 20 copies of the three variables. Then the exponents tell you the number of copies of each variable that show up in each term. The number of ways to choose 20 variables from the list x , y , z with repetition where order does not matter (since multiplication is commutative) is parenleftbigg 3 + 20 1 20 parenrightbigg = parenleftbigg 22 20 parenrightbigg = 22! 20! (22 20)! = 22 21 2 = 231 . (c) What is the coefficient of the x 10 y 3 z 7 term? Solution: The coefficient is the number of permutations with repetition of the following list of elements: a,a,a,a,a,a,a,a,a,a,b,b,b,c,c,c,c,c,c,c. This number is given by 20! 10! 3! 7! which you probably do not want to calculate by hand. 2. More counting [12 points] (a) DeBrand sells 8 flavors of special gourmet chocolate bars. You want to choose a set of 17 bars to give as Christmas presents. How many ways are there for you to choose the flavors for the set of bars? Solution: Presumably, DeBrand has many of each flavor of bars, and since we are choosing a set we do not care about order. So this is just a combination with repetition problem with solution: 1 parenleftbigg 8 + 17 1 17 parenrightbigg = parenleftbigg 24 17 parenrightbigg (b) How many four digit numbers (written in base 10, no leading zeros) are there such that no two adjacent digits are the same?...
View Full
Document
 Spring '08
 Erickson

Click to edit the document details