pranay -askiitians expert
Last Activity: 14 Years ago
heres the altenative solution for the second question
create the following table from the riddle:
|
Current |
Future |
Past |
Princess |
x |
2z |
(x+y)/2 |
Prince |
y |
x |
z |
then create 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
then create a matrix and solved it using row reduction
x |
y |
z |
1 |
-1 |
0 |
d |
-1 |
0 |
2 |
d |
.5 |
.5 |
-1 |
d |
It reduces to:
x |
y |
z |
1 |
0 |
0 |
4d |
0 |
1 |
0 |
3d |
0 |
0 |
1 |
5d/2 |
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
Princess |
Prince |
4 |
3 |
8 |
6 |
16 |
12 |
24 |
18 |
32 |
24 |
40 |
30 |
48 |
36 |
56 |
42 |
64 |
48 |
72 |
54 |
80 |
60
|