# Maximum value for parameter

I am facing the following problem:

A number of a adults, b children older than 12, and c children younger than twelve attend an event. The sum of all people a+b+c=100. The prices are \$6 per adult, \$3 per old child, and \\$1 per young child. The cumulative money spent 6a+3b+c=310. So far, so good. But from these two equations

 a +  b + c = 100
6a + 3b + c = 310


How do I determine the variables (a, b, c) for a, b and c, respectively? My (failed) approach so far has been to solve by the parameter, and I got

3b + 5c = 290


but that wasn't much help. Could you help me get on the right track for solving this problem? Thanks.

EDIT: I now managed to solve for maximum a using following operation: By subtracting the upper equation from the equation system from the lower one, I got:

5a + 2b = 210


Solving this by a returned

a = 42 - 0.4b


The maximum value for a is for b = 0, thus a = 42. With b = 0, the only remaining solution for c was 100-a-b = 100-42-0 = 58.

EDIT 2: I now also managed to solve for maximum b and c, too. For b: Using the same previous equation, 5a + 2b = 210, I now solve it for b, and get

b = 105 - 2.5a


Since the static part of the equation is bigger than 100, I add:

b + a ≤ 100, therefore:

b + a = 105 - 1.5a ≤ 100

-1.5a ≤ -5

a ≥ 3.333333, and since a needs to be a natural number,

a = 4. Thus:

b = 105 - 6 - 4 = 95
a = 4
c = 100 - a - b = 100 - 95 - 4 = 1.

-
You would do better to choose a letter other than "o" for the number of older children - it is confusing as 3o can be misread as 30. Note that if you want as many "y" as possible you need to make up the difference between 100 and 310 as efficiently as possible - ie using "a" rather than "o" as far as possible. If you are working with "o" you nearly have a solution with o=100, so you could work with p=100-o. Also look at the third equation modulo 3 and you will find a constraint on the value of y mod 3. – Mark Bennet Oct 18 '12 at 18:02
Your final equation taken mod 5 gives a constraint on the value of o mod 5. – Mark Bennet Oct 18 '12 at 18:05