Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difficult constrained optimization problem

3 views
Skip to first unread message

Yaroslav Bulatov

unread,
Sep 2, 2010, 2:32:20 AM9/2/10
to
I'm optimizing a function subject to some constraints, and both
FindMinimum and NMinimize fail. I suspect the difficulty is caused by
the fact that if first constraint is violated, the second constraint
becomes invalid (it'll be an invalid comparison between Complex and
Real), can anyone suggest a way around it?

n = 18;
regionCons =
1/3 - x/Sqrt[2] - y/Sqrt[6] > 0 && 1/3 + x/Sqrt[2] - y/Sqrt[6] > 0
&&
1/3 + Sqrt[2/3] y > 0;
entropyCons = -(1/3 + Sqrt[2/3] y) Log[
1/3 + Sqrt[2/3] y] - (1/3 - x/Sqrt[2] - y/Sqrt[6]) Log[
1/3 - x/Sqrt[2] - y/Sqrt[6]] - (1/3 + x/Sqrt[2] - y/Sqrt[
6]) Log[1/3 + x/Sqrt[2] - y/Sqrt[6]] > Log[2];
obj = Log[
n!/((n (1/3 - x/Sqrt[2] - y/Sqrt[6]))! (n (1/3 + x/Sqrt[2] - y/
Sqrt[6]))! (n (1/3 + Sqrt[2/3] y))!)];
{x1, x2, y1, y2} = {-.7, .7, -.6, 1};
plot1 = RegionPlot[
regionCons && entropyCons, {x, x1, x2}, {y, y1, y2}];
plot2 = ContourPlot @@ {Boole[regionCons] Log[obj], {x, x1, x2}, {y,
y1, y2}, ContourShading -> None};
Show[plot1, plot2]
FindMinimum[{obj, regionCons && entropyCons}, {x, x1, x2}, {y, y1,
y2}]
NMinimize[{obj,
regionCons && entropyCons}, {{x, x1, x2}, {y, y1, y2}}]

Motivation: this is trying to find the smallest trinomial coefficient
(positive, real valued components) for n=18 whose entropy is larger
than entropy of coefficient 9,9,0

0 new messages