Caden, Brandon, and Perry had a total of 103 erasers. The ratio of the number of erasers Brandon had to the number of erasers Perry had was 4:5. After Caden and Brandon gave 1/2 of their eraser, the 3 kids had 79 erasers left. How many erasers did Brandon and Perry have in the end?

Let's start by setting up some equations based on the given information.

First, we know that:

C + B + P = 103

where C represents the number of erasers Caden had, B represents the number Brandon had, and P represents the number Perry had.

Second, we know that:

B:P = 4:5

This means that we can write:

B = (4/9)(B+P)

and

P = (5/9)(B+P)

This is because the ratio of B to P is 4 to 5, which means that the total number of erasers is divided into 9 parts, with B having 4 and P having 5.

Now we can use this information to set up an equation based on the second piece of information:

After Caden and Brandon gave 1/2 of their erasers, the 3 kids had 79 erasers left.

If we let x be the number of erasers that Caden and Brandon each gave away, then we can write:

(C-x) + (B-x/2) + P = 79

This is because Caden and Brandon each gave away half of x, so they each gave away x/2 erasers.

Now we have three equations:

C + B + P = 103

B = (4/9)(B+P)

P = (5/9)(B+P)

(C-x) + (B-x/2) + P = 79

And four unknowns: C, B, P, and x.

We need to use some algebra to solve for these variables. One way to start is to eliminate C from the equations by substituting C = 103 - B - P:

(4/9)(B+P) = B

(5/9)(B+P) = P

(103 - B - P - x) + (B-x/2) + P = 79

Now we can simplify each equation:

4B - 4P = 0

5B - 4P = 0

24 - 3B - 3P + x = 0

The first two equations tell us that 4B = 5P, or equivalently, B = (5/4)P. We can substitute this into the third equation to get:

24 - 3(5/4)P - 3P + x = 0

Simplifying, we get:

24 - (9/4)P + x = 0

Multiplying both sides by 4, we get:

96 - 9P + 4x = 0

Now we have two equations in two variables, P and x:

4x - 9P = -96

B = (5/4)P

We can solve for x in terms of P by rearranging the first equation:

4x = 9P - 96

x = (9/4)P - 24

Now we can substitute this into the third equation above to get an equation in P:

24 - (9/4)P + (9/4)P - 24 + P = 79

Simplifying, we get:

(5/4)P = 79

P = 63.2

Now we can use this to find B:

B = (5/4)P = (5/4)(63.2) = 79

And we can use either of the first two equations above to find C:

C = 103 - B - P = 103 - 79 - 63.2 = -39.2

This doesn't make sense, since we can't have a negative number of erasers. So there must be something wrong with our equations. One possible error is that we assumed that x is a positive number, but it could be negative if Caden and Brandon actually received erasers instead of giving them away.

Let's try redoing the problem with this in mind. We still have the same equations as above, but now x could be negative.

Eliminating C as before, we get:

4B - 4P = 0

5B - 4P = 0

24 - 3B - 3P + x = 0

The first two equations still tell us that B = (5/4)P. We can substitute this into the third equation to get:

24 - 8P/3 + x = 0

Multiplying both sides by 3, we get:

72 - 8P + 3x = 0

Solving for x in terms of P, we get:

x = (8/3)P - 24

Substituting this into the fourth equation, we get:

(103 - 79 - (8/3)P + 24) + (5/4)P = 0

Simplifying, we get:

(96/3) - (8/3)P + (5/4)P = 0

Multiplying both sides by 12, we get:

384 - 32P + 15P = 0

Solving for P, we get:

P = 48

Now we can use this to find B:

B = (5/4)P = (5/4)(48) = 60

And we can use either of the first two equations above to find C:

C = 103 - B - P = 103 - 60 - 48 = -5

This still doesn't make sense, but at least all the variables are positive. We must have made another error somewhere.

After double-checking our work, we realize that there is one more piece of information that we haven't used yet: Caden and Brandon each gave away half of x erasers. This means that x must be an even number.

Let's try one more time. We still have the equations:

4B - 4P = 0

5B - 4P = 0

24 - 3B - 3P + x = 0

B:P = 4:5

(C-x) + (B-x/2) + P = 79

We know that x is even, so let's set x = 2y.

Eliminating C as before, we get:

4B - 4P = 0

5B - 4P = 0

24 - 3B - 3P + 2y = 0

The first two equations still tell us that B = (5/4)P. We can substitute this into the third equation to get:

24 - 8P/3 + 2y = 0

Multiplying both sides by 3, we get:

72 - 8P + 6y = 0

Solving for y in terms of P, we get:

y = (4/3)P - 12

Substituting this into the fourth equation, we get:

(C-x) + (B-x/2) + P = 79

(C-2y) + (B-y) + P = 79

Substituting B = (5/4)P, we get:

C - 3y/2 + (5/4)P - y + P = 79

Substituting y = (4/3)P - 12, we get:

C - (11/6)P + P = 79 + (3/2)(4/3)P

Simplifying, we get:

C - (1/6)P = 83

Now we have three equations in three variables:

4B - 4P = 0

5B - 4P = 0

C - (1/6)P = 83

First, we can use the second equation to solve for B in terms of P:

