Let x = number of old person
y= number of young person
z = number of children
Number of person = 100
So x + y + z = 100 ..................................................eqn(1)
Each old person get 3 kg , young get 2kg and child get 0.5 kg of rice
Total amount of rice distributed among people = 100 kg
i.e. 3x + 2y + 0.5z = 100 kg
multiply both sides by 2
or 6x + 4y + z = 200.....................................eqn (2)
Also x, y, z are number of person they will take only positive integer value.
Now number of unknown is three and we have only two equation, so we need to assume value of one variable and solve for other two to see if they are integer (as person can't be fractional). Solving x and y in terms of z as follow
From equation (1) and (2)
x+y = 100-z ......................eqn (3)
6x+4y =200 -z ...............eqn (4)
Doing eqn4 - 4* eqn (3)
(6x+4y)-4(x+y)=200-z - 4(100-z)
6x+4y-4x-4y = 200 -z -400+4z
2x = 3z -200
x = 1.5z - 100
substituting value in eqn3
y = 100 - z - x = 100 - z - 1.5z +100 = 200 -2.5z
So general solution
x = 1.5z - 100
y= 200 - 2.5z
z = z
also old, young or child count will be either zero or positive integer.
"x\\ge 0" and "y\\ge 0" and "z\\ge 0"
"1.5z-100\\ge 0" and "200-2.5z\\ge 0" and "z\\ge 0"
"z\\ge 200\/3\\approx 66.7" , and "z\\le 80" and "z\\ge 0"
common region
"200\/3 \\le z\\le 80"
additionally in general solution ( x= 1.5z - 100 , y = 200 -2.5z) , if z is an odd integer then x and y will be fractional. So z must be an even integer between"[200\/3 , 80]"
So solution will be
Number of old = 1.5z- 100
Number of young = 200-2.5z
Number of child = z , where z is an even number between 68 and 80 inclusive.
Verifying
let z = 70
number of child = 70
Number of old = 1.5 * 70 - 100 = 105 - 100 = 5
Number of young = 200 - 2.5 * 70 = 200 - 175 = 25
Total person = 70 + 5 + 25 = 100
Let z = 80
Number of child = 80
Number of old = 1.5*80 -100 = 120 - 100 =20
Number of young = 200 - 2.5 * 80 = 200 - 200 = 0
Total = 80+ 20+ 0 = 100
So it has multiple solutions.
Comments
Leave a comment