thexside
06-16-2010, 06:56 PM
Guys, I want to maximize my probability of choosing the highest number out of individual rows of 10 randomly generated numbers, using a specific strategy and I can't figure out how to write the code.
Let's say I have the following list of 10 random generated numbers on one row in excel:
5, 1, 3, 7, 2, 6, 4, 9, 8, 10
I want to apply a (x,y) selection strategy by changing parameters x and y and optimizing the best values of x and y.
The selection is illustrated as follows(with different x and y values) and using the random generated list of 10 numbers:
random list:
5, 1, 3, 7, 2, 6, 4, 9, 8, 10
(1,1) strategy:
You let the first number go by and then choose the first one bigger than this. The first one is 5. The first one bigger than this is 7. You choose this one(7).
(2,1) strategy:
You let the first two go by and then choose the first one bigger than the larger of these two. The larger of the
first two is 5. The first one bigger than this is 7. You choose this one.
(1,2) strategy:
You let the first one go by and then choose the one that increases the maximum the second time. The first one
is 5. The first one bigger than this is 7. You do not choose 7; you wait until the maximum has been increased
once more. The first one bigger than 7 is 9. This is the one you choose.
(4,2) strategy:
You let the first four one go by and note the maximum of the four. Then choose the one that increases the
maximum the second time. The maximum of the first four is 7. The first one bigger than this is 9. You do not
choose 9; you wait until the maximum has been increased once more. The first one bigger than 9 is 10. This is
the one you choose.
I want to run a simulation on the strategy, let's say I have 20 rows of "10 random regenerated numbers"; I want to test which strategy is the most optimal at selecting the highest numbers in each row.
Hope is clear, any help would be greatly appreciated (see it as a intelectual challenge;) ):banghead: :thumb
Let's say I have the following list of 10 random generated numbers on one row in excel:
5, 1, 3, 7, 2, 6, 4, 9, 8, 10
I want to apply a (x,y) selection strategy by changing parameters x and y and optimizing the best values of x and y.
The selection is illustrated as follows(with different x and y values) and using the random generated list of 10 numbers:
random list:
5, 1, 3, 7, 2, 6, 4, 9, 8, 10
(1,1) strategy:
You let the first number go by and then choose the first one bigger than this. The first one is 5. The first one bigger than this is 7. You choose this one(7).
(2,1) strategy:
You let the first two go by and then choose the first one bigger than the larger of these two. The larger of the
first two is 5. The first one bigger than this is 7. You choose this one.
(1,2) strategy:
You let the first one go by and then choose the one that increases the maximum the second time. The first one
is 5. The first one bigger than this is 7. You do not choose 7; you wait until the maximum has been increased
once more. The first one bigger than 7 is 9. This is the one you choose.
(4,2) strategy:
You let the first four one go by and note the maximum of the four. Then choose the one that increases the
maximum the second time. The maximum of the first four is 7. The first one bigger than this is 9. You do not
choose 9; you wait until the maximum has been increased once more. The first one bigger than 9 is 10. This is
the one you choose.
I want to run a simulation on the strategy, let's say I have 20 rows of "10 random regenerated numbers"; I want to test which strategy is the most optimal at selecting the highest numbers in each row.
Hope is clear, any help would be greatly appreciated (see it as a intelectual challenge;) ):banghead: :thumb