HGB wrote
I think that there is an elegant way to do this with generating functions, but I can't recall it right now.
Let the coeff of q^k represent the ways of spending k cents. Let the coeff of p^k represent the ways of making k purchases. " " " " b^k " purchases including k blacks. " " " " h^k " " " k hispanics. " " " " w^k " " " k women. " " " " m^k " " " k white males. Then the generating function is (c152) 1/(1-m*q^100*p)/(1-p*w*q^75)/(1-p*h*q^50)/(1-p*b*q^25) 1 (d152) -------------------------------------------------------- 25 50 100 75 (1 - b p q ) (1 - h p q ) (1 - m p q ) (1 - p q w) Through 150 cents and 3 purchases, (c153) taylor(%,q,0,150,p,0,3); 25 2 2 50 (d153)/T/ 1 + (b p + . . .) q + (b p + h p + . . .) q 3 3 2 75 + (b p + b h p + w p + . . .) q 2 3 2 2 100 + (b h p + (b w + h ) p + m p + . . .) q 2 2 3 2 125 + ((b w + b h ) p + (h w + b m) p + . . .) q 2 3 3 2 2 150 + ((b h w + b m + h ) p + (w + h m) p + . . .) q + . . . (c154) coeff(coeff(%,q,150),p,3) 2 3 (d154)/R/ b h w + b m + h Confirming Henry's
Since the report said exactly 3 cookies were sold, and the prices were 1, .75, .5, and .25, I get only 3 possibilities:
1+.25+.25, .75+.5+.25 and .5+.5+.5 Privately, I received [John's questions inspired me to format them in a modern academic format. I daren't try Rich's moderation by replying with this to the list, but thought you might enjoy it...] The miscreant's transgressions and identity are (temporarily) available at www.ippi.com/rwg/smu.text --rwg