Problem 42382. Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For example: If the ages of Alex and Barry sum to 43, the ages of Alex and Chris sum to 55, and the ages of Barry and Chris sum to 66, what are their individual ages?
For this problem, we'll assume that the three individuals are represented by A, B, and C, whereas the sums are AB, AC, and BC:
- A+B = AB (= 43)
- A+C = AC (= 55)
- B+C = BC (= 66)
As you might have noticed, this is a simple matrix algebra problem. Write a function to return the individuals' ages [A;B;C] based on the supplied sums [AB AC BC].
Solution Stats
Problem Comments
-
2 Comments
Barry and Chris (not Alex and Chris)
Thanks for the catch. I've updated the explanation.
Solution Comments
Show commentsProblem Recent Solvers302
Suggested Problems
-
2102 Solvers
-
Change the sign of even index entries of the reversed vector
586 Solvers
-
Find the index of n in magic(n)
258 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
2020 Solvers
-
1598 Solvers
More from this Author139
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!