v7 中 GroebnerBasis 的奇怪行为 [英] Weird behaviour with GroebnerBasis in v7

查看:25
本文介绍了v7 中 GroebnerBasis 的奇怪行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 GroebnerBasis 时遇到了一些奇怪的行为.在下面的 m1 中,我使用希腊字母作为变量,而在 m2 中,我使用了拉丁字母.它们都没有与之相关的规则.为什么我会根据我选择的变量得到截然不同的答案?

I came across some weird behaviour when using GroebnerBasis. In m1 below, I used a Greek letter as my variable and in m2, I used a Latin letter. Both of them have no rules associated with them. Why do I get vastly different answers depending on what variable I choose?

Clear["Global`*"]
g = Module[{x}, 
    x /. Solve[
      z - x (1 - b - 
           b x ( (a (3 - 2 a (1 + x)))/(1 - 3 a x + 2 a^2 x^2))) == 0,
       x]][[3]];
m1 = First@GroebnerBasis[\[Kappa] - g, z]
m2 = First@GroebnerBasis[k - g, z]


正如 belisarius 所指出的,我对 GroebnerBasis 的使用并不完全正确,因为它需要多项式输入,而我的则不是.这个错误由​​复制面食引入,直到现在才被注意到,因为当我使用上面的 m1 完成其余代码时,我得到了预期的答案.但是,我并不完全相信这是一种不合理的用法.考虑以下示例:


As pointed out by belisarius, my usage of GroebnerBasis is not entirely correct as it requires a polynomial input, whereas mine is not. This error, introduced by a copy-pasta, went unnoticed until now, as I was getting the answer that I expected when I followed through with the rest of my code using m1 from above. However, I'm not fully convinced that it is an unreasonable usage. Consider the example below:

x = (-b+Sqrt[b^2-4 a c])/2a;
p = First@GroebnerBasis[k - x,{a,b,c}]; (*get relation or cover for Riemann surface*)
q = First@GroebnerBasis[{D[p,k] == 0, p == 0},{a,b,c},k,
    MonomialOrder -> EliminationOrder]; 

Solve[q==0, b] (*get condition on b for double root or branch point*) 

{{b -> -2 Sqrt[a] Sqrt[c]}, {b -> 2 Sqrt[a] Sqrt[c]}}

这是正确的.所以我的解释是,在这种情况下使用 GroebnerBasisOK,但我不太熟悉它背后的深层理论,所以我可能完全错误在这里.

which is correct. So my interpretation is that it is OK to use GroebnerBasis in such cases, but I'm not all too familiar with the deep theory behind it, so I could be completely wrong here.

P.S.我听说如果你在帖子中提到 GroebnerBasis 三次,Daniel Lichtblau 会回答你的问题 :)

P.S. I heard that if you mention GroebnerBasis three times in your post, Daniel Lichtblau will answer your question :)

推荐答案

这些示例中显示的错误将在版本 9 中修复.我不知道如何在版本 8 及更早版本中规避它.如果我没记错的话,它是由检查符号多项式系数是否为零的某些代码中的中间数值溢出引起的.

The bug that was shown by these examples will be fixed in version 9. Offhand I do not know how to evade it in versions 8 and prior. If I recall correctly it was caused by an intermediate numeric overflow in some code that was checking whether a symbolic polynomial coefficient might be zero.

出于某些目的,指定更多变量和可能的非默认术语顺序可能是合适的.此外,至少在有效的情况下,清除分母可能会有所帮助.也就是说,我不知道这些策略是否对这个例子有帮助.

For some purposes it might be suitable to specify more variables and possibly a non-default term order. Also clearing denominators can be helpful at least in cases where that is a valid thing to do. That said, I do not know if these tactics would help in this example.

我会更多地研究这段代码,但可能不会在不久的将来.

I'll look some more at this code but probably not in the near future.

丹尼尔·利希布劳

这篇关于v7 中 GroebnerBasis 的奇怪行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