Associated Topics || Dr. Math Home || Search Dr. Math

### Average Age at a Party

```
Date: 10/27/1999 at 10:50:39
From: Rob Amure
Subject: Discrete math problems

At the classroom costume party the average age of the (b) boys is g
and the average age of the (g) girls is b. If the average age of
everyone, including the 42-year-old teacher, is b+g, what is the value
of b+g?
```

```
Date: 10/28/1999 at 10:33:31
From: Doctor Rob
Subject: Re: Discrete math problems

Thanks for writing to Ask Dr. Math, Rob.

The total age of the b boys is b*g, and the total age of the g girls
is g*b. The total age of everyone is b*g + g*b + 42, and there are
b+g+1 people. This gives you the equation

(2*b*g + 42)/(b+g+1) = b+g

2*b*g + 42 = (b+g)^2 + (b+g)

42 = b^2 + g^2 + b + g.

Now there are infinitely many solutions to this equation in real
numbers. In integers, however, the situation is different. Let b and g
be positive integers. Then multiply both sides by 4 and complete the
square on both b and g by adding 1 + 1. This will lead to

170 = (2*b + 1)^2 + (2*g + 1)^2

It's not hard to find the solutions of this (there are two with b > 0,
g > 0), and to compute b+g.

- Doctor Rob, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
College Discrete Math
College Number Theory
High School Discrete Mathematics
High School Number Theory

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search