Difficult constrained optimization problem
- To: mathgroup at smc.vnet.net
- Subject: [mg112155] Difficult constrained optimization problem
- From: Yaroslav Bulatov <yaroslavvb at gmail.com>
- Date: Thu, 2 Sep 2010 02:32:26 -0400 (EDT)
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