Problem 42383. Combined Ages 3 - Non-symmetric, n ≥ 3
Pursuant to the previous two problems ( Symmetric, n = 3 and Symmetric, n ≥ 3 ), this problem will provide n combined ages where n is the number of individuals, though the age sums will not form a symmetric matrix. As an example: If the ages of all four individuals sum to 70; the ages of Alex, Barry, and Chris sum to 65; the ages of Alex and Barry sum to 40; and the ages of Barry and Chris sum to 52, what are their individual ages?
The individuals will be represented by the first n capital letters of the alphabet and the sums will be represented by variables whose string names contain each associated individual (capital letter). In this example problem, the equations would be represented as:
- A+B+C+D = ABCD (= 70)
- A+B+C = ABC (= 65)
- A+B = AB (= 40)
- B+C = BC (= 52)
Write a function to return the individuals' ages based on the supplied sums. See the test suite for examples and the tags for some hints.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers89
Suggested Problems
-
3410 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1195 Solvers
-
Find the largest value in the 3D matrix
1542 Solvers
-
Circular Primes (based on Project Euler, problem 35)
564 Solvers
-
477 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!