<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Optimization problem</title>
    <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 05:15:59 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 05:15:59 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Optimization problem</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Optimization problem</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem</link>
    </image>
    <item>
      <title>Solution</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#answer142014</link>
      <itunes:summary>&lt;p&gt;Your problem is easily solved by exhaustive search. Denoted by &amp;nbsp;&lt;strong&gt;a, b, c, d, e, f, g, h&lt;/strong&gt; &amp;nbsp;vertices of the cube:&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142014/451071/cuboid.jpg"&gt;&lt;img src="/view.aspx?sf=142014/451071/cuboid.jpg" alt=""&gt;&lt;/a&gt;Code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L:=combinat[permute]({seq(i^2, i=1..8)}):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;n:=infinity: S:={}:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;for i in L do&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a, b, c, d, e, f, g, h := i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;m := a*b+b*c+c*d+a*d+a*e+b*f+c*g+d*h+e*f+f*g+g*h+e*h: S:=S union {m}:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;if m&amp;lt;n then n:=m: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;M:=[m, ["a"=a, "b"=b,"c"= c, "d"=d, "e"=e, "f"=f, "g"=g, "h"=h]]: &amp;nbsp;fi: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;od:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;S:&amp;nbsp; # The set of all possible values of this sum&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nops(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;max(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;min(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;M;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;622&lt;/p&gt;
&lt;p&gt;9420&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3586&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[3586, [&lt;strong&gt;"a" = 1, "b" = 36, "c" = 9, "d" = 64, "e" = 49, "f" = 16, "g" = 25, "h" = 4&lt;/strong&gt;]]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Your problem is easily solved by exhaustive search. Denoted by &amp;nbsp;&lt;strong&gt;a, b, c, d, e, f, g, h&lt;/strong&gt; &amp;nbsp;vertices of the cube:&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142014/451071/cuboid.jpg"&gt;&lt;img src="/view.aspx?sf=142014/451071/cuboid.jpg" alt=""&gt;&lt;/a&gt;Code:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;L:=combinat[permute]({seq(i^2, i=1..8)}):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;n:=infinity: S:={}:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;for i in L do&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a, b, c, d, e, f, g, h := i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;m := a*b+b*c+c*d+a*d+a*e+b*f+c*g+d*h+e*f+f*g+g*h+e*h: S:=S union {m}:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;if m&amp;lt;n then n:=m: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;M:=[m, ["a"=a, "b"=b,"c"= c, "d"=d, "e"=e, "f"=f, "g"=g, "h"=h]]: &amp;nbsp;fi: &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;od:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;S:&amp;nbsp; # The set of all possible values of this sum&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nops(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;max(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;min(S); &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;M;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;622&lt;/p&gt;
&lt;p&gt;9420&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3586&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[3586, [&lt;strong&gt;"a" = 1, "b" = 36, "c" = 9, "d" = 64, "e" = 49, "f" = 16, "g" = 25, "h" = 4&lt;/strong&gt;]]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;br&gt;&lt;/strong&gt;&lt;/p&gt;</description>
      <guid>142014</guid>
      <pubDate>Thu, 03 Jan 2013 22:01:17 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>Solution with DirectSearch package</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#answer142031</link>
      <itunes:summary>&lt;p&gt;On the solution of discrete optimization problems, see &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=DirectSearch[Search]' target='_new'&gt;?DirectSearch[Search]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Solution of the problem:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://s57.radikal.ru/i156/1301/78/2902a73560b0.jpg" alt="" width="640" height="151"&gt;&lt;/p&gt;
&lt;p&gt;The example shows that the solution of such problems with DirectSearch package&amp;nbsp;is not effectively.&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142031/451103/integer.mw"&gt;integer.mw&lt;/a&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;On the solution of discrete optimization problems, see &lt;a href='http://www.maplesoft.com/support/help/search.aspx?term=DirectSearch[Search]' target='_new'&gt;?DirectSearch[Search]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Solution of the problem:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://s57.radikal.ru/i156/1301/78/2902a73560b0.jpg" alt="" width="640" height="151"&gt;&lt;/p&gt;
&lt;p&gt;The example shows that the solution of such problems with DirectSearch package&amp;nbsp;is not effectively.&lt;/p&gt;
&lt;p&gt;&lt;a href="/view.aspx?sf=142031/451103/integer.mw"&gt;integer.mw&lt;/a&gt;&lt;/p&gt;</description>
      <guid>142031</guid>
      <pubDate>Fri, 04 Jan 2013 18:08:44 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>Vote up</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#comment142015</link>
      <itunes:summary>&lt;p&gt;It is sure unexpected. I tried to formulate and to solve an integer programming problem.&lt;/p&gt;
