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.
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.
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 and D denote the number of lillies, roses and daisies Vladimir bought respectively. Then from the first point, we have
L + D + R = 2 4 ( 1 )
And from the second point, knowing that Vladimir spent a total of 2400 kopeks, we have 3 0 0 L + 2 0 0 R + 5 0 D = 2 4 0 0 , or equivalently (divide both sides by 50):
6 L + D + 4 R = 4 8 ( 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 . And of course, D , R ≥ 0 .
Taking the difference of the second equation and the first equation, we have
5 L + 3 R = 2 4 ( 3 )
What's left to check is to find the possible values of L and R . Because 5 L ≤ 5 L + 3 R , then 5 L ≤ 2 4 . Solving this inequality for integer L gives L = 1 , 2 , 3 , 4 only.
Trial and errors shows that only one value of L gives an integer solution of R for the equation ( 3 ) , and it is L = 3 , with R = 3 . Substituting them into ( 1 ) gives D = 2 4 − 3 − 3 = 1 8 .
@Otto Bretscher , you should add this problem as an entry to this contest .
Log in to reply
I don't think this silly little problem is contest-worthy ;)
Great, clear solution, Comrade! Thanks! (+1)
Small typo: 5 L + 3 R ≤ 5 L
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.
Log in to reply
Log in to reply
Nothing fancy... just straightforward Gaussian elimination.... if nobody else will, I will write it up.
Log in to reply
@Otto Bretscher – Please do post it now! I want to give it a try! Thanks =)
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 and L in terms of D , and then make sure that R and 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 .
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.
Log in to reply
@Otto Bretscher – This one ? This is wayyy too expensive! Let me look up Chegg.com.
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
Log in to reply
@Otto Bretscher – I didn't know a professor would suggest people to illegally download textbooks.
Log in to reply
@Pi Han Goh – I'm certainly not suggesting that ;)
@Pi Han Goh – Here is the more challenging version
Log in to reply
@Otto Bretscher – Solved. You need to explicitly mention that you want to maximize L in this new question.
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.
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 .
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.
Problem Loading...
Note Loading...
Set Loading...
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 = 2 4
3 L + 2 R + D / 2 = 2 4
The reduced row-echelon form (rref) of this system is
L − 1 . 5 D = − 2 4
R + 2 . 5 D = 4 8
meaning that L = − 2 4 + 1 . 5 D and R = 4 8 − 2 . 5 D
Now we want L , R , D to be integers, which means that D is an even integer.
Also, L and R must be non-negative, which means that − 2 4 + 1 . 5 D ≥ 0 and 4 8 − 2 . 5 D ≥ 0 , or, 1 6 ≤ D ≤ 1 9 . 2
With D being even, that leaves us with two cases, D = 1 6 and D = 1 8 .
Since Nadezhda will not get any lilies when D = 1 6 , Comrade Vladimir will buy 1 8 daisies.