For example, I have an equation like this:
11x+31y=1410
Now this one was simple enough for me to do in my head, and I got x=100, y=10. But I have some others that aren't so easy to do off the top of my head, like:
11x+31y=1277
I'm not one hundred percent certain that these will yield round numbers but I suspect they will and am looking for software that will show me potential solutions.
Now, if there is no such software available for free but there is a math professor or even grad student reading this who can do these kinds of calculations, I'd be happy to give you the calculations that need to be done and give you co-author credit on an article I plan to write once I finish these calculations.
(1) $$11x+31y=1410$$
Rewrite the equation so that the unknown with the smaller coefficient is on the left:
(2) $$x = \frac{1410 - 31y}{11}$$
For $$x$$ to be integral,
(3) $$\left( 1410 - 31y \right) % 11 = 0$$
which means that $$1410 - 31y$$ is evenly divisible by 11. To find all values of $$y$$ which satisfy (3), we only need to try y = 0, 1, 2, ... up to a maximum of $$\frac{1410}{31} = 45$$. Note that choosing the unknown with the smaller coefficient in (1) results in fewer iterations in the algorithm.
For each value of $$y$$ that satisfies (3), compute the corresponding value of $$x$$ by plugging $$y$$ into equation (2).
This algorithm can easily be translated into a few lines of code.
Now, I just have to come up with a theory as to which answer to choose as the possible one. I have a feeling those that can be divided by 20 or 27 or that are multiples of 10 are most likely. That seems to be the case for those that are clear cut and those that have only a few possibilities only seem to frequently have multiples of ten as one of the choices so it is likely in most cases they were bringing in the commodities in groups of 10, 100, 1000 etc.
Your first example, 11x + 31y = 1410 gave us four pairs: (100,10), (69,21), (38,32), and (7,43). Under either (a) or (b) we get a single answer, (100,10).
In your second example, 11x + 31y = 1277, we got four pairs: (102,5), (71,16), (40,27), and (9,38). Under (a) we get no answer, while under (b) we get one answer: (40,27).
I can tweak the algorithm however you like. To make it easier for you to test the changes, I have uploaded the php file to my Web site:
If one of the a coefficients is 11, highlight the value of the corresponding variable if it is divisible by 20
If one of the coefficients is 31, highlight the value of the corresponding variable if it is divisible by 27.
Example 1:
11x + 31y = 1277
x = 102 y = 5
x = 71 y = 16
x = 40 y = 27
x = 9 y = 38
11x + 31y = 1410
x = 100 y = 10
x = 69 y = 21
x = 38 y = 32
x = 7 y = 43
Let me know if 11 and 31 are the only possible values and I'll implement these rules. Otherwise, let me know the general rule.
I use a nice piece of software that is free for instructors. It emulates a graphing calculator and has a great "evaluate" tool which allows me to go very fast over the integers for x-values, and display the y values. For example the answer to your integer answer to your second equation (11x+31y=1277) is x=40, y=27.
This is an on-line graphing tool and calculator which does also matrix algebra and regressions. The graphing part has parametrics and polars, and the most wonderful thing is that it doesn't do the Algebra for the students! So I use it in all my online and Hybrid Math classes and do not accept TI hand held calculators any more.
If you send me the equations you need I can do them in no time. You may also want to ask the author of the code directly if he could send you the tool (it is free for the instructors, and if you want to use it for your online Math classes so the students can use it for the length of the course, there is a nominal fee - something like $20 for the semester and that includes all of the student users of absolutely all of your Math classes). The program is being renamed and updated now (new name is "MathStuCalc"). It is absolutely great for the students to save the graphs and plots that they create as JPG's with a click. Then they attach the image to any e-mail or submission to me...
The author is Greg Mushial (a PhD in Math and software developer) and his e-mail is gmushial@gmdr.com.
Have fun!
Cristina
What I am dealing with is totals of commodities used in two ancient Egyptian festivals. They aren't separately listed but the fact that one festival was celebrated for 11 years and lasted 20 days each time, and the other was celebrated 31 years and lasted 27 days makes it possible to do these algebraic equations on the totals and come up with possible divisions-in some cases it is quite clear that the commodities were used in only one of the festivals because they are divisible by 11 or 31 (or in some cases 27 so they seem to have been used only in certain years but every day) but there are some cases like this example where the totals obviously refer to both festivals and in this case, a large tray of bread-2 were used each day in one festival and 1 each day in the other festival. By performing these calculations I hope to be able to produce two separate lists of what was used in each particular festival.
Sure, you can quickly search over all the positive answers in one unit steps.
For example for the equation 11x+31y=1277
I get : (9,38), (40,27), (71,16) and (102,5)
For the equation 11x+31y=1410
I get: (7,43), (38,32), (69,21), (100,10)