From: Walter Roberson on 28 May 2010 18:09 Bruno Luong wrote: > Luis Felipe <luispipe16(a)gmail.com> wrote in message > <8445cd34-c732-4010-aa1c-5a20d6b4b5cf(a)f14g2000vbn.googlegroups.com>... >> Have you ever seen this optimization problem ? >> n >> max prod (p_i)^a_i >> i=1 >> >> n >> subject to sum p_i = 1 >> i=1 >> >> where a_i is a positive constant for i=1,...,n > Not sure, but this is trivial to solve > Maximizing prod(p.*a) is equivalent to maximizing f(p) := sum(a*log(p)) > The gradient of f is a./p. I'm not certain, Bruno, whether your solution is intended to work when the a_i are potentially different from each other?
From: Bruno Luong on 28 May 2010 18:25 > > I'm not certain, Bruno, whether your solution is intended to work when the a_i > are potentially different from each other? I believe as long as a a >= 0, it works, otherwise the solution does not exist. But I let those detail for OP to play with. Bruno
From: Matt J on 28 May 2010 18:29 Walter Roberson <roberson(a)hushmail.com> wrote in message <htpf09$ec7$1(a)canopus.cc.umanitoba.ca>... > I'm not certain, Bruno, whether your solution is intended to work when the a_i > are potentially different from each other? Seems fine to me, provided that we also have the constraint p>=0, which the OP never verified. What doesn't look right to you?
From: Walter Roberson on 28 May 2010 19:23 Matt J wrote: > Walter Roberson <roberson(a)hushmail.com> wrote in message > <htpf09$ec7$1(a)canopus.cc.umanitoba.ca>... > >> I'm not certain, Bruno, whether your solution is intended to work when >> the a_i are potentially different from each other? > > Seems fine to me, provided that we also have the constraint p>=0, which > the OP never verified. What doesn't look right to you? The statement that the gradient was a./p -- I'm not sure that is right when the a(:) are different. Gradient is slope, which would be length(a)-1 values in between the other values, and the slope between positions K and K+1 would seem to more naturally depend upon a(K) and a(K+1)
From: Roger Stafford on 28 May 2010 19:55 Walter Roberson <roberson(a)hushmail.com> wrote in message <htpjbp$ko0$1(a)canopus.cc.umanitoba.ca>... > The statement that the gradient was a./p -- I'm not sure that is right when > the a(:) are different. Gradient is slope, which would be length(a)-1 values > in between the other values, and the slope between positions K and K+1 would > seem to more naturally depend upon a(K) and a(K+1) Bruno's solution is correct, Walter. It is a standard problem in Lagrange undetermined multiplier. At the maximum you have to satisfy two simultaneous differential conditions: a1/p1*dp1 + a2/p2*dp2 + .... + an/pn*dpn = 0 dp1 + dp2 + dp3 + .... + dpn = 0 which forces a1/p1, a2/p2, etc to all be equal. The solution then falls out easily. Roger Stafford
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: regression through a fixed point Next: regression through a fixed point |