## Search This Blog

### Very Hard Interview Puzzle

Very Hard Interview Puzzle - 28 January

Shahrukh, father of nine sons got 81 goats labeled as 1,2,3,4..... 81. The beauty of the label is such that the buffalo with label-1 gives 1-liter of milk, buffalo with label-2 gives 2-liters of milk..... Buffalo with label 81 gives 81-liters of milk, Shahrukh wants to distribute his 81 goats among all his sons such that each of them gets the same number of goats and the same quantity of milk.

Can you help him?

1. there is only 1 solution to this.. it took me 30 mins to get this one absolutely correct..total quantity of milk is 3321..so each son should get 369 litres of milk from 9 goats.. the unique distribution would happen as below
1st son: 81+80+79+78+1+2+3+4+41=369
2nd son: 77+76+75+74+5+7+6+9+40=369
3rd son : 73+72+71+70+8+10+11+12+42=369
4th son: 69+68+67+66+13+14+15+18+39=369
5th son : 65+64+63+62+16+17+19+20+43=369
6th son: 61+60+59+58+21+22+23+27+38=369
7th son : 57+56+55+54+24+25+26+28+44=369
8th son : 53+52+51+50+29+30+32+35+37=369
9th son : 49+48+47+46+31+33+34+36+45=369

2. There is no only one solution, here is another a little bit more simple:
1st son: 1+18+26+34+42+50+58+66+74=369
2nd son: 2+10+27+35+43+51+59+67+75=369
3rd son: 3+11+19+36+44+52+60+68+76=369
4th son: 4+12+20+28+45+53+61+69+77=369
5th son: 5+13+21+29+37+54+62+70+78=369
6th son: 6+14+22+30+38+46+63+71+79=369
7th son: 7+15+23+31+39+47+55+72+80=369
8th son: 8+16+24+32+40+48+56+64+81=369
9th son: 9+17+25+33+41+49+57+65+73=369