Combined Ages 1 - Symmetric, n = 3 - MATLAB Cody - MATLAB Central

Problem 42382. Combined Ages 1 - Symmetric, n = 3

Difficulty:Rate

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

54.16% Correct | 45.84% Incorrect
Last Solution submitted on May 09, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
2
4
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Matrix Patterns III Image
Matrix Patterns III
  • 12 Problems
  • 47 Finishers

Problem Recent Solvers270

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page