## Solution

Okay, let us suppose Anil had 'C' number of cats and 'D' number of dogs initially. The total number of cats and dogs is 55, therefore C + D = 55.

Exactly one-fifth of the cats and one-fourth of the dogs were adopted. Therefore the number of cats adopted is C/5 and the number of dogs adopted is D/4. The total number of cats and dogs adopted is C/5 + D/4 = (4C + 5D)/20.

It is given that exactly one-fifth of the cats were adopted. Hence the total number of cats has to be 5 or multiples of 5, and not exceeding 55 (you cannot have a fraction of a cat!).

Therefore, the number of cats can be 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 or 55.

Therefore, if we consider there were 5 cats then the number of dogs is 50 (because C + D = 55). So, the (cat, dog) numbers can be (5, 50), (10, 45), (15, 40), (20, 35), (25, 30), (30, 25), (35, 20), (40, 15), (45, 10) or (50,5).

Similarly, exactly one-fourth of the dogs were adopted. Therefore the total number of dogs has to be 4 or multiples of 4, and not exceeding 55. Therefore, the number of dogs could be 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48 or 52.

Only the (cat, dog) pairs of (15, 40) and (35, 20) satisfy this condition. But we have also been told that the number of dogs was more than the number of cats. Thus, only (cat, dog) pair of (15, 40) satisfies this condition.

There were, thus, 15 cats initially and one-fifth, or 3, of them were adopted. There were 40 dogs initially and one-fourth, or 10, of them were adopted.