&lt;p&gt;PS. I have strong doubts that the four-dimensional version of that problem can be solved&lt;br&gt;by item-by-item examination: 16! = 20922789888000.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It is sure unexpected. I tried to formulate and to solve an integer programming problem.&lt;/p&gt;
&lt;p&gt;PS. I have strong doubts that the four-dimensional version of that problem can be solved&lt;br&gt;by item-by-item examination: 16! = 20922789888000.&lt;/p&gt;</description>
      <guid>142015</guid>
      <pubDate>Thu, 03 Jan 2013 22:08:44 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>Re</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#comment142016</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/142004-Optimization-Problem#comment142015"&gt;@Markiyan Hirnyk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you know of another way to solve this problem (for example, as integer programming problem), please show your code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/142004-Optimization-Problem#comment142015"&gt;@Markiyan Hirnyk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you know of another way to solve this problem (for example, as integer programming problem), please show your code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>142016</guid>
      <pubDate>Thu, 03 Jan 2013 22:55:03 Z</pubDate>
      <itunes:author>Kitonum</itunes:author>
      <author>Kitonum</author>
    </item>
    <item>
      <title>Integer programming problem</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#comment142017</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/142004-Optimization-Problem#comment142016"&gt;@Kitonum&lt;/a&gt; I am working with&lt;/p&gt;
&lt;p&gt;minimize f = x[1]*x[2]+x[1]*x[5]+x[1]*x[4]+x[3]*x[2]+x[3]*x[4]+x[3]*x[7]+x[8]*x[5]+x[8]*x[7]+&lt;br&gt;x[8]*x[4]+x[6]*x[5]+x[6]*x[7]+x[6]*x[2]&lt;/p&gt;
&lt;p&gt;under the constraints&lt;/p&gt;
&lt;p&gt;{seq(product(j^2-x[k], j = 1 .. 8) = 0, k = 1 .. 8), &lt;br&gt;sum(x[j], j = 1 .. 8) = add(j^2, j = 1 .. 8)}&lt;/p&gt;
&lt;p&gt;assuming posint.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/142004-Optimization-Problem#comment142016"&gt;@Kitonum&lt;/a&gt; I am working with&lt;/p&gt;
&lt;p&gt;minimize f = x[1]*x[2]+x[1]*x[5]+x[1]*x[4]+x[3]*x[2]+x[3]*x[4]+x[3]*x[7]+x[8]*x[5]+x[8]*x[7]+&lt;br&gt;x[8]*x[4]+x[6]*x[5]+x[6]*x[7]+x[6]*x[2]&lt;/p&gt;
&lt;p&gt;under the constraints&lt;/p&gt;
&lt;p&gt;{seq(product(j^2-x[k], j = 1 .. 8) = 0, k = 1 .. 8), &lt;br&gt;sum(x[j], j = 1 .. 8) = add(j^2, j = 1 .. 8)}&lt;/p&gt;
&lt;p&gt;assuming posint.&lt;/p&gt;</description>
      <guid>142017</guid>
      <pubDate>Thu, 03 Jan 2013 23:26:38 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
    <item>
      <title>My attempt</title>
      <link>http://www.mapleprimes.com/questions/142004-Optimization-Problem?ref=Feed:MaplePrimes:Optimization problem:Comments#comment142018</link>
      <itunes:summary>&lt;p&gt;&amp;gt;DirectSearch:-GlobalOptima(x[1]*x[2]+x[1]*x[5]+x[1]*x[4]+x[3]*x[2]+x[3]*x[4]+x[3]*x[7]+x[8]*x[5]+x[8]*x[7]+x[8]*x[4]+x[6]*x[5]+x[6]*x[7]+x[6]*x[2], {seq(product(j^2-x[k], j = 1 .. 8) = 0, k = 1 .. 8), sum(x[j], j = 1 .. 8) = add(j^2, j = 1 .. 8)}, assume = posint);&lt;br&gt;&lt;br&gt;&amp;nbsp; [HFloat(7173.0), [x[1] = 25, x[2] = 4, x[3] = 9, x[4] = 64, &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x[5] = 4, x[6] = 36, x[7] = 25, x[8] = 36], 2090]&lt;/p&gt;
&lt;p&gt;If Sergey Moiseev finds time to look at that problem, it would be very kind of him.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&amp;gt;DirectSearch:-GlobalOptima(x[1]*x[2]+x[1]*x[5]+x[1]*x[4]+x[3]*x[2]+x[3]*x[4]+x[3]*x[7]+x[8]*x[5]+x[8]*x[7]+x[8]*x[4]+x[6]*x[5]+x[6]*x[7]+x[6]*x[2], {seq(product(j^2-x[k], j = 1 .. 8) = 0, k = 1 .. 8), sum(x[j], j = 1 .. 8) = add(j^2, j = 1 .. 8)}, assume = posint);&lt;br&gt;&lt;br&gt;&amp;nbsp; [HFloat(7173.0), [x[1] = 25, x[2] = 4, x[3] = 9, x[4] = 64, &lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x[5] = 4, x[6] = 36, x[7] = 25, x[8] = 36], 2090]&lt;/p&gt;
&lt;p&gt;If Sergey Moiseev finds time to look at that problem, it would be very kind of him.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;</description>
      <guid>142018</guid>
      <pubDate>Thu, 03 Jan 2013 23:41:11 Z</pubDate>
      <itunes:author>Markiyan Hirnyk</itunes:author>
      <author>Markiyan Hirnyk</author>
    </item>
  </channel>
</rss>