引用返#88 素晴巴嘅方向試答
minimize sum(x1, x2, ... , xn)
where n is the number of axes of the solution space, all axes are orthogonal
x1, x2, ... , xn are the size of each axes, all are integers and product(x1, x2, ... , xn) must be 1000
When n = 1, solution is x1 = 1000
When n = 2, solution is x1 = 40, x2 = 25, sum = 65
When n = 3, solution is x1 = x2 = x3 = 10, sum = 30
When n = 4, solution is x1 = x2 = x3 = 5, x4 = 8, sum = 5 × 3 + 8 = 23
When n = 5, solution is x1 = x2 = x3 = 5, x4 = 4, x5 = 2, sum = 5 × 3 + 4 + 2 = 21
When n = 6, solution is x1 = x2 = x3 = 5, x4 = x5 = x6 = 2, sum = 5 × 3 + 2 × 3 = 21
No solution for n >= 7
所以估計最少要21隻老鼠
Linear algebra, optimization 同 topology 都學得麻麻,有錯莫怪