N friends go to the local super market together. The probability of their buying something from themarket is p1, p2, p3, . . . , pN respectively. After their marketing is finished you are given the informationthat exactly r of them has bought somethin…