Find the number of ordered pairs of integers ( x , y ) which satisfy the equation x y = 5 x − 6 y .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
@brian charlesworth Awesome transformation. I like it.
SFFT FTW! :)
I did the exact same ⌣ ¨
( x + 6 ) y = 5 x
y = x + 6 5 x + 3 0 − 3 0
y = 5 − x + 6 3 0
thus for y to be an integer 30/x+6 should be an integer
( x , y ) = { ( − 3 6 , 6 ) , ( − 2 1 , 7 ) , ( − 1 6 , 8 ) , ( − 1 2 , 1 0 ) , ( − 1 1 , 1 1 ) , ( − 9 , 1 5 ) , ( − 8 , 2 0 ) , ( − 7 , 3 5 ) , ( − 5 , − 2 5 ) , ( − 4 , − 1 0 ) , ( − 3 , − 5 ) , ( − 1 , − 1 ) , ( 0 , 0 ) , ( 4 , 2 ) , ( 9 , 3 ) , ( 2 4 , 4 ) }
thus 16 ordered pairs.
Nice solution @megh choksi
Applying Simon's Favourite Factoring Trick (SFFT) in the equation, we get:
x y + 6 y − 5 x − 3 0 = − 3 0 which can be factorized further as
( y − 5 ) ( x + 6 ) = − 3 0 .
Now, − 3 0 can be factored into 4 ways and there are 2 ways to arrange the factors among the variables x and y . Also, the sign can be changed in 2 different ways among the variables. So, in all − 3 0 can be factored into 4 × 2 × 2 = 1 6 ways.
Hence, there are 1 6 corresponding values of x and y .
So, our final answer is 1 6 .
xy-5x+6y-30=-30
(x-6)(y-5)=30
(x-6),(y-5)={+-((1,30),(2,15),(3,10),(5,6),(6,5),(10,3),(15,2),(30,1))}
x y = 5 x − 6 y ,therefore x ( y − 5 ) + 6 y = 0 ,so x ( y − 5 ) + 6 ( y − 5 ) = − 3 0 , then ( x + 6 ) ( y − 5 ) = − 3 0 , x and y are integers, so x+6 and y-5 are integers and the number of solutions is the number of the factors of -30, so the number of solutions is 16.
One can obtain this result, and exhibit the collection of ordered pairs, using the Python sympy library. Use synthetic division to get that 'magic' number 30, then obtain its divisors.
A bruteforce solution will also work.
using namespace std;
int main(){
int counter=0;
for(int i=-50;i<51;i++){
for(int j=-50;j<51;j++){
if(j*i==5*i-6*j){
counter++;
cout<<i<<" "<<j<<endl;
}
}
}
cout<<counter;
}
Problem Loading...
Note Loading...
Set Loading...
The equation can be rewritten as
x y − 5 x + 6 y − 3 0 = − 3 0 ⟹ ( x + 6 ) ( y − 5 ) = − 3 0 .
Since − 3 0 can be factored in 1 6 ways in which the ordering of the factors matters, there will be 1 6 corresponding ordered integer solution pairs ( x , y ) .