性能问题:用 Mathematica 中的多个假设求解不等式

发布于 2024-12-20 18:28:51 字数 456 浏览 0 评论 0原文

我需要在给定几个假设(也是不等式)的情况下证明不等式(或找到反例)。不幸的是,要证明的不等式是一个相当长且复杂的表达式。大约有 15 个变量,FullSimplify 的输出可以填满几张 A4 页。对于变量较少的示例,FindInstance 有助于查找反例,或者如果不等式成立则给出 {} 的结果。我还尝试以这种方式使用Reduce:

Reduce[
   Implies[
      assumtion1 && assumtion2,
      inequality
   ],
   Reals
]

对于简单的示例,如果不等式成立,则输出“True”。但就我而言,经过几个小时的运行时间后,Mathematica 需要 5-6 GB RAM(和交换),因此我不得不中止该进程。

我可以使用 Mathematica 做些什么来提高性能吗?

I need to prove an inequality (or find a counter example) given several assumptions (also inequalities). Unfortunately the inequality to prove is a quite long and complicated expression. There are about 15 variables and FullSimplify's output fills several A4 pages. For examples with less variables, FindInstance helps to find a counterexample or gives a result of {} if the inequality is true. I also tried to use Reduce in that way:

Reduce[
   Implies[
      assumtion1 && assumtion2,
      inequality
   ],
   Reals
]

For simple examples this outputs "True", if the inequality holds. But in my case, after several hours of running time Mathematica needed 5-6 GB of RAM (and swap) so I had to abort the process.

Is there anything that I could do with Mathematica to improve the performance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

快乐很简单 2024-12-27 18:28:51

您将在此处找到一篇关于 Mma CAD 算法的非常好的论文a>

Mma 使用的圆柱代数分解 (CAD),在变量数量上以双指数行为进行缩放。

较新的方法在量词交替的数量上是双指数的。

我认为仅使用 Mma 内部引擎将不会有好运,但您可以根据问题的对称性(如果有)自行推出

You will find a very nice paper on Mma CAD algorithms here

The cylindrical algebraic decomposition (CAD), which Mma uses, scales with a double exponential behavior on the number of variables.

Newer methods are double exponential in the number of quantifier alternations.

I think you'll have no luck using only the Mma internal engine, but you may roll your own based in the symmetries of your problem (if any)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文