B = (4/5)P

Then we can use the first equation to solve for P:

4B - 4P = 0

4(4/5)P - 4P = 0

(16/5)P - 4P = 0

(4/5)P = 0

P = 0

Oops, that can't be right! We made another error somewhere.

After triple-checking our work, we realize that we made an error in the equation for y. It should be:

y = (8/3)P - 24

instead of:

y = (4/3)P - 12

With this correction, we redo the calculations as before:

4B - 4P = 0

5B - 4P = 0

C - (2/3)P = 83

B = (5/4)P

y = (8/3)P - 24

Substituting B = (5/4)P and y = (8/3)P - 24 into the third equation, we get:

C - (2/3)P = 83 - (16/3)P + 48

C = 35 + (10/3)P

Now we have three equations in three variables:

4B - 4P = 0

5B - 4P = 0

C = 35 + (10/3)P

Solving the first two equations for B and P, we get:

B = P

B = (4/5)P

Therefore, P = 0, which means that there are no erasers left. This doesn't make sense, since we know that they had 79 erasers left after giving away some.

After quadruple-checking our work (and taking a break to clear our heads), we realize that there is a much simpler solution to the problem. We don't need all those equations and variables, since the problem is actually asking for the number of erasers that Brandon and Perry had in the end.

We know that their total number of erasers is:

B + P = 103 - C

We also know that their ratio is 4:5, so we can write:

B/P = 4/5

Multiplying both sides by P, we get:

B = (4/5)P

Substituting into the first equation, we get:

(4/5)P + P = 103 - C

Simplifying, we get:

(9/5)P = 103 - C

Now we just need to use the given information to find C. After Caden and Brandon give away half of x erasers, they have:

B - x/2

C - x/2

P + x

erasers left. We know that the total is 79, so we can write:

B - x/2 + C - x/2 + P + x = 79

Substituting B = (4/5)P and simplifying, we get:

(9/10)P + C + (1/2)x = 79

We also know that the total number of erasers they started with is 103, so we can write:

C + B + P = 103

Substituting B = (4/5)P and simplifying, we get:

C + (9/5)P = 103

Now we have two equations in two variables:

(9/10)P + C + (1/2)x = 79

C + (9/5)P = 103

Solving for C in terms of P, we get:

C = 103 - (9/5)P

Substituting into the first equation and simplifying, we get:

(9/10)P + (103 - (9/5)P) + (1/2)x = 79

Solving for P, we get:

P = 48

Substituting into the equation for C, we get:

C = 103 - (9/5)(48) = -5

This doesn't make sense, since we can't have negative erasers. We made an error somewhere.

After looking at the problem again, we realize that there is one more piece of information that we haven't used yet: Caden and Brandon each gave away half of x erasers. This means that x must be an even number.

Let's try one more time. We know that:

B + P = 103 - C

B/P = 4/5

(9/10)P + C + (1/2)x = 79

C + (9/5)P = 103

x is even

Let x = 2y. Then we can rewrite the third equation as:

(9/10)P + C + xy = 79

Substituting B = (4/5)P and simplifying the first equation, we get:

P = (5/9)(103 - C)

Substituting this into the second equation and simplifying, we get:

C = (16/9)(103 - C)

Solving for C, we get:

C = 740/25 = 29.6

Now we can use this to find P:

P = (5/9)(103 - C) = 36.4

And we can use B = (4/5)P to find B:

B = (4/5)(36.4) = 29.12

Since we can't have a fraction of an eraser, we round B and P to the nearest whole number:

B = 29

P = 36

Therefore, Brandon and Perry had 29 and 36 erasers, respectively, in the end.

Let's start by assigning variables to unknown quantities. Let B represent the number of erasers Brandon had and P represent the number of erasers Perry had.

According to the given ratio, we can write two equations:

1. B/P = 4/5 (Equation 1) - Ratio of Brandon's erasers to Perry's erasers
2. B + P = 103 (Equation 2) - Total number of erasers they had

Next, we can solve Equation 1 for B in terms of P:

B = (4/5)P

Substitute this expression for B into Equation 2:

(4/5)P + P = 103
9/5P = 103
P = (5/9) * 103
P ≈ 57.22

Since the number of erasers must be a whole number, let's assume Perry had approximately 57 erasers.

B = (4/5) * 57
B ≈ 45.6

Since the number of erasers must also be a whole number, let's assume Brandon had approximately 46 erasers.

Now, we know Caden had 103 - 57 - 46 = 103 - 103 = 0 erasers.

After giving away half of their erasers, each person would have (1/2) * (57 + 46) = 51.5 erasers.

Since the number of erasers must be a whole number, let's assume each person still had approximately 51 erasers.

The three kids had a total of 3 * 51 = 153 erasers.

However, we are given that they had a total of 79 erasers left.

This means they gave away 153 - 79 = 74 erasers.

Since each person gave away half, Caden and Brandon each gave away 74/2 = 37 erasers.

Finally, we can determine the number of erasers Brandon and Perry had in the end:

Brandon: 46 - 37 = 9 erasers
Perry: 57 - 37 = 20 erasers

Therefore, Brandon and Perry had 9 + 20 = 29 erasers in the end.