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.) |
|
|
|
|
實用資訊 | |