For the original question:
Let a, b, c be the number of Adults, Pensioners and Children. Our solution must satisfy both of the following equations:
a + b + c = 100 (1)
3.5a + b + 0.85c = 100 (2)
Next, we observe that the target value of 100 is an integer. Therefore, 3.5a + 0.85c must also be an integer. Now, 3.5a will either be an integer value (where a is an even number) or will end in .5 (where a is odd). We must therefore look for a case where 0.85c either leaves us with a whole number or a remainder of 0.5. We can immediately rule out the option of 0.85c being a whole number due to the fact that the minimum value of c would be 100, which would not satisfy equation (2) as it would mean that the values of both a and b would have to be zero. Instead, looking for cases where 0.85c has a remainder of 0.5, we get c to be a multiple of 10. As we now know 0.85c ends in .5, this means 3.5a must also end in .5, so a must be odd.
So, we now know that a is an odd number and c is a multiple of 10. It can also be deduced that:
3.5a + 0.85c = a + c (3)
...due to the fact that as the price for pensioners is equal to the number of pensioners, the amount of money spent by both adults and children must equal the number of adults and children. Also, due to the fact that only integer values of a, b, and c are possible, it can be deduced that the value of 0.85c must be a multiple of 2.5 and the value of 3.5a must be a multiple of 0.15, through rearranging equation (3) to 2.5a + 0.85c = c and 3.5a = a + 0.15c.
To summarise what we have deduced so far:
- a is an odd number
- 3.5a is divisible by 0.15
- c is a multiple of 10
- 0.85c is divisible by 2.5
By checking values of c under these conditions, it can quickly be seen that the only possible value c can take is 50. Substituting c = 50 into equation (3) allows us to solve to find the value of a to be 3. Substituting both a = 3 and c = 50 into equation (1) finally allows us to solve to find b, giving a value of 47. Therefore, we have our solution:
3 adults,
47 pensioners,
50 children.