How to solve this system of equation in sage?
How to solve this system of equations in sage?
x1+l1x2+l21x3+⋯+lk−11xk=c1+r.
x1+l2x2+l22x3+⋯+lk−12xk=c2+r2
…
x1+lkx2+l2kx3+⋯+lk−1kxk=ck+rk
where li's are different positive integers and ci,r are integers in [0,256]
In particular, we can solve with sage. Here is the code :
a0, a1,a2,b3,b4, b5,r,l1,l2,l3 = var('a0,a1,a2,b3,b4,b5, r,l1,l2,l3')
X=solve([a0+l1*a1+l1^2*a2==b3+r^3, a0+l2*a1+l2^2*a2==b4+r^2,a0+l3*a1+l3^2*a2==b5+r^1], a0,a1, a2)
k
is supposed to be fixed ?Yes k is fixed.