Monday, November 11, 2013

The product of two numbers X and Y is 3 less than the sum of the numbers. How many such integer pairs of X and Y are possible.

First we need to write the problem in mathematical language i.e. we need to write an equation.
Product of two numbers xy, sum of two numbers x+y and since the product is less by 3, we have
xy=x+y-3
Write y in terms of x.
xy-y=x-3
Factor the left side.
y(x-1)=x-3
Check whether x=1 gives an integer solution.
0=-2 
x=1 does not gives us an integer solution so we can assume that x ne1 which allows us to divide by x-1.
y=(x-3)/(x-1)
Now we know that in order to get an integer solution x-3  must be divisible by x-1,  bearing in mind that x is an integer as well. The only thing remaining to do is to check whether those two numbers are divisible for some values of x.  We will start with values of x such that x-1=-1 or x-1=1 because those are certainly integers.
x=0
y=(-3)/(-1)=3
x=-1
y=(-4)/(-2)=2
x=-2
y=(-5)/(-3)!inZZ
x=-2 is not a solution. If we keep trying with the smaller and smaller numbers we will get fractions that get closer and closer to 1, but we will never get an integer.
Let us try greater numbers. We already know that x=1 is not a solution so we will skip that.
x=2
y=-1/1=-1
x=3
y=0/2=0
x=4
y=1/3!inZZ
Again, we see that x=4 is not a solution and nor is any integer greater that 4.
We can conclude there are 4 such integer pair numbers and they are
(-1,2), (0,3), (2,-1) and (3,0).                    
                                             
https://en.wikipedia.org/wiki/Diophantine_equation

No comments:

Post a Comment

Why is the fact that the Americans are helping the Russians important?

In the late author Tom Clancy’s first novel, The Hunt for Red October, the assistance rendered to the Russians by the United States is impor...