-Taylor Smith
c.append(gmpy.comb(16,6))
> or less
c.append(gmpy.comb(16,5))
c.append(gmpy.comb(16,4))
c.append(gmpy.comb(16,3))
c.append(gmpy.comb(16,2))
c.append(gmpy.comb(16,1))
c.append(gmpy.comb(16,0))
c
[mpz(8008), mpz(4368), mpz(1820), mpz(560), mpz(120), mpz(16), mpz(1)]
sum(c)
mpz(14893)
> to one drink.
sum(c)*12
mpz(178716)
> With this information, I still cannot reach the number given in the
> advertising campaign.
Now you know why the Liberal Arts grads go into advertising.
> Can anyone else reach this figure,
Not likely.
> and if so,
> can you please respond as to how.
Sorry, all I can do is give the correct answer.
> mpz(178716)
>
> > With this information, I still cannot reach the number given in the
> > advertising campaign. Can anyone else reach this figure,
>
> Not likely.
PARI/GP agrees with mensanator:
(13:30) gp > sum(i=0,6,binomial(16,i)) * 12
%80 = 178716
12 does not divide 168894 = 2 * 3^2 * 11 * 853, so I see no interpretation
which might work.
http://www.sonicdrivein.com/pdfs/newsReleases/06_06_26_01.pdf both says
"168,894 to be exact" and "more than 168,894" on the same page.
Hopefully they are better at drinks than maths.
--
Jens Kruse Andersen
15 choose 6 = 5005
15 choose 5 = 3003
15 choose 4 = 1365
-----------------------------
Add those up, you get 9373, 9373*18= 168714
This answer is 180 off the one I'm looking for. Its as close as I can
get so far. What I was wondering, is if anyone can obtain 168894 by
fiddling with the numbers, in a somewhat logical manner.
-Taylor Smith
A computer search says 17 add-ins with 2 to 5 used in 18 base drinks
would give 168912 combinations.
Forcing at least 2 add-ins seems odd, and not a single of the parameters
match the explanation you got.
I think they either miscalculated or have hidden assumptions, e.g. about
which add-ins can be combined with which base drinks, or that some
add-ins like Cherry and Diet Cherry cannot be combined.
Eliminating the case where the only two add-ins are Cherry and Diet Cherry
would give the "right" result in my example, but then allowing them both
if 1 to 3 more add-ins are used would not be logical.
--
Jens Kruse Andersen
I'm honestly not sure how to go about doing those calculations, so I'm
hoping Jens or someone else might know. If that is taken into account,
I believe it might change Jens' outcomes so that one might land exactly
on the "right" number (ok, so probably not, but worth a shot).
I'm under the impression that it was a miscalculation on their part,
but I would like to search all corners on the slight chance that
they're correct.
Thank you all for you input and help.
-Taylor Smith
r out of n add-ins can be combined in n choose r ways.
Subtracting all those where both Cherry and Diet Cherry are present gives:
(n choose r) - ((n-2) choose (r-2))
I already tried that and cannot hit the claimed answer.
> I'm under the impression that it was a miscalculation on their part,
> but I would like to search all corners on the slight chance that
> they're correct.
I don't think the claimed answer can be reached by simple interpretations
and modifications of the info you got.
It's possible the info is horribly inadequate. They offered a prize of
$168,894 so one would think they thought about the number,
but I don't want to do more idle speculation.
--
Jens Kruse Andersen
Good afternoon and thanks for your comments. Actually,
there are two pieces of info that got left out.
First, we have 8 "base drinks" and 5 "drinks mixed with water"
for a total of 13 - however, the drinks mixed with water already
contain one of the flavors, so you have to compute them separately.
Hope that makes sense - for example, a Lemonade couldn't be mixed
with lemon, so for those other 5 drinks, you drop the number of add-ins
to 15.
(Then once you're all done, you have to subtract one for "base
slush" which no one would order by itself, without an add-in and also
add 6 drinks that we sell outright with no addin options such as Apple
Juice, Orange Juice, Iced Tea, etc.)
-------------
Well, I guess that solves it. They had a method after all.
-Taylor Smith
That works when the already flavored drinks can also get up to 6 add-ins:
gp > 8*sum(i=0,6,binomial(16,i)) + 5*sum(i=0,6,binomial(15,i)) - 1 + 6
%96 = 168894
Inadequate original info as I suspcted.
--
Jens Kruse Andersen