N friends go to the local super market together. The probability of their buying something from themarket is p 1 ,p 2 ,p 3 ,...,p N respectively. After their marketing is finished you are given the informationthat exactly r of them has bought somethi…