Hi All!,
Does anyone know a link to a website or know the best way to create a data
structure that will pick random elements from itself with assigned
probabilities?
For example, say I created a bag of 3 marbles(red, green, and blue) and the
red marble had a 50% change of being picked while the green and blue marbles
both had 25% chance of being picked. they should be picked randomly, but
picked in such a way that the red marble will be picked half the time and
the other 2 a quarter of the time. What is the best way to do this
algorithmically ?
Thanks,
David
orion7197@yahoo .com
Does anyone know a link to a website or know the best way to create a data
structure that will pick random elements from itself with assigned
probabilities?
For example, say I created a bag of 3 marbles(red, green, and blue) and the
red marble had a 50% change of being picked while the green and blue marbles
both had 25% chance of being picked. they should be picked randomly, but
picked in such a way that the red marble will be picked half the time and
the other 2 a quarter of the time. What is the best way to do this
algorithmically ?
Thanks,
David
orion7197@yahoo .com
Comment