Selecting item from set given distribution

Posted by JH on Stack Overflow See other posts from Stack Overflow or by JH
Published on 2010-04-23T23:25:48Z Indexed on 2010/04/26 17:33 UTC
Read the original article Hit count: 225

Filed under:
|
|

I have a set of X items such as {blower, mower, stove} and each item has a certain percentage of times it should be selected from the overall set {blower=25%,mower=25%,stove=75%} along with a certain distribution that these items should follow (blower should be selected more at the beginning of selection and stove more at the end). We are given a number of objects to be overall selected (ie 100) and a overall time to do this in (say 100 seconds).

I was thinking of using a roulette wheel algorithm where the weights on the wheel are affected by the current distribution as a function of the elapsed time (and the allowed duration) so that simple functions could be used to determine the weight. Are there any common approaches to problems like this that anyone is aware of?

Currently i have programmed something similar to this in java using functions such as x^2 (with correct normalization for the weights) to ensure that a good distribution occurs. Other suggestions or common practices would be welcome :-)

© Stack Overflow or respective owner

Related posts about algorithms

Related posts about datasets