0
$\begingroup$

I think it's easiest to explain with an example.

I have a weighted probability list

A : 0.15
B : 0.15
C : 0.15
D : 0.1
E : 0.1
F : 0.1
G : 0.1
H : 0.075
I : 0.075

I am going to extract letters from this list one at a time based on this weighted probability $4$ times. However after I extracted a letter I cannot extract it again, so all values must be unique.

If I were to extract the letter $E$ then I couldn't do it again, removing it from the list. How can I recalculate the weights?

My attempt on solving this was to just brute force the problem and have a script do this a lot of times. And I would bypass the recalculating weights by just rechecking if the letter I picked was already picked, and if it was then reroll until a unique letter is selected.

However this brute force method isn't quite good enough for my purposes of calculating the estimated number of times to get any specific possibility of letters. For example the exact odds of getting $A G D B$ (in any order). Do I even need to recalculate the weights? Is there any better way of doing this?

$\endgroup$
2
  • $\begingroup$ the "bypass" approach is valid, but could be very slow; renormalising the remaining weights is quicker. $\endgroup$ Commented Apr 28, 2022 at 10:10
  • $\begingroup$ @CarloBeenakker thank you so much, I knew I just missed some wording. Renormalizing is exactly what I was looking for. $\endgroup$ Commented Apr 28, 2022 at 10:38

0

You must log in to answer this question.