A 6-sided die has the numbers 0 , 3 , 5 , 7 , 1 1 , 1 3 printed on its sides. If the die is rolled 5 times, how many different values can the product of the rolls have?
Details and assumptions
If the dice showed 3 , 5 , 7 , 1 1 , 1 3 in the rolls, then the product of the rolls is 1 5 0 1 5 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Rather than the stars and bars method, one can use generating functions. For a + b + c + d + e = 5 , the generating function is
( 1 + x + x 2 + … ) 5 = ( 1 − x ) 5 1 = i = 0 ∑ ∞ ( 4 4 + i ) x i
Hence, since the coefficient of the x 5 term is ( 4 4 + 5 ) , the answer is 1 + ( 4 9 ) = 1 2 7 .
I first noticed that none of the numbers have any common factors with each other - this is important because we can't get a repeated product other than 0. (Why?)
First I considered using stars and bars, by dropping 5 identical balls into 6 boxes labelled with the number on the faces of the die, however, if there is at least one ball in the box labelled "0", then the product will be 0. So, we modify our steps by considering the case where there are no balls in the box labelled "0".
We proceed by counting the number of ways to drop 5 identical balls into 5 boxes labelled 3 , 5 , 7 , 1 1 , 1 3 . The number of ways to do this is ( 5 − 1 5 + 5 − 1 ) = 4 ! 5 ! 9 ! = 4 ⋅ 3 ⋅ 2 ⋅ 1 9 ⋅ 8 ⋅ 7 ⋅ 6 = 1 2 6
Now, we just need to add the one case we left out: whenever the product is 0 . So, our final answer is 1 2 6 + 1 = 1 2 7
Technically, 3 is a factor of 0 since 0 = 3 × 0 .
True, I probably should have put "none of the numbers (excluding 0) have any common factors with each other"
We note that if 0 appears in the set of 5 , the whole product becomes 0 . So all the combinations which include 0 give only one value for the product, namely 0 . Now let us count the combinations when 0 does not appear. All such combinations would give different values for product because given numbers are relatively prime. In any such combination, let x i be the total number of ways the number i appear where i can be any one among ( 3 , 5 , 7 , 1 1 , 1 3 ) . Then we want
x 3 + x 5 + x 7 + x 1 1 + x 1 3 = 5
Thus we have 5 + 4 = 9 symbols and we have to choose 5 from these. Hence there are 9 C 5 = 1 2 6 combinations. Adding 0 as one more combination, we get total 1 2 7 combinations.
Can you explain me that Why you have added 4 in 5?
Log in to reply
Yes.. This method is called stars and bars. Just look on wikipedia. Here we have 5 x and 4 + signs and every permutation of these 9 symbols in total, would give us one configuration.
Log in to reply
Thanks,I will look there.
Log in to reply
@Ahmer Ahmed – You can also get some help with this in the stars and bars technique trainer
As any combination of rolls with a 0 will have a product of 0 , we will first ignore this case. We notice that the numbers 3 , 5 , 7 , 1 1 , 1 3 are all prime, and hence share no common factors.Therefore, since each integer has a unique prime factorisation (the fundamental theorem of arithmetic), we can see that each product (excluding a product which includes 0 ) will be unique. Therefore, we need to know the number of ways to choose 5 elements from 5 with repetition. This is calculated by the sum, ( 5 5 + 5 − 1 ) = ( 5 9 ) = 1 2 6 Now we add the case when a 0 is chosen. Then the product will always be 0 so the final answer is, 1 2 6 + 1 = 1 2 7
This problem can be simplified to a balls-in-urns problem.
Any roll of a 0 will result in the product being 0 , so this is 1 possible value. Since the rest of the possibilities are coprime (and for that matter, prime), every possible set of rolls has a unique product. The number of possible products would be the same as the number of ways to drop 5 balls in 5 urns.
The number of ways to drop n balls in k urns is equal to ( n n + k − 1 ) . Plugging in n = k = 5 gives
( 5 9 ) = 5 ! 4 ! 9 ! = 4 × 3 × 2 9 × 8 × 7 × 6 = 9 × 7 × 2 = 1 2 6 .
Remembering to add the 1 from the possible product of 0 gives the answer as 1 2 6 + 1 = 1 2 7 .
This technique is also called stars-and-bars.
First forget about the 0
and consider just the 3 , 5 , 7 , 1 1 , 1 3 Since they are all prime we don't have to worry about whether different combinations of them will give the same product (unless they are just permutations of the same selection of numbers of course)
Our final product will look like this 3 a . 5 b . 7 c . 1 1 d . 1 3 e . Since we are choosing five numbers a + b + c + d + e = 5
You can consider this problem as putting 5 identical objects into 5 distinct boxes. Each box can have any amount of these objects- we don't care as long the total of all the boxes is equal to 5
Using stars and bars method you having ( 5 − 1 5 + 5 − 1 ) = ( 4 9 ) = 1 2 6
Remembering 0 again we could also have 0 as a product
Which brings the total to 1 2 6 + 1 = 1 2 7
since all r prime no.......so no of combinations of these no will give no of multiplications......x+y+z+k+l=5(where x,yy.z.l.k are their frequency of occurance)...................which gives 9c4=126(here we excluded the case of 0).........and one case will be 0.................which in any combination gives 0.........:)hence 126+1=127
nice solution.
Note that the product of anything with 0 will be 0 . Hence, first ignore the number 0 as a possible input to our product:
Also, intuitively, the number of product of the 5 values obtained from the dice is simply the number of unordered set of ( a , b , c , d , e ) whereby ( a , b , c , d , e ) = 0 , Hence, using repeated combination, number of unordered set can be calculated as follows:
( 5 5 + 5 − 1 ) = ( 5 9 ) = 1 2 6
Hence, answer is 1 2 6 + 1 (when product is 0 ) = 1 2 7
Note that 3, 5, 7, 11, and 13 are all prime, so the product can be written as n = 3 e 1 ⋅ 5 e 2 ⋅ 7 e 3 ⋅ 1 1 e 4 ⋅ 1 3 e 5 . Thus, there is a bijection between the number of possible nonzero products and the number of ways to select e 1 , e 2 , e 3 , e 4 , e 5 such that their sum is 5. This is given by ( 4 9 ) = 1 2 6 , using stars and bars, so the total number of products is 1 2 6 + 1 = 1 2 7 (the 1 is the case where the product is 0).
If 0 is one of the numbers rolled then the product is 0. If 0 is not one of the numbers rolled, since the other numbers are all primes, there is a bijection between the values of product and the number of non-negative integer solution of a + b + c + d + e = 5 where a , b , c , d , e are the number of times of 3 , 5 , 7 , 1 1 , 1 3 being rolled. Clearly, this is also the number of ways of arranging 5 ′ 1 ′ s and 4 ′ + ′ s , which is 5 ! 4 ! 9 ! = 1 2 6 . Adding the values of both cases, there are 1+126=127 different values the product can have.
First note that if 0 is rolled, the product will be 0, since 0 times any real number is 0, so this is one possibility.
Next, we must count the number of possibilities in which 0 is not rolled. Since 3, 5, 7, 11, and 13 are all prime and relatively prime to each other, we know that rolling a specific combination is the only way that the product can be obtained (what I mean by that is if we roll three 3's, two 5's, and a 7, there is no other way for the dice to have a product of 3 3 ⋅ 5 2 ⋅ 7 , disregarding the orderings of the 3's, 5's, and 7's.
So, how do we calculate the possible ways to roll 3, 5, 7, 11, and/or 13 in five rolls?
Let's think about it this way. Imagine that we have five balls and four bars. The four bars separate the five balls into five categories; the number of 3's, the number of 5's, the number of 7's, the number of 11's, and the number of 13's rolled in the five times. For example,
. | | . . . | . |
would represent one 3, zero 5's, three 7's, one 11, and zero 13's.
Pause for a second and convince yourselves that this covers all possible possibilities or prove that it is true.
The number of ways to order the five balls and four bars is equal to ( 4 5 + 4 ) = ( 4 9 ) = 1 2 6 . This can also be thought of as 5 ! 4 ! 9 ! .
Adding our 126 to the 1 possibility of 0, we have 1 2 6 + 1 = 1 2 7
It is obvious that one possible value of the product is 0. This occurs when the die rolls a 0. (clearly, it doesn't matter to us that how many times zero is rolled as long as it is rolled at least once).
Now consider non-zero products that are possible. Challenge master has intentionally given those set of numbers (all primes). It can be seen that product of a set of those numbers will result in a number which cannot be formed using any other set of numbers as that set will represent the product's prime factorization (The order of appearance of the numbers doesn't matter, only their occurrence matters). Since the product is non-zero, it means that zero has not been rolled even once. Let the number of times the numbers 3 , 5 , 7 , 1 1 , 1 3 appear be a 1 , a 2 , a 3 , a 4 , a 5 respectively. Now a 1 + a 2 + a 3 + a 4 + a 5 = 5 (i.e. the sum of occurrence of 3,5,7,11,13 has to be 5 because the die is rolled 5 times). ALL we have to do is find number of solutions to this equation with each of the value subject to the inequality 0 ≤ a 1 , a 2 , a 3 , a 4 , a 5 ≤ 5 . Now, using stars and bars technique , number of solutions = ( 5 − 1 5 + 5 − 1 ) = ( 4 9 ) = 1 2 6 .
Therefore, total number of distinct values of the product = 1 + 1 2 6 = 1 2 7
since if 0 comes even once in the roll of 5 times the product is 0 so 0 is one value and consider only 3,5,7,11 ,13 only in the five rolls so product of those five numbers can happen in 5+5-1c 5-1 ways that is 9c5 different ways as those are prime values any different combination of those values gives a different value it is like giving five identical objects to 5 different boxes that is 9c5 which is equal to 126 and plus 1 which is 0
since all r prime no.......so no of combinations of these no will give no of multiplications......x+y+z+k+l=5(where x,yy.z.l.k are their frequency of occurance)...................which gives 9c4=126(here we excluded the case of 0).........and one case will be 0.................which in any combination gives 0.........:)hence 126+1=127
Each product will be of the form 0 a 3 b 5 c 7 d 1 1 e 1 3 f where a + b + c + d + e + f = 5 and each term in the expression is a non-negative integer. If a ≥ 1 then there is only one product, namely 0. If a = 0 then each different solution of b + c + d + e + f = 5 gives a different product by unique prime factorization. The number of non-negative solutions of an equation like this can be readily found using the so-called stars and bars approach, yielding 126 solutions. Adding the previous solution gives a total of 1 2 solutions.
When a=0, what happens to 0 0 ?
It should be 127, not 12.
Problem Loading...
Note Loading...
Set Loading...
We split the problem into two cases.
Case (a): at least one zero is rolled
In this case, there is only one possible product, which is 0 .
Case (b): no zeroes are rolled
Since each of the numbers 3 , 5 , 7 , 1 1 , and 1 3 are prime, two products are the same only when the number of times each prime was rolled is the same (same number of threes were rolled, same number of fives were rolled, etc.).
We use a technique called "Stars and Bars" to count the number of products. We have five primes and five rolls. We can set up five objects and four dividers so that there is a one-to-one correspondence between products and arrangements of the dividers and objects.
The number of objects before the first of the four dividers represents the number of threes in the prime factorization of the product. The number of objects between the first and second dividers represents the number of fives in the prime factorization of the product, and so on.
Thus, the number of possible products is the number of arrangements of these 5 objects and 4 dividers, which is
( 4 9 ) = 4 ⋅ 3 ⋅ 2 9 ⋅ 8 ⋅ 7 ⋅ 6 = 3 ⋅ 7 ⋅ 6 = 1 2 6
There is one possible product from Case (a), and 1 2 6 from Case (b), for a total of
1 + 1 2 6 = 1 2 7