ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 03 Jan 2014 05:19:54 -0600Find linear combinations that meet certain criteriahttp://ask.sagemath.org/question/10881/find-linear-combinations-that-meet-certain-criteria/Hey,
I am quite new to SAGE, this is my first project. I'm not even sure if it is solvable or not, but here is what I want to do:
- w_1 is the smallest multiple of 5 that is >=
(volume / 30)
- w_n = w_1 + 5*n
- w_max is the largest multiple of 5 that is <=
((volume / 24) + 30)
- were n increases until w_n == w_max
I want to find all solutions to:
- (w_1)*(r_1) + (w_2)*(r_2) + ... +
(w_n)*(r_n) == volume
Given each/any r can be any integer from 5 to 10 and that the sum of all r's is less than or equal 30. Volume is just some constant integer multiple of 5 between 5425 and 7200. Its just an initial condition I want to be able to change. Is this possible or is it too many possibilities for SAGE to handle? I have some programing experience (C and .net ) and a little math experience(Calc 1,2 and 3 as well as differential equations) but I don't know were to start really. If there is any more information I can provide that would be useful I would be very happy to do so. I don't expect someone to make it for me, but I'm not quite sure what kind of approach I should be trying use, so I don't really know what to look up. Any help or advice is welcome.
Thanks.Fri, 03 Jan 2014 05:19:54 -0600http://ask.sagemath.org/question/10881/find-linear-combinations-that-meet-certain-criteria/