Hi, Sage fans. Probably a simple Sage routine does the job, but I tried hard to find it but yet without successÂ…
My problem. Consider two rows (in QQ):
aa=[0,-1,1/5,-1/19,1/15,-35/57,7/5]
bb=[1,0,-6/5,20/19,-7/5,56/19,-12/5]
How to find (x,y) such that [(xaa[i]+ybb[i]) for i in xrange(7)] yields the row [3, -3, -3, 3, -4, 7, -3] with the smallest set integers?
For the above example (x,y)=(3,3) does the job, but is there a general routine to find the optimal (x,y)?
Many thanks in advance for your suggestions! Roland