1 equation, 2 unknowns, need integer solution

  • Thread starter Thread starter Fellowroot
  • Start date Start date
  • Tags Tags
    Integer Unknowns
Click For Summary

Homework Help Overview

The discussion revolves around solving a linear equation with two unknowns, specifically the equation 199x - 98y = -5, under the constraints that both x and y are positive integers less than or equal to 99. Participants explore methods to derive integer solutions and question the validity of the equation setup.

Discussion Character

  • Exploratory, Assumption checking, Conceptual clarification

Approaches and Questions Raised

  • Participants discuss the use of computational tools like Wolfram Alpha to find integer solutions and question how to derive those solutions manually. There are suggestions to graph the equation and check for integer intersections, as well as references to Diophantine equations and methods for finding solutions.

Discussion Status

The conversation is ongoing, with participants providing various insights and methods for approaching the problem. There is recognition of the need to clarify the equation's setup after an initial error was pointed out. Some participants suggest different techniques for finding solutions, indicating a productive exploration of the topic.

Contextual Notes

There is a noted confusion regarding the equation's formulation, as one participant initially presented an incorrect version of the equation. The constraints on x and y being positive integers are emphasized, which affects the validity of potential solutions.

Fellowroot
Messages
92
Reaction score
0

Homework Statement



I needed to solve this single equation with two unknowns.

199x - 98y = -5

0< x <=99
0< y <=99

I typed the equation into Wolfram Alpha and got an integer solution of:

x = 98n + 31
y = 199n +63 when n is an integer

Since I know my restriction on x and y I can conclude that my solution is:

x = 31
y = 63 when n = 0

My question is, how do I obtain that integer solution that Wolfram Alpha gave me?

[edit, changed the + to a - sign from an error Ray Vickson pointed out, thanks.]
 
Last edited:
Physics news on Phys.org
Fellowroot said:

Homework Statement



I needed to solve this single equation with two unknowns.

199x + 98y = -5

0< x <=99
0< y <=99

I typed the equation into Wolfram Alpha and got an integer solution of:

x = 98n + 31
y = 199n +63 when n is an integer

Since I know my restriction on x and y I can conclude that my solution is:

x = 31
y = 63 when n = 0

My question is, how do I obtain that integer solution that Wolfram Alpha gave me?

There is something wrong with your question. If x and y are integers >= 1, then 199x + 98y is >= 207, so can't be equal to -5.

RGV
 
Ray Vickson said:
There is something wrong with your question. If x and y are integers >= 1, then 199x + 98y is >= 207, so can't be equal to -5.

RGV

Sorry, it was supposed to be:

199x - 98y = -5
 
How about solving for y and then graphing it, and looking for where the line crosses two integers?
 
Since the GCD of 99 and 198 is 1, there are integers x and y such that

99 x + 198 y = 1

You can find x and y by several methods, such as the Extended Euclidean Algorithm

http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm

Then 99 (-5x) + 198 (-5y) = -5

That gives you one solution, not necessarily in the acceptable range, but maybe you can use that to find others.
 
Its a common linear diophantine equation. Go search for it :)
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 35 ·
2
Replies
35
Views
6K
  • · Replies 24 ·
Replies
24
Views
4K
Replies
3
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K