• retagged by
1,848 views
2 2 votes
A bagel shop has onion bagels, poppy seed bagels, egg bagels, salty bagels, pumpernickel bagels, sesame seed bagels, raisin bagels, and plain bagels.

How many ways are there to choose

 a dozen bagels with at least three egg bagels and no more than two salty bagels?

2 Answers

Best answer
5 5 votes

shop have 8 different type of bagels as y1, y2, y3, y4, y5, y6, y7, y8 where y1 is egg bagel (y1>=3) and y2 is salty bagel (y2<=2).

y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8=12

By generating function : 

we have to choose coefficient of x12 in following  eq.

(x3 + x4 +....x12) (1 + x + x2 ) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) 

as we only need coefficient of x12 adding variable having power greater than x12 should not affect the solution. 

(x3 + x4 +....∞) (1 + x + x2 ) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) 

 = x3 (1 + x + x2...∞) (1 + x + x2 ) (1 + x + x2...∞)6

 = x3 (1 + x + x2 ) (1 + x + x2...∞)7

now we choose coefficient of x9 in $\left ( \frac{1-x^{3}}{1-x} \right )\left ( \frac{1}{(1-x)^{7}} \right )$

 = $(1-x^{3})\left ( \frac{1}{(1-x)8} \right )$

General term of Binomial coefficient is $\binom{n+r-1}{r}$ for $\frac{1}{(1-x)^{8}}$

here we have to calculate x9 and x6

$\binom{8+9-1}{9}$ - $\binom{8+6-1}{6}$ = 11440 - 1716 = 9724

• edited by
6 6 votes

Here we have total 8 types of bagels,  now according to the question we want atleast 3 egg bagels and no more than 2 salty bagels:

So here we start with selecting 3 egg bagels and 0 salty bagels , now we did not want any salty bagels so we remove them

The remaining 9 bagels (12-3)  out of remaining 7 types (excluding salty bagels) can be selected in:

$\binom{15}{9}$ = 5005 ways ( it is the case of number of ways of putting or selecting n indinguishable objects in k distinguishable boxes , which is equal to $\binom{(n+k-1)}{n}$ )

now for 3 egg bagels and 1 salty bagel:

number of ways = $\binom{(8+7-1)}{8}$ = 3003

for 3 egg bagels and 2 salty bagels:

number of ways = $\binom{7+7-1}{7}$ = 1716

therefore total ways are = 5005+3003+1716 = 9724

hence the required answer is 9724...

• edited by
Position:
Show:

Related questions

51 51 votes
6 answers 6 answers
13.6k
13.6k views
Misbah Ghaya asked Nov 29, 2016
13,553 views
How many substrings (of all lengths inclusive) can be formed from a character string of length $n$? Assume all characters to be distinct, prove your answer.
43 43 votes
6 answers 6 answers
17.0k
17.0k views
Kathleen asked Sep 23, 2014
16,999 views
The number of binary strings of $n$ zeros and $k$ ones in which no two ones are adjacent is$^{n-1}C_k$$^nC_k$$^nC_{k+1}$None of the above
51 51 votes
8 answers 8 answers
17.5k
17.5k views
Kathleen asked Sep 14, 2014
17,452 views
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetiti...