Legacy puzzle - elegant approach?

In summary: S=\frac L{N-1}\left(\frac{L}{N-1}\right)S##In summary, the first son would have received the least amount of money, the second son would have received twice as much money, and the third son would have received three times as much money.
  • #1
musicgold
304
19
Hi,
This is not homework. I am struggling with a puzzle from this book (page 6, puzzle #13). I know the answer of the puzzle but I can't seem to figure out a good approach.

1. Homework Statement

A man left legacies to his three sons and to a hospital, amounting in all to $1,320.00. If he had left the hospital legacy also to his first son, that son would have received as much as the other two sons together. If he had left it to his second son, he would have received twice as much as the other two sons together. If he had left the hospital legacy to his third son, he would have received then thrice as much as the first son and second son together. Find the amount of each legacy.

Homework Equations


## a+b+c+h =1320 ~ ....(1)\\
h= b+c-a ~ ....(2)\\
h=2a +2c-b ~ ....(3)\\
h=3a+3b-c ~ ....(4)##

The Attempt at a Solution


Using equation (1), I got ## c =660 -b##
Also I equated equations (2) and (3) to get ## 2b = 3a +c##
I substituted the value of c in this equation to get ##b =220 +a##
Using these values of c and b in equation (1) I got ##b+h=880##
I am not sure what to do after this.

Also, is there an elegant way to solve this problem?

Thanks
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
musicgold said:
Hi,
This is not homework. I am struggling with a puzzle from this book (page 6, puzzle #13). I know the answer of the puzzle but I can't seem to figure out a good approach.

1. Homework Statement

A man left legacies to his three sons and to a hospital, amounting in all to $1,320.00. If he had left the hospital legacy also to his first son, that son would have received as much as the other two sons together. If he had left it to his second son, he would have received twice as much as the other two sons together. If he had left the hospital legacy to his third son, he would have received then thrice as much as the first son and second son together. Find the amount of each legacy.

Homework Equations


## a+b+c+h =1320 ~ ....(1)\\
h= b+c-a ~ ....(2)\\
h=2a +2c-b ~ ....(3)\\
h=3a+3b-c ~ ....(4)##

The Attempt at a Solution


Using equation (1), I got ## c =660 -b##
Also I equated equations (2) and (3) to get ## 2b = 3a +c##
I substituted the value of c in this equation to get ##b =220 +a##
Using these values of c and b in equation (1) I got ##b+h=880##
I am not sure what to do after this.

Also, is there an elegant way to solve this problem?

Thanks

You just need to keep working on those equations.
 
Last edited by a moderator:
  • Like
Likes musicgold
  • #3
A quick hint after @PeroK :
musicgold said:
##h=3a+3b−c ....(4)##
c = 660-b
b = 220+a
h=?

Edit:And also, check out Guassian elimination.
 
Last edited:
  • Like
Likes musicgold
  • #4
I'm not sure if it's particularly elegant, but it's clear from the puzzle that the first son (##a##) must have got the least. So, you could forget about the total for a bit and solve for ##b, c, h## in terms of ##a##. That would be using your equations (2), (3) and (4).
 
  • Like
Likes musicgold and YoungPhysicist
  • #5
I would rewrite (2) in the form ##h+a=b+c## and substitute in (1) to get
##2b+2c=1320~\rightarrow~b+c=660~~ (5)##.
By similar rewriting and substitution back to (1) of equations (3) and (4), you get
##a+c=\cdots~~(6)##
##a+b=\cdots~~(7)##
Now if you add (5)+(6)+(7), the right side of this equation is twice the sum ##a+b+c##. Knowing that sum you can find the value of ##h##. At his point you can subtract (6) from (5) to get an equation for the difference ##b-a##. Add that to (7) to get an equation for ##2a##, and so on and so forth.
 
  • #6
musicgold said:
is there an elegant way to solve this problem?
Your best bet of finding an elegant solution is to generalise it first.
Let the rth son get ar, r=1..n. Write the equations using Σar terms.
 
  • #7
haruspex said:
Your best bet of finding an elegant solution is to generalise it first.
Let the rth son get ar, r=1..n. Write the equations using Σar terms.
Since there's been no response, let me fill in the details.
Let S be the sum of the legacies to the N sons.
Total legacy L= h+S.
h+a1=S-a1
h+a2=2S-2a2
etc.
h+(r+1)ar=rS
##a_r=\frac{rS-h}{r+1}=S-\frac{S+h}{r+1}##
Summing
##S=NS-L\Sigma\frac 1{r+1}##
##S=\frac L{N-1}\Sigma\frac 1{r+1}##
 

1. What is the "Legacy puzzle - elegant approach"?

The "Legacy puzzle - elegant approach" refers to a problem-solving technique that aims to find a simple and efficient solution to complex legacy code. It involves identifying and removing unnecessary code, refactoring existing code, and implementing new code in a way that is easy to maintain and understand.

2. Why is the "Legacy puzzle - elegant approach" important?

The "Legacy puzzle - elegant approach" is important because it helps improve the overall quality and functionality of legacy code. It can also make the code easier to maintain and update, reducing the risk of bugs and errors. Additionally, it can save time and resources by streamlining the codebase and making it more efficient.

3. How is the "Legacy puzzle - elegant approach" different from other approaches?

The "Legacy puzzle - elegant approach" is different from other approaches because it focuses on finding the simplest and most efficient solution to a problem. It prioritizes readability, maintainability, and scalability, rather than just fixing immediate issues. This approach also involves breaking down complex problems into smaller, more manageable pieces, making it easier to identify and fix potential issues.

4. What are the benefits of using the "Legacy puzzle - elegant approach"?

Some of the benefits of using the "Legacy puzzle - elegant approach" include improved code quality, reduced technical debt, increased efficiency, and easier maintenance. It can also make the code more adaptable to changes and new features, and can help identify and fix potential bugs and errors.

5. How can I implement the "Legacy puzzle - elegant approach" in my work?

To implement the "Legacy puzzle - elegant approach" in your work, start by understanding the problem and identifying areas of the code that can be improved. Then, prioritize refactoring and simplifying the code, removing unnecessary components, and implementing new code in a clean and efficient manner. It is also important to continuously review and improve the code to maintain its elegance and functionality.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
21
Views
636
  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
13
Views
2K
  • Precalculus Mathematics Homework Help
Replies
15
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Biology and Medical
Replies
5
Views
2K
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
Replies
7
Views
8K
Back
Top