Solution:
$6 for red sponges = 1 sponges
$87 for yellow sponges = 29 sponges
$7 for blue sponges = 70 sponges
Explanation:
a = red sponges
b = yellow sponges
c = blue sponges
Now using a simple expression:
A + b + c = 100
6a + 3b + 0.1c = 100
Now if we multiply the first equation by 6 and then 3 and then subtracting the two equations, we will be able to get two more equations:
6a + 6b + 6c = 600
3a + 3b + 3c = 300
3b = 500 - 5.9c
3a = 2.9c - 200
Now if you are wondering how will we solve three variables using just two equations, we have to tell you that a and b are non-negative integers. Thus, if 3b >/= 0, then 500 - 5.9c >/= 0.
Using this, c
Also, if 3a >/= 0, then 2.9c - 200 > 0. This implies that c >/= 68.97.
But buying the blue sponges is the only way to spend in fraction thus the number of blue sponges that we buy must cost an even dollar amount. Now if you consider the expressions, there can be only two numbers we can buy between 68.97 and 84.75 that satisfies the given condition i.e. 70 and 80.
Let's say that we replace c by 80 in the last two expressions that we have formed above, a will equal to 10.67 and b will equal to 9.33. However, the values of a and b must be an integer and not fraction. Therefore, c can't be 80.
Let us now replace c with 70. After solving the expressions, we will obtain a as 1 and b as 29.
Thus here are the amounts that must be used to buy:
$6 for red sponges = 1 sponges
$87 for yellow sponges = 29 sponges
$7 for blue sponges = 70 sponges