bluemmb's blog

By bluemmb, history, 8 years ago, In English

I had been solving Bad Luck Island and I wrote this formula for calculating the probability of meeting for example Rock and Paper :

rsp = r + s + p;
rs = r + s;
rp = r + p;
sp = s + p;

P_rp = (r/rsp) * (p/sp) + (p/rsp) * (r/rs);

I figured out that it is wrong, but I want to know why and What am i calculating here ?!

because when i use this formula for all 3 possible meetings , and sum up them , it equals to 1! and I don't know what is the meaning of this formula !!!

( sorry if it is a stupid question! )

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +8 Vote: I do not like it

I think P_rp = (r*p) / (rsp * (rsp-1))

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    the editorial says that this will not work !

»
8 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

I just gave this problem a try, my solution to calculate the probability of rock and paper meeting is like this:

first we need to calculate the probabilities of forming each different pair (excluding the similar ones)

P(rp) = r*p/(rsp*(rsp-1)) + p*r/(rsp*(rsp-1))

P(rs) = r*s/(rsp*(rsp-1)) + s*r/(rsp*(rsp-1))

P(sp) = s*p/(rsp*(rsp-1)) + p*s/(rsp*(rsp-1))

Now the probability of meeting rock and paper is : P(rp)/(P(rp)+P(rs)+P(sp)) , because of all possible pairs we need to select only the pairs that have different individuals. You can apply the same for the other two.