1) A candy store sells five different flavors of jelly beans. In how many way can we fill a bag with 100 jelly beans
2) How nay ternanry strings ( consisting of 0s, 1s and 2s) of length 20 can be formed if at least one of the last three digits must be a 1
1)
We want 100 jelly beans in the bag, and in all 5 flavors are there with us. So every time we have 5 options to pick from for each of the hundred jelly beans to be put in the bag.
Thus the total number of ways= 5*5*5*.......(100 times) = 5 100 =7.88860905e69
2)
We have three options 0,1 and 2 for the strings.
Now the total number of ways to form 20 length string= 3*3*3...(20 times) = 320
The total number of ways to form 20 length string with no 1's in it (i.e. 2 options are left at each place) = 2*2*2... (20 times)= 220
Thus the total ways to form 20 length string with at least one digit being 1 =
total number of ways to form 20 length string- The total number of ways to form 20 length string with no 1's in it
= = 3485735825
Get Answers For Free
Most questions answered within 1 hours.