The total number of balls Raul puts into green bags is 14.
<h3>Further explanation</h3>
To tackle this problem, first we need to define our unknowns:
- The first unknown will be the number of balls Raul puts into each bag, we can call this <em>b</em>. It is to be noted that Raul puts the same number of balls into each bag, whether it's red or green<em>.</em>
- The second and third unknown will be the number of red bags and green bags, we can call them <em>R</em> and <em>G</em>, respectively.
From the problem statement we can obtain 2 conditions:
- The total number of balls is 56. We can write this as
. - The total number of balls in the red bags is 3 times as much as the total number of balls on the green bags. Since Raul puts the same number of balls into any bag, this means that there are 3 times as many red bags as green bags. We can write this as
.
In order to solve for the total number of balls in the green bags, we can substitute the second condition into the first one. By doing so we obtain:

Simplifying we get that
, which is the total number of balls on green bags.
It is to be noted that on this problem, it's impossible to find how many balls are in each bag, and how many bags are there. Let's show why:
We got that the total number of balls on green bags is 14, and we also know that <em>b</em> and <em>R</em> are both integer numbers (they have to be integers, we can't put 2 balls and a half on each bag, and we can't have 3.5 green bags). This condition implies that either
and
, or
and
(both solutions satisfy our problem). Ususally these kind of problems are known as <em>Integer programming problems.</em>
<h3>Learn more</h3>
<h3>Keywords</h3>
System of equations, integer programming