When does function order matter?

Combinatorics Question (find and solve recursion relation, find generating function)?

  • Suppose there is an unlimited supply of M&M's and of bubblegum, which cost one cent each, and of sourballs, peppermints, and gumdrops, which cost two cents each. You are going to buy n cents' worth of candy, one piece at a time. Let a_n be the number of selection sequences that end up costing n cents. Thus a_2 = 7 (mm, mb, bb, bm, s, p, g). Notice that in this problem the order of choosing matters: mb and bm are counted separately. a) Find a recursion relation for a_n. b) Solve the recursion, and give a formula for a_n. c) A different version of the above problem. Let's now assume that order does not matter. What matters is that you spent n cents, and that the number of different combinations that cost n cents is c_n. What is the generating function for {c_n|? Please include all steps. Thank you!

  • Answer:

    a) For a_3, there are some triple-1's and some 2&1's. # Triple 1's = 2^3 # 2&1 = (2C1)*3*2 = 12 Total a_3 = 20 Now let's do a_4: # quad 1's = 2^4 # 2&2 = (2C1)*3*3 = 18 # 2&1&1 = (3C2)*3*2*2 = 36 total a_4 = 70 I see the pattern: a_n = (2n C n) <---- answer to (B) I'm not seeing the recurrence relation. There's probably a systematic way to do these instead of just trying to wing it, but oh well. b) 2n C n = n rising! / n! c) c_2 = (2 multichoose 2) + (3 multichoose 1) = 3 + 3 = 6 c_3 = (2 MC 3) + 3*2 = 4 + 6 = 10 c_4 = (2 MC 4) + (3 MC 2) + 3(2 MC 2) = 5+6+9 = 20 c_5 = (2 MC 5) + 3(2 MC 3) + 2(3 MC 2) = 6 + 12 + 12 = 30 c_6 = (2 MC 6) + (3 MC 3) + (3 MC 2)(2 MC 2) + 3(2 MC 4) = 7+10+18+15 = 50 c_7 = (2 MC 7) + 2(3 MC 3) + (2 MC 3)(3 MC 2) + 3(2 MC 5) = 8+20+24+18 = 70 I don't see a pattern yet. Will look again later.

Missy at Yahoo! Answers Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.