0

I have some equations and I'm trying to find the value of $m_3+m_7+m_{11}+m_{15}$. All the variables are $\ge 0$ as a constraint (how to enter that?)

I can solve by paper/pen and get $34$ so I know this can be solved. However, I'd like to able to solve the same problem type with maxima and I just can't get the syntax right. Neither of these work and I can't figure it out from the documentation/google. The first gives no output and the second an error. I'm new to maxima so this is probably obvious to a better user of maxima. How should I be entering this?

solve([m8 + m9 + m10 + m11 + m12 + m13 + m14 + m15 = 55,
     m0 + m1 + m2 + m3 + m4 + m5 + m6 + m7 = 45,
     m4 + m5 + m6 + m7 = 1,
     m12 + m13 + m14 + m15 = 22,
     m2 + m3 + m6 + m7 = 45,
     m10 + m11 + m14 + m15 = 30,
     m1 + m3 + m5 + m7 = 9,
     m9 + m11 + m13 + m15 = 28,
     m5 + m7 = 0,
     m13 + m15 = 12,
     m3 + m7 = 9,
     m7 + m15 = 10,
     m1 + m9 = 1],m3+m7+m11+m15);

solve([m8 + m9 + m10 + m11 + m12 + m13 + m14 + m15 = 55, m0 + m1 + m2 + m3 + m4 + m5 + m6 + m7 = 45, m4 + m5 + m6 + m7 = 1, m12 + m13 + m14 + m15 = 22, m2 + m3 + m6 + m7 = 45, m10 + m11 + m14 + m15 = 30, m1 + m3 + m5 + m7 = 9, m9 + m11 + m13 + m15 = 28, m5 + m7 = 0, m13 + m15 = 12, m3 + m7 = 9, m7 + m15 = 10, m1 + m9 = 1],[m3,m7,m11,m15]);

user170231
  • 19,334
  • 1
    What happens if you use linsolve in place of solve? (NB: I don't have nor have ever used Maxima, just learned about it here. I would have expected the second input to work.) – user170231 Dec 12 '21 at 19:51
  • linsolve is the same as solve. I'm not attached to maxima, I'm just trying to find a package (ideally free on linux) that can solve these things easily. – topoquestion Dec 12 '21 at 23:34
  • had an idea but didn't work unfortunately. I added another variable. – topoquestion Dec 13 '21 at 00:11
  • (%i2) solve([m8+m9+m10+m11+m12+m13+m14+m15 = 55,m0+m1+m2+m3+m4+m5+m6+m7 = 45, m4+m5+m6+m7 = 1,m12+m13+m14+m15 = 22,m2+m3+m6+m7 = 45, m10+m11+m14+m15 = 30,m1+m3+m5+m7 = 9,m9+m11+m13+m15 = 28, m5+m7 = 0,m13+m15 = 12,m3+m7 = 9,m7+m15 = 10,m1+m9 = 1, s = m3+m7+m11+m15],[s]) (%o2) [] – topoquestion Dec 13 '21 at 00:12

0 Answers0