The Smiths, the Andrings and the Cliffords all hold a big party. Everyone shakes hands with every member of the other two families (no one shakes hands with members of their own family), 142 handshakes in all.

Assuming that there at least as many Andrings as Smiths, and at least as many Cliffords as Andrings, how many of each family are present?

(In reply to

Answer by K Sengupta)

Let the respective number of members of the Cliffords family, Andrings family and the Smith family who were present a the meeting be x, y and z.

By the problem:

xy+yz+zx = 142, and x>=y>=z>=1.

Hence, we must have:

142 = xy+yz+zx >= (z^2 + z^2 + z^2) = 3*z^2

-> z^2 < 48, so that: z<= 6

Now, xy+yz+zx = 142, so that:

xy+yz+zx+z^2 = 142+z^2

-> (x+z)(y+z) = 142+z^2 ----(i)

Accordingly, for z>=2, it follows that each of x=z and y+z must be at least 4.

Now, for z=3,5 we note that the rhs of (i) is a prime number. This is a contradiction.

Substituting z=2,4,6 in turn, we observe that for none of these cases, both of x+z and y+z exceeds 4. This is a contradiction.

For z=1, we have:

(x+1)(y+1) = 143, since x>=y>=1, it follows that: (x+1) >= (y+1)>=2

This is possible only when:

(x+1, y+1) = (13,11), giving: (x,y) = (12,10)

Consequently, precisely 10 members, 12 members and 1 member respectively belonging to the Andrings family, the Clifford family and the Smith family were present at the party.