I received the following brain teaser by e-mail and posted it to my brain teasers page. I hadn’t yet figured it out and hoped someone else would help me out.
Well, it’s now exactly one month from when I received it, and yesterday I finally got the answer. I wouldn’t dream of ruining the fun of figuring it out for anyone else, so here’s the riddle sans answer.
A princess is as old as the prince will be when the princess is twice the age that the prince was when the princess’s age was half the sum of their present ages.
What are their ages?
In the end, I had to pull out ye ol’ linear algebra from college to figure out the answer. There are others ways, but I didn’t have much success with them.
I may post a few hints in the comments, depending on how difficult it is for others to figure out.
Spoiler Warning: Answers are in the comments, so if you want to figure it out yourself, don’t scroll down.
princess: 40
» Comment by chad on November 22, 2006 @ 12:02 pmprince: 30
Wow. I’m impressed. How did you find the solution? (there are several more combinations that work based on a simple formula).
» Comment by dan on November 22, 2006 @ 12:10 pmIt’s a bit messy… but using simple algebra… I’m sure there are much easier ways of accomplishing the solution.
Princess: a
Prince: b
0.5*(a+b) a - (0.5*(a+b)) = 0.5*a-0.5*b b - (0.5*a-0.5*b) = 1.5*b-0.5*a 3*b-a
(3*b-a) - a = 3*b-2*a b + (3*b-2*a) = 4*b-2*a a = 4*b-2*a or 3*a = 4*b b+10
0.5*b+5 b - (0.5*b+5) = 0.5*b-5 a - (0.5*b-5) = a-0.5*b+5 b = a-0.5*b+5 or a = 1.5*b-5
Now we have two equations:
3*a = 4*b and a = 1.5*b-5.
Substitute “a” in the first equation for the value of “a” from the second equation:
3*(1.5*b-5) = 4*b
Solving this equation, we get:
b=30
Since a = 1.5*b-5:
» Comment by chad on November 22, 2006 @ 12:23 pma=40
Very interesting. Here is the solution I came up with (which is just as messy)
I created the following table from the riddle:
I then created three equations, since the difference in their age will always be the same.
d = the difference in ages
x - y = d
2z - x = d
x/2 + y/2 - z = d
I then created a matrix and solved it using row reduction
It reduced to:
This means that you can pick any difference you want (an even one presumably because you want integer ages).
Princess age: 4d
Prince age: 3d
Ages that work
I gave up! I don’t think that is simple algebra, Chad. Good job guys.
» Comment by katie on November 22, 2006 @ 2:17 pmi hope someone can help me. my niece has a riddle to be solved by friday! “leslie and lorna have the same parents. leslie and lorna look exactly alike. leslie and lorna are the same age, yet they are not twins. how is this possible?” please e-mail me if you know the answer, or if there is a free site that can give it to me thank you for your help in advance. angie
» Comment by angie9616 on January 23, 2007 @ 1:07 pmThey’re triplets.
» Comment by dan on January 23, 2007 @ 1:16 pmThey are both 0
» Comment by Charlie on February 14, 2007 @ 12:04 amem… baldur’s gate 2
» Comment by Kyle on October 30, 2007 @ 5:13 amsimple, 2{m-[f-(f+m)/2]}-f+m=f
Thanks for the pointer - I didn’t know that came from Baldur’s Gate 2.
» Comment by dan on October 30, 2007 @ 4:20 pmPrincess - 978564
Prince - 12
I used simple math to find the answer.
u = 7x/6 = 2rp + u =11rp/6 - 34ru + 783r
And that means they have snazzy pants, yo.
» Comment by Yay Yourface on February 19, 2008 @ 8:12 amHello there
Although I’m mighty impressed with the algebra skills of all you guys, I must say that in the explanation of Chad I don’t quite understand how he’s getting all of the following equations:
0.5*(a+b) a - (0.5*(a+b)) = 0.5*a-0.5*b b - (0.5*a-0.5*b) = 1.5*b-0.5*a 3*b-a
(3*b-a) - a = 3*b-2*a b + (3*b-2*a) = 4*b-2*a a = 4*b-2*a or 3*a = 4*b b+10
0.5*b+5 b - (0.5*b+5) = 0.5*b-5 a - (0.5*b-5) = a-0.5*b+5 b = a-0.5*b+5 or a = 1.5*b-5
merely out of that riddle;
and neither did I completely get Dan’s explanation, since in the beginning he’s saying that:
“since the difference in their age will always be the same.”
But when looking at the possible solutions, the difference in their age is only 2 years when the Princess is 8 and the Prince is 6, while it’s already 20 years in his last possible answer. How can this be the start of the riddle solving then? Perhaps he meant percentagewise? Or was he referring to something else?
In any case, no disrespect for the two however, if it helped them solve the riddle, then congratulations!
The way I did it, is slightly different; more a trial and error. Of course I did have the five possibilities at hand, that were presented in the game itself, which narrowed my search down a lot, but with a decent .xls file, I’m sure I could try all possible numbers between 1 and 100 in just the same time.
Here it goes:
When you read the riddle, you can make up that it involves the ages of only two persons; therefore I suggest you first make two columns; one for the Princess and one for the Prince. Furthermore the riddle
speaks of their age in the present, makes a comparison in the future, and states something about their age in the past. Therefore I suggest you make three lines per column.
You can represent this as follows:
AGE Princess Prince
Past A B
Present C D
Future E F
Now let’s see what the riddle says about the relations of their age.
relation 1:
A princess IS (Present) as old as the prince WILL BE (Future)
therefore C = F
relation 2:
when the princess is twice the age (Future) that the prince WAS (Past)
perhaps not so clear if you read the fragment separately, but if you read it well this means E = B x 2
relation 3:
when the princess’s age WAS (Past) half the sum of their PRESENT ages (Present).
therefore A = ½ (C + D)
A bit difficult to represent all that, using just plain text, but here I try anyway:
AGE Princess Prince
Past A/2 = _ B x 2
\ /
_____+__/___
| / |
Present C __ / D
\ /
=
/ \
Future E _/ \____ F
I hope that’s clear enough. Now, the five possibilities in the game were:
1 The princess is 40, prince is 30;
2 The princess is 30, prince is 40;
3 The princess is 30, prince is 20;
4 The princess is 20, prince is 30;
5 Their both the same age (let’s use 50).
1 2 3 4 5
AGE P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce
Past A B | A B | A B | A B | A B
Present 40 30 | 30 40 | 30 20 | 20 30 | 50 50
Future E F | E F | E F | E F | E F
And use relation 1:
1 2 3 4 5
AGE P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce
Past A B | A B | A B | A B | A B
Present 40 30 | 30 40 | 30 20 | 20 30 | 50 50
Future E 40 | E 30! | E 30 | E 20! | E 50!
Whatever difference in age the Prince has (his Present vs Future), we can of course extract to the Princess her age, therefore:
1 2 3 4 5
AGE P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce
Past A B | A B | A B | A B | A B
Present 40 30 | 30 40 | 30 20 | 20 30 | 50 50 Future 50 40 | 20! 30! | 40 30 | 10! 20! | 50! 50!
As you can see, in possibilities 2, 4 and 5, the FUTURE age of the Princess and that of the Prince turn out to be either SMALLER than or EQUAL to their present age, which is of course illogical and not
possible, therefore you can already rule out these three!
Now let’s see how relation 2 affects the schedule:
1 2 3 4 5
AGE P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce
Past A 25 | x x | A 20! | x x | x x
Present 40 30 | x x | 30 20 | x x | x x
Future 50 40 | x x | 40 30 | x x | x x
Again, whatever difference in age the Prince has (his Present vs his Past), the same difference in years must be valid for the Princess as well, therefore:
1 2 3 4 5
AGE P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce | P’ss P’ce
Past 35 25 | x x | 30 20! | x x | x x
Present 40 30 | x x | 30 20 | x x | x x
Future 50 40 | x x | 40 30 | x x | x x
As you can see in possibility 3, the age in the past is the same as the age in the present (for the both of them); illogical and not possible one full-blooded Vulcan would say, therefore we’ll no further explore this this option either.
This leaves us only one, but just to make sure we’re 100% correct, we’ll test relation 3 on it and see if the Past age of the Princess is indeed half the sum of their current ages:
A = ½ (C + D)
35 = ½ (40 + 30)
No need to be a rocket scientist to figure out this is indeed correct! Believe me when I say that you can use this way of working, using the three relations, in whatever order you like, you’ll still end up with the correct result. It also works with many other numbers, as long as they have the same correlation (one to the other) as 40 has to 30. I mean like 0,20 is to 0,15, or as 8000 is to 6000. Of course, these are no valid ages unless you’re genetically related to Gilgamesh, but just trying to back up Dan’s earlier statement here.
Now, I know this whole explanation may sound and look a lot more elaborate than the two previous ones, but honestly, I think in the end it’s much simpler. No need for algebra, it’s easy to understand for all.
I hope this will be useful for future people arriving on this site.
Regards
Didier
» Comment by Lord_DDA on February 27, 2008 @ 10:17 amAaaaargh! Too bad the makup of the formula and sheme alters when uploading, makes it a lot less clear. Try to insert some spaces yourself when copying this to a notepad file, and you should see something like this:
AGE…….Princess……Prince
Past…….A/2.=……_.B x 2.
…………….\…./……..
…………_____+__/___……
………..|……./….|…..
Present….C.__…/…..D…..
……………\./…………
…………….=………….
……………/.\…………
Future…..E._/…\____.F…..
…………1………..2………..3………..4………..5…..
» Comment by Lord_DDA on February 27, 2008 @ 10:32 amAGE…..P’ss.P’ce.|.P’ss.P’ce.|.P’ss.P’ce.|.P’ss.P’ce.|.P’ss.P’ce.
Past…..35…25..|..x….x…|..30…20!.|..x….x…|..x….x…
Present..40…30..|..x….x…|..30…20..|..x….x…|..x….x…
Future…50…40..|..x….x…|..40…30..|..x….x…|..x….x…
30, 40
» Comment by Mary on October 21, 2008 @ 7:42 pm