I love combinatorics

Dipa has $ 9 \$9 . Each day he buys either tea for $ 1 \$1 or orange juice for $ 2 \$2 or apple juice for $ 2 \$2 or avocado juice for $ 2 \$2 . In how many ways can he spend $ 9 \$9 ?


The answer is 1159.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Alan Yan
Jan 14, 2018

Let S n S_n be the number of ways to spend n n dollars. Then S n = S n 1 + 3 S n 2 . S_n = S_{n-1} + 3S_{n-2}. Given the initial conditions S 1 = 1 , S 2 = 4 S_1 = 1, S_2 = 4 , we can compute S 9 = 1159 S_9 = 1159 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...