Tanmoy1228's blog

By Tanmoy1228, history, 9 years ago, In English

Problem: 453A - Little Pony and Expected Maximum

can not understand the solution in editorial

can anyone give me any idea of solution in deails???

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Expected values are calculated as follows E[X] = sum(x*p(x)) where X is a random variable and 'x' are all possible outcomes

Lets define a random variable X to be the maximum of n tosses of m-sided dice. 'x' are all possible maximums that can happen (1,2,3,..,m) and p(x) is the probability that x is the maximum.

Tricky thing here is to calculate p(x) for each x. You have to use the formula for combinations with repetition: If you toss the m-sided dice n times, there are m^n possible outcomes.

For a maximum 'x' you can use formula p(x) = (x^n — (x-1)^n) / m^n

Let me elaborate this. We count all the outcomes where you never toss a dice higher than x (there are x^n of them). That means that for these outcomes the maximum will be <=x. From that we have to subtract the outcomes where you toss only numbers less than x (there are (x-1)^n of them). Now you have the number of outcomes where maximum is x. You divide that by m^n (number of total outcomes that can happen) and you have yourself the probability that after n tosses, you will get maximum x.