Creating a system of equations consisting only of integers?

In summary, the conversation discusses the creation of a simple linear system of equations with integers and the use of a determinant to ensure integer solutions. The conversation also mentions the use of Euclid's lemma and linear Diophantine equations as a potential solution. There is also a mention of potential confusion with the use of y1 and y2 as unknowns.
  • #1
friedrice821
2
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:
Mathematics news on Phys.org
  • #2
You don't say why you want to do this, but if you want to geerate "random" questions for an online test or something similiar, 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
 
  • #3
Thanks! the Diophantine equations really helped.
 
  • #4
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.
 
  • #5


Your approach using the determinant is a good start. Another way to create a system of equations consisting only of integers is by using the concept of linear combinations. This means that you can take any two integers and create a linear equation using them. For example, let's say we have the integers 3 and 5. We can create the equation 3x + 5y = 2, where x and y are variables.

To ensure that the system can only be solved by integer answers, we can set the coefficients of x and y (3 and 5 in this case) to be relatively prime. This means that they have no common factors other than 1. This ensures that the only possible solutions for x and y will be integers.

You can also use this concept to create a system of two equations with two unknowns. For example, we can take the integers 2 and 7 and create the equations 2x + 7y = 5 and 4x + 14y = 10. This system will have integer solutions only because the coefficients of x and y are relatively prime.

In summary, to create a system of equations consisting only of integers, you can use the determinant method or the concept of linear combinations with relatively prime coefficients. These methods ensure that the system can only be solved by integer answers.
 

Related to Creating a system of equations consisting only of integers?

1. How do you create a system of equations consisting only of integers?

To create a system of equations consisting only of integers, you must ensure that all the coefficients and constants in the equations are whole numbers. This means you may need to manipulate the equations by multiplying or dividing by a common factor to eliminate any fractions or decimals.

2. Why is it important to have a system of equations consisting only of integers?

Having a system of equations consisting only of integers allows for simpler and more precise calculations. It also makes it easier to identify patterns and relationships within the equations.

3. What are some strategies for creating a system of equations consisting only of integers?

Some strategies for creating a system of equations consisting only of integers include using substitution or elimination to solve for variables, manipulating equations to eliminate fractions and decimals, and using known relationships between integers.

4. Are there any limitations to creating a system of equations consisting only of integers?

Yes, there are limitations to creating a system of equations consisting only of integers. Some equations, such as those involving square roots or irrational numbers, may not be able to be transformed into integers. In addition, the solutions to the equations may not always be integers.

5. Can a system of equations consisting only of integers have infinite solutions?

Yes, a system of equations consisting only of integers can have infinite solutions. This can occur when the equations are dependent on each other, meaning one equation can be derived from the other, resulting in an infinite number of solutions that satisfy both equations.

Similar threads

Replies
9
Views
1K
  • Programming and Computer Science
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
4K
Replies
2
Views
3K
  • Programming and Computer Science
Replies
4
Views
558
  • Differential Equations
Replies
2
Views
3K
  • Differential Equations
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top