Creating a system of equations consisting only of integers?

Click For Summary

Discussion Overview

The discussion revolves around creating a system of linear equations with integer coefficients and integer solutions. Participants explore methods to generate such systems without actually solving them, focusing on the conditions necessary for integer solutions.

Discussion Character

  • Exploratory, Technical explanation, Conceptual clarification

Main Points Raised

  • One participant seeks an algorithm to create a simple linear system of equations with integer coefficients and integer solutions, questioning if their approach using determinants is valid.
  • Another participant suggests a method for generating equations by selecting integer values for variables and constants, implying a straightforward approach for creating test questions.
  • A later reply indicates that the concept of Diophantine equations was beneficial for understanding the problem.
  • One participant expresses a concern about the notation used in the equations, specifically the introduction of different variables, which could lead to confusion regarding known constants versus unknowns.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for generating the integer systems, and multiple approaches are presented without resolution.

Contextual Notes

Some assumptions regarding the definitions of variables and the context of their use remain unclear, and the discussion does not resolve the mathematical steps necessary for ensuring integer solutions.

friedrice821
Messages
2
Reaction score
0
I'm looking for an algorithm to create a very simple (2 equations, 2 unknowns) linear system of equations that consists purely of integers. Specifically, a way to create a system of equations of integers and knowing that it can only be solved by integer answers, without actually solving it.

a11x1+a12x2=b1
a21x1+a22x2=b2
where a11, a12, a21, a22, x1, x2, b1, b2 are all integers.

The only thing I can think of is using a determinant which gives
x1 = (a22b1-a12b2) / (a11a22-a12a21)
x2 = (a11b2-a21b1) / (a11a22-a12a21)
and that the numerator must be a multiple of the denominator.

What do I do now? Am I even on the right path?
 
Last edited:
Physics news on Phys.org
You don't say why you want to do this, but if you want to geerate "random" questions for an online test or something similar, the easy way is to just pick a, b, c, d, x1 and x2, and then work out y1 and y2.

If this is a more general question, look up "euclid's lemma" and linear Diophantine equations, e.g. http://en.wikipedia.org/wiki/Euclidean_algorithm
 
Thanks! the Diophantine equations really helped.
 
By the way, I wish you hadn't used y1 and y2...it just throws a curve ball as to they are supposed to be known constants or unknowns...maybe you should simply use a couple of more letters?

...just being picky.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K