Mathematica "与","或"的表示哪里错了?"与","或"的表示哪里错了?输入:FindInstance[3 x1 + 5 x2 + 7 x3 == 0 && x1 + x2 + x3 == 1 ||x1 + x2 + x3 == 3 && x1 = 0 && x2 = 0 && x3 = 0 && x1 = 1 &&x2 = 1 && x3 = 1,{x1,x2,x3},Integers]输出:{

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 09:23:27

Mathematica "与","或"的表示哪里错了?"与","或"的表示哪里错了?输入:FindInstance[3 x1 + 5 x2 + 7 x3 == 0 && x1 + x2 + x3 == 1 ||x1 + x2 + x3 == 3 && x1 = 0 && x2 = 0 && x3 = 0 && x1 = 1 &&x2 = 1 && x3 = 1,{x1,x2,x3},Integers]输出:{
Mathematica "与","或"的表示哪里错了?
"与","或"的表示哪里错了?
输入:
FindInstance[3 x1 + 5 x2 + 7 x3 == 0 && x1 + x2 + x3 == 1 ||x1 + x2 + x3 == 3 && x1 = 0 && x2 = 0 && x3 = 0 && x1 = 1 &&x2 = 1 && x3 = 1,{x1,x2,x3},Integers]
输出:
{{x1 -> 2,x2 -> 2,x3 -> -1}}
这明显是一个错误输出,不知错在哪里?

Mathematica "与","或"的表示哪里错了?"与","或"的表示哪里错了?输入:FindInstance[3 x1 + 5 x2 + 7 x3 == 0 && x1 + x2 + x3 == 1 ||x1 + x2 + x3 == 3 && x1 = 0 && x2 = 0 && x3 = 0 && x1 = 1 &&x2 = 1 && x3 = 1,{x1,x2,x3},Integers]输出:{
和的优先级比或高,可能它理解的同你本想表达的有出入,加上括号再试试?