Happy Valentine's Day, Comrades!

Vladimir is getting some flowers for Nadezhda, his Valentine. Being of a precise analytical mind, he plans to spend exactly 24 rubles on exactly two dozen 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?

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


The answer is 18.

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.

2 solutions

Otto Bretscher
Feb 14, 2016

Here is a systematic (and therefore a bit lengthy and boring) solution. It is fun to look for shortcuts, but it is also comforting to know that there is a systematic approach.

We are given the equations

L + R + D = 24 L+R+D=24

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

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

L 1.5 D = 24 L-1.5D=-24

R + 2.5 D = 48 R+2.5D=48

meaning that L = 24 + 1.5 D L=-24+1.5D and R = 48 2.5 D R=48-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 24 + 1.5 D 0 -24+1.5D\geq 0 and 48 2.5 D 0 48-2.5D\geq 0 , or, 16 D 19.2 16\leq D\leq 19.2

With D D being even, that leaves us with two cases, D = 16 D=16 and D = 18 D=18 .

Since Nadezhda will not get any lilies when D = 16 D=16 , Comrade Vladimir will buy 18 \boxed{18} daisies.

Pi Han Goh
Feb 14, 2016

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 2400 kopeks on exactly 24 (two dozen) 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 = 24 ( 1 ) L +D + R = 24 \qquad (1)

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

6 L + D + 4 R = 48 ( 2 ) 6L +D + 4R = 48 \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 = 24 ( 3 ) 5L + 3R = 24 \qquad (3)

What's left to check is to find the possible values of L L and R R . Because 5 L 5 L + 3 R 5L\leq5L + 3R , then 5 L 24 5L \leq 24 . Solving this inequality for integer L L gives L = 1 , 2 , 3 , 4 L =1,2,3,4 only.

Trial and errors shows that only one value of L L gives an integer solution of R R for the equation ( 3 ) (3) , and it is L = 3 L = 3 , with R = 3 R = 3 . Substituting them into ( 1 ) (1) gives D = 24 3 3 = 18 D = 24 - 3 - 3 = \boxed{18} .

@Otto Bretscher , you should add this problem as an entry to this contest .

Pi Han Goh - 5 years, 4 months ago

Log in to reply

I don't think this silly little problem is contest-worthy ;)

Otto Bretscher - 5 years, 4 months ago

Great, clear solution, Comrade! Thanks! (+1)

Small typo: 5 L + 3 R 5 L 5L+3R\leq 5L

Maybe somebody will solve it without "trial and error". Suppose Comrade Vladimir wants to get 2017 flowers next year for 2017 rubles, in which case "trial and error" becomes tedious.

Otto Bretscher - 5 years, 4 months ago

Log in to reply

Fixed thanks.

What other method were you thinking of? Knapsack?

Pi Han Goh - 5 years, 4 months ago

Log in to reply

Nothing fancy... just straightforward Gaussian elimination.... if nobody else will, I will write it up.

Otto Bretscher - 5 years, 4 months ago

Log in to reply

@Otto Bretscher Please do post it now! I want to give it a try! Thanks =)

Pi Han Goh - 5 years, 4 months ago

Log in to reply

@Pi Han Goh It's Valentine's day, Comrade... I need to entertain my woman (she is very jealous of Brilliant, btw) ;) Just bring the system into rref (reduced row-echelon form), expressing R R and L L in terms of D D , and then make sure that R R and L L are non-negative integers. That's the systematic (and a bit boring) way to do problems like this. At the end pick the solution with the highest L L .

There are lots of problems like this in the wonderful old Chinese text "The Nine Chapters on the Mathematical Art" (Chapter 8), from circa 250 BC.

Otto Bretscher - 5 years, 4 months ago

Log in to reply

@Otto Bretscher This one ? This is wayyy too expensive! Let me look up Chegg.com.

Pi Han Goh - 5 years, 4 months ago

Log in to reply

@Pi Han Goh I know, crazy expensive! This is the only library book I ever stole, from Harvard's Widener Library ;) People say there is a free copy online, though

Otto Bretscher - 5 years, 4 months ago

Log in to reply

@Otto Bretscher I didn't know a professor would suggest people to illegally download textbooks.

Pi Han Goh - 5 years, 4 months ago

Log in to reply

@Pi Han Goh I'm certainly not suggesting that ;)

Otto Bretscher - 5 years, 4 months ago

@Pi Han Goh Here is the more challenging version

Otto Bretscher - 5 years, 4 months ago

Log in to reply

@Otto Bretscher Solved. You need to explicitly mention that you want to maximize L L in this new question.

Pi Han Goh - 5 years, 4 months ago

Log in to reply

@Pi Han Goh You are good! But then again, we knew that already... Did you "cheat" and use a short-cut again? ;)

If time allows, I will write one where there are more species of flowers to choose from.

Otto Bretscher - 5 years, 4 months ago

Log in to reply

@Otto Bretscher Cheat? Do you mean a duplicate account? nope.

I'll write up another elementary solution soon. As you already know, Matrix is not my forte and I find it convoluted .

Pi Han Goh - 5 years, 4 months ago

Log in to reply

@Pi Han Goh Oh no, by "cheat" I mean using a short-cut, as I said. I'm speaking in jest.

The "systematic" solution does not have to involve matrices. At this stage, matrices are just a short-hand notation to save chalk or ink ;) I have posted my lengthy and boring but systematic solution.

Otto Bretscher - 5 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...