Let x,y and z be the number of coins respectively in each category Re.1, Rs.2 and Rs.5. From the given information
x+y+z=30 ......(1)
x+2y+5z=100 ......(2)
Here we have 3 unknowns but 2 equations. We assign arbitrary value k to z and solve for x and y
(1) and (2) become
x+y=30−k;x+2y=100−5k k∈R
Δ=∣∣∣1112∣∣∣=1
Δx=∣∣∣30−k1100−5k2∣∣∣=3k−40
Δy=∣∣∣130−k1100−5k∣∣∣=70−4k
By Cramer's Rule, we have
x=ΔxΔ=3k−40
y=ΔyΔ=70−4k
The solution is (x,y,z)=(3k−40,70−4k,k) k∈R
Since the number of coins is a non-negative integer k=0,1,2,....
Moreover 3k−40≥0 and
70−4k≥0 ⇒ 14≤k≤17
∴ The possible solutions are
(2,14,14),(5,10,15),(8,6,16) and (11,2,17)