More fun in 2016, Part 22

Comrade Vladimir is getting some flowers for Nadezhda, his Valentine. Being of a precise analytical mind, he plans to spend exactly 2016 rubles on exactly 2016 flowers. At the flower market they sell lilies (3 rubles each), roses (2 rubles each) and daisies (50 kopeks each). Vladimir knows that Nadezhda loves lilies. How many daisies will he get to maximize the number of lilies in the bunch?

Note : Ruble and kopeks are basic monetary units in Russia. And one ruble is equivalent to 100 kopeks.


The answer is 1612.

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.

3 solutions

Rishabh Jain
Feb 14, 2016

Let the number of lilies, roses and daisies be x , y , z x,y,z . According to the given information we get 2 2 equations: x + y + z = 2016...... ( 1 ) 3 x + 2 y + z 2 = 2016..... ( 2 ) x+y+z=2016......(1)\\ 3x+2y+\frac{z}{2}=2016.....(2) Substituting value of z z from ( 1 ) (1) in ( 2 ) (2) and rearranging for x x , we get: x = 2016 3 y 5 x=\dfrac{2016-3y}{5} And since x,y,z are positive integers( Obviously!!) and we have to maximize x we can think of making the numerator a multiple of 5 5 as large as possible for us.. That occurs for y = 2 y=2 and its value is 402 402 . Substituting x = 402 x=402 and y = 2 y=2 in ( 1 ) (1) we get z = 1612 z=\boxed{1612} .... which are required no. of Daisies....
Ya... I know it's kinda Trial and Error... But it's not that too bad... :)

Yes, this is equivalent to Comrade @Pi Han Goh 's solution... you are both solving 5 L + 3 R = 2016 5L+3R=2016

Otto Bretscher - 5 years, 4 months ago

Log in to reply

Oops... Didn't saw that anyways... :)

Rishabh Jain - 5 years, 4 months ago
Pi Han Goh
Feb 14, 2016

This question is similar to this question , but the numbers becames ridiculously larger. (mutatis mutandis)


For consistency, we convert all the measurement to units of kopeks. So we have the following two points

1) Vladimir wants to spend a total of 201600 kopeks on exactly 2016 flowers.

2) 1 lily costs 300 kopeks, 1 rose costs 200 kopeks, and 1 daisy costs 50 kopeks.

Let L , R L,R and D D denote the number of lillies, roses and daisies Vladimir bought respectively. Then from the first point, we have

L + D + R = 2016 ( 1 ) L +D + R = 2016 \qquad (1)

And from the second point, knowing that Vladimir spent a total of 2016 kopeks, we have 300 L + 200 R + 50 D = 201600 300L + 200R + 50D = 201600 , or equivalently (divide both sides by 50):

6 L + D + 4 R = 4032 ( 2 ) 6L +D + 4R = 4032 \qquad (2)

So we have two diophantine equations. And because we know that Nadezhda loves lilies, that implies that Vladimir bought a non-zero amount of Lilies. In other words, L > 0 L > 0 . And of course, D , R 0 D,R\geq0 .

Taking the difference of the second equation and the first equation, we have

5 L + 3 R = 2016 ( 3 ) 5L + 3R = 2016 \qquad (3)

What's left to check is to find the maximum possible value of L L . We could just partition the number into the sum of two numbers: one is a multiple of 5 and the other is a multiple of 3, with the numerical value of the latter number minimized. A quick check shows that it's just 2016 = 2010 + 6 2016 = 2010 + 6 . Thus L = 2010 / 5 = 402 , R = 6 / 3 = 2 L = 2010/5 = 402, R = 6/3 = 2 . Thus from ( 1 ) (1) , we have D = 2016 402 2 = 1612 D = 2016 - 402 - 2 = \boxed{1612} .

Yes, another great short-cut! (+1)

I could just cut and paste my "systematic" solution from the other problem, changing a few numbers...shall I?

Otto Bretscher - 5 years, 4 months ago

Log in to reply

Try posting another solution then? haha! As you can see, I've modified my solution so that there's no "trial and error" which you apparently prefer to avoid.

Pi Han Goh - 5 years, 4 months ago

Footnote : If the reader wants to find all the solutions for ( L , D , R ) (L,D,R) when the constraint of maximizing L L is dropped, read here .

Pi Han Goh - 5 years, 4 months ago

Log in to reply

Footnote to the Footnote: The reader who wants to find all solutions can also look at my solution: D D can be any even number between 1344 and 1612, inclusive, so , there are 135 solutions.

Otto Bretscher - 5 years, 4 months ago
Otto Bretscher
Feb 14, 2016

Here is a systematic solution, copied over from here

We are given the equations

L + R + D = 2016 L+R+D=2016

3 L + 2 R + D / 2 = 2016 3L+2R+D/2=2016

The reduced row-echelon form (rref) of this system is

L 1.5 D = 2016 L-1.5D=-2016

R + 2.5 D = 4032 R+2.5D=4032

meaning that L = 2016 + 1.5 D L=-2016+1.5D and R = 4032 2.5 D R=4032-2.5D

Now we want L , R , D L,R,D to be integers, which means that D D is an even integer.

Also, L L and R R must be non-negative, which means that 2016 + 1.5 D 0 -2016+1.5D\geq 0 and 4032 2.5 D 0 4032-2.5D\geq 0 , or, 1612.8 D 1344 1612.8\geq D\geq 1344

Since L L is an increasing function of D D , we want to maximize D D . Comrade Vladimir will buy 1612 \boxed{1612} daisies, the largest even number 1612.8 \leq 1612.8 .

And here is a solution, which even a better skilled 5th grader would be able to understand:

If we would only buy daisies, it would cost us 2016 × 0.50 = 1008 rubles and we would have left with 2016 - 1008 = 1008 rubles (which we could use to exchange some of the daisies for more expensive flowers (lillies and/or roses)).

It would cost us to exchange one daisy for one lily 3.00 - 0.50 = 2.50 rubles and 1.50 rubles (= 2.00 - 0.50) to exchange one daisy for one rose.

If we want to have the greatest number of lillies, we have to find out how many times the cost of exchange (2.50) goes into the extra money we have (1008):

1008 ÷ 2.50 = 403.2

This means, that if we would exchange 403 daisies for 403 lillies then we would have left with 0.2 × 2.50 = 0.50 rubles. But we have to spend the exact amount, so it is not a good solution.

However, if we would have a lily less (so we would have 402 lillies), we would have 0.50 + 2.50 = 3.00 rubles left, which we could use to exchange 2 daisies for 2 roses and then we wouldn't have any money left.

Therefore, Vladimir can buy 402 lillies, 2 roses and (2016 - 402 - 2 =) 1612 \boxed {1612} daisies for exactly 2016 rubles.

( Check: 1612 × 0.50 + 402 × 3.00 + 2 × 2.00 = 2016 rubles.)

Zee Ell - 5 years, 4 months ago

Good solution I mean!

One could also consider the problem as a kind of linear optimization. After eliminating R we obtain two restrictions:

L = 1.5D - 2016

L <= 2016 - D

The maximum will be reached at a corner of the permitted area given by the intersection of the lines above delivering D = 1612.8. Finally one must only pay attention that there are not partial flowers following:

D = 1612, L = 402, R = 2

Andreas Wendler - 5 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...