Come On, Come On, Dragonite!

For every Dratini you catch in the wild, you will get 3 Dratini candies .
For every Dratini you hatched in the wild, you will get 10 Dratini candies.

If I have a total of 25 Dratini candies, how many Dratinis do I have in total?

5 6 4 7

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

Tapas Mazumdar
Oct 5, 2016

Relevant wiki: Linear Diophantine Equations

Let the number of Dratinis caught be x x and the number of Dratinis hatched be y y . Therefore, we have,

3 x + 10 y = 25 3x+10y=25

As we know that x x and y y are both non-negative integers. So,

x = 5 , y = 1 x=5 \ , \ y=1

Therefore, total Dratinis with Pi Han = 6 = \boxed{6} .


Why ( x , y ) = ( 5 , 1 ) (x,y) = (5,1) is the only solution?

Considering the diophantine equation 3 x + 10 y = 25 3x+10y=25 , we have gcd ( 3 , 10 ) = 1 \gcd(3,10) = 1 . So,

1 = 3 7 + 10 ( 2 ) 1 = 3 \cdot 7 + 10 \cdot (-2)

Then one solution is x = 7 25 x^* = 7 \cdot 25 and y = ( 2 ) 25 y^* = (-2) \cdot 25 . And all other solutions are of form,

( x + m 10 gcd ( 3 , 10 ) , y m 3 gcd ( 3 , 10 ) ) \left( x^* + m \frac{10}{\gcd(3,10)}, ~ y^* - m \frac{3}{\gcd(3,10)} \right)

or

( 7 25 + 10 m , 50 3 m ) \left( 7 \cdot 25 + 10m, ~ -50 - 3m \right)

for some integer m m .

As per the problem, we need to find the integers that satisfy 7 25 + 10 m 0 7 \cdot 25 + 10m \ge 0 and 50 3 m 0 -50 - 3m \ge 0 , so,

7 5 2 m 50 3 \dfrac{-7 \cdot 5}{2} \le m \le \dfrac{-50}{3}

The only integer value of m m satisfying the above inequality is m = 17 m = -17 , which yields our solution as:

( x , y ) = ( 7 25 + 10 ( 17 ) , 50 3 ( 17 ) ) = ( 5 , 1 ) (x,y) = \bigg( 7 \cdot 25 + 10 \cdot (-17), ~ -50 - 3 \cdot (-17) \bigg) = \boxed{\left(5,1\right)}

Not exactly correct. "x" and "y" are non-negative integers, not "natural numbers".

Challenge Master Note : Solve the follow up question:

For every Dratini you catch in the wild, you will get 3 Dratini candies.
For every Dratini you hatched in the wild, you will get 10 Dratini candies.

Prove that it is possible for me to have a total of N N Dratini candies for any integer N 18 N\geq 18 .

Pi Han Goh - 4 years, 8 months ago

Log in to reply

Solution to challenge master problem: N=18 can have 6 wild dratinis. N=19 can have 1 hatched dratini and 3 wilds. N=20 can have 2 hatched dratinis. For N>20, use one of those three and just add more wild dratinis; it will work as you can just add threes and there are already 3 in a row set.

Siva Budaraju - 4 years ago

Log in to reply

Right. There's a one-line solution, can you see how it's done?

Pi Han Goh - 4 years ago

Log in to reply

@Pi Han Goh Yes; by the Chicken McNugget Theorem. 10•3-10-3=17 is the most number of Dratinis that cannot be gotten.

Siva Budaraju - 3 years, 12 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...