Vandermonde matrix |
送交者: InCaseYouLikeIt 2008月11月26日13:15:34 于 [灵机一动] 发送悄悄话 |
回 答: 考你一考 由 绿豆汤 于 2008-11-19 20:57:17 |
It should suffice to compute the determinant of the Vandermonde matrix of the 9 numbers. There is a repeated number if and only if the determinant is 0.
In other words, compute (x_1-x_2)(x_1-x_3)...(x_1-x_9)(x_2-x_3)(x_2-x_4)...(x_2-x_9)(x_3-x_4)...(x_8-x_9). This may not be the easiest way though. (For 9 general numbers, this is the "easiest way", I would say.) |
|
|
|
|
实用资讯 | |