My First Problem is Back!

There are 4 buttons in front of you, each with a different color, right beside it is a scoreboard showing your score. Starting from 0 points, your goal is to achieve exactly 386 points (because why not?), by pushing the buttons a total of 20 times.

If you push the red button, your score will increase by 17 points.
If you push the blue button, your score will increase by 41 points.
If you push the yellow button, your score will increase by 25 points.
If you push the green button, your score will increase by 11 points.

There are many ways to do this, 2 of them are listed below:
3 red, 4 blue, 2 yellow, 11 green
13 red, 2 blue, 2 yellow, 3 green

What is the total number of ways can this be done?

Note: You do not have to push all 4 of the buttons at least once.


This is one part of 1+1 is not = to 3 .
10 11 9 12

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

Kenneth Tan
Jul 19, 2014

Suppose we need to press the red button a a times, blue button b b times, yellow button c c times, and the green button 20 a b c 20-a-b-c times. Here, a a , b b and c c are non-negative integers. You can get the following equation 17 a + 41 b + 25 c + 11 ( 20 a b c ) = 386 17a+41b+25c+11(20-a-b-c)=386 which upon simplifying yields 3 a + 15 b + 7 c = 83 3a+15b+7c=83 This is a linear Diophantine equation with 3 variables, and this question is actually asking you how many non-negative integer solutions ( a , b , c ) (a, b, c) satisfy 3 a + 15 b + 7 c = 83 3a+15b+7c=83 .

To solve this, we move 15 b 15b to the right to get 3 a + 7 c = 83 15 b 3a+7c=83-15b Because a 0 a\geqslant 0 , c 0 c\geqslant 0 , so 3 a + 7 c = 83 15 b 0 3a+7c=83-15b\geqslant 0 , thus 0 b 5 0\leqslant b \leqslant 5 .

Let 83 15 b = n 83-15b=n where n n is a non-negative integer, now we have a new linear Diophantine equation 3 a + 7 c = n 3a+7c=n We first observe the L.H.S. of the equation, the unknown with the smallest coefficient is a a which is 3. Divide both sides by 3 and we would get a + 2 c + c 3 = n 3 a+2c+\frac{c}{3}=\frac{n}{3} Then, we move all fractions to the right and all the integers to the left. We get a + 2 c = n c 3 a+2c=\frac{n-c}{3} Because a a and c c are integers, therefore a + 2 c a+2c is also an integer, n c 3 \frac{n-c}{3} must be also an integer. Let n c 3 = k \frac{n-c}{3}=k where k k is an integer. Then c = n 3 k c=n-3k Substitute c c in 3 a + 7 c = n 3a+7c=n with n 3 k n-3k you get a = 7 k 2 n a=7k-2n We have generated our 'solutions formula'. { a = 7 k 2 n c = n 3 k \begin{cases} a=7k-2n \\ c=n-3k \end{cases} From a = 7 k 2 n 0 a=7k-2n\geqslant 0 , c = n 3 k 0 c=n-3k\geqslant 0 , and a + c < 20 a+c<20 , we would get 2 n 7 k n 3 , k < n 4 + 5 \frac{2n}{7} \leqslant k \leqslant \frac{n}{3},\quad k<\frac{n}{4}+5 We now have 2 cases:

Case 1: n 3 n 4 + 5 \frac{n}{3}\geqslant\frac{n}{4}+5

Then n 60 83 15 b 60 0 b 1 n\geqslant60\implies83-15b\geqslant60\implies 0\leqslant b\leqslant1 , and we have 2 n 7 k < n 4 + 5 \frac{2n}{7}\leqslant k<\frac{n}{4}+5

By substituting back n = 83 15 b n=83-15b you'll get 23 4 b + 5 2 b 7 k < 3 3 b 4 + 25 3 b 23-4b+\frac{5-2b}{7}\leqslant k<\frac{3-3b}{4}+25-3b Since k k is an integer, 23 4 b + 5 2 b 7 k < 3 3 b 4 + 25 3 b 23-4b+\left\lceil\frac{5-2b}{7}\right\rceil\leqslant k<\left\lceil\frac{3-3b}{4}\right\rceil+25-3b ( x \lceil x\rceil is the smallest integer greater or equal to x x )

Denote the number of integer solutions k k that satisfy this inequality as S k ( b ) S_k(b) , then S k ( b ) = ( 3 3 b 4 + 25 3 b ) ( 23 4 b + 5 2 b 7 ) = b + 2 + 3 3 b 4 5 2 b 7 \begin{aligned}S_k(b)&=\left(\left\lceil\frac{3-3b}{4}\right\rceil+25-3b\right)-\left(23-4b+\left\lceil \frac{5-2b}{7}\right\rceil\right) \\ &=b+2+\left\lceil\frac{3-3b}{4}\right\rceil-\left\lceil\frac{5-2b}{7}\right\rceil\end{aligned}

Because 0 b 1 0\leqslant b\leqslant1 , we have 5 2 b 7 = 1 \left\lceil\frac{5-2b}{7}\right\rceil=1 , and S k ( 0 ) = 0 + 2 + 3 4 1 = 2 S k ( 1 ) = 1 + 2 + 0 1 = 2 S_k(0)=0+2+\left\lceil\frac{3}{4}\right\rceil-1=2 \\ S_k(1)=1+2+\left\lceil0\right\rceil-1=2

Case 2: n 3 < n 4 + 5 \frac{n}{3}<\frac{n}{4}+5

Then n < 60 83 15 b < 60 2 b 5 n<60\implies83-15b<60\implies 2\leqslant b\leqslant5 , and we have 2 n 7 k n 3 \frac{2n}{7}\leqslant k\leqslant\frac{n}{3} Substitute n = 83 15 b n=83-15b , 23 4 b + 5 2 b 7 k 2 3 + 27 5 b 23-4b+\frac{5-2b}{7}\leqslant k\leqslant\frac{2}{3}+27-5b Since k k is an integer, 23 4 b + 5 2 b 7 k 2 3 + 27 5 b = 27 5 b 23-4b+\left\lceil\frac{5-2b}{7}\right\rceil\leqslant k\leqslant\left\lfloor\frac{2}{3}\right\rfloor+27-5b=27-5b ( x \lfloor x \rfloor is the greatest integer smaller or equal to x x ) S k ( b ) = ( 27 5 b ) ( 23 4 b + 5 2 b 7 ) + 1 = 5 b 5 2 b 7 \begin{aligned}\therefore S_k(b)&=(27-5b)-\left(23-4b+\left\lceil\frac{5-2b}{7}\right\rceil\right)+1 \\ &=5-b-\left\lceil\frac{5-2b}{7}\right\rceil\end{aligned} We have S k ( 2 ) = 2 , S k ( 3 ) = 2 , S k ( 4 ) = 1 , S k ( 5 ) = 0 S_k(2)=2,\quad S_k(3)=2,\quad S_k(4)=1,\quad S_k(5)=0


b = 0 5 S k ( b ) = 9 \displaystyle \sum_{b=0}^{5}{S_k(b)}=9 , therefore, there are 9 possible positive integer solutions for k k , substitute k k into our previously generated 'solutions formula' and you would get 9 pairs of solutions for a a and c c .

reaaaaly complex one.. isn't it ?

Abhishek Gorai - 6 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...