1. 假设当前考虑第n个数, n>1000,如果n<=1000,直接选上。 从之前的1000个选出来的数里随机选一个出来,以(n-1000)/n的概率和当前数交换。 PS:一个simplified version的问题是:选一个数,要求均匀分布,one pass algo 2. 你的问题是不是 Optimal Strategy for a Game.: Consider a row of n coins of values v(1) ... v(n), where n is even. We play a game against an opponent by alternating turns. In each turn, a player selects either the first or last coin from the row, removes it from the row permanently, and receives the value of the coin. Determine the maximum possible amount of money we can definitely win if we move first. 如果是的话,参考 http://people.csail.mit.edu/bdean/6.046/dp/