江苏常州武进区建设局网站,安阳网红街,网站建设注意要求,重庆网站建设建站收费我在寻找一种用Python求解线性方程组的方法。特别是#xff0c;我在寻找大于所有零的最小整数向量#xff0c;并解出给定的方程。例如#xff0c;我有以下等式#xff1a;想解决。在在这种情况下#xff0c;求解该方程的最小整数向量为。在但是#xff0c;如何自动确定此…我在寻找一种用Python求解线性方程组的方法。特别是我在寻找大于所有零的最小整数向量并解出给定的方程。例如我有以下等式想解决。在在这种情况下求解该方程的最小整数向量为。在但是如何自动确定此解决方案如果我使用scipy.optimize.nnls比如A np.array([[1,-1,0],[0,2,-1],[2,0,-1]])b np.array([0,0,0])nnls(A,b)结果是(array([ 0., 0., 0.]), 0.0)。这也是正确的但不是理想的解决方案。。。在编辑我很抱歉在某些方面不够精确。如果有人对细节感兴趣问题就出在报纸上“数字信号处理同步数据流程序的静态调度”Edward A.Lee和David G.MesserschmittIEEE计算机学报C-36卷第1期第24-35页1987年1月。在定理2说For a connected SDF graph with s nodes and topology matrix A and with rank(A)s-2, we can find a positive integer vector b ! 0 such that Ab 0 where 0 is the zero vector.在定理2的证明之后他们说It may be desirable to solve for the smallest positive integer vector in the nullspace. To do this, reduce each rational entry in u so that its numerator and denominator are relatively prime. Euclids algorithm will work for this.