# Simple maths question

Hello,

I’m trying to do this maths questions, I know there’s a way to do it without just writing out all the multiples of 30 and 22 and finding one where the difference is 2, but I don’t know what that solution is. I know this is probably a really stupid question but bear with me

Find integers x and y such that x * 30 y* 22 = 2
(edited 1 year ago)

Scroll to see replies

Original post by grhas98
Hello,

I’m trying to do this maths questions, I know there’s a way to do it without just writing out all the multiples of 30 and 22 and finding one where the difference is 2, but I don’t know what that solution is. I know this is probably a really stupid question but bear with me

Find integers x and y such that x * 30 y* 22 = 2

Its not that hard to spot a solution, but if you can't, try dividing by 2 as it might be slightly easier.
Original post by mqb2766
Its not that hard to spot a solution, but if you can't, try dividing by 2 as it might be slightly easier.

Are you sure? I think I miss wrote it, what I meant to write was 30 * x + 22 * y = 2
Original post by grhas98
Are you sure? I think I miss wrote it, what I meant to write was 30 * x + 22 * y = 2

I guessed what the correct equation was, so yes I am sure.
Where does the question come from and what have you covered about these sorts of equations?
Original post by mqb2766
I guessed what the correct equation was, so yes I am sure.
Where does the question come from and what have you covered about these sorts of equations?

All I know is that is a linear combination, I’ve no clue how to easily get a solution without writing it out or just guessing.
Original post by grhas98
All I know is that is a linear combination, I’ve no clue how to easily get a solution without writing it out or just guessing.

Where is the question from / you dont seem to have covered the basics.
But you can simply try afew values and you should get one solution.
Original post by jCapril
it's easy

I’m aware, hence the title. I’m obviously missing something clear. I haven’t done any maths in a while
Original post by mqb2766
Where is the question from / you dont seem to have covered the basics.
But you can simply try afew values and you should get one solution.

This question is a small part of a larger question I can do related to discrete maths. This is the only part im having trouble with. Yes I know I can try values (-8 and 11) but I want to know how you would do it without guessing
Original post by grhas98
This question is a small part of a larger question I can do related to discrete maths. This is the only part im having trouble with. Yes I know I can try values (-8 and 11) but I want to know how you would do it without guessing

If youre doing discrete maths, I presume youve done mod/remainder arithmetic?
Its a simple linear diophantine equation.
(edited 1 year ago)
You said to divide it, how does knowing 15 * x + y* 11 = 1 help me, other than making guessing easier?
Original post by mqb2766
If youre doing discrete maths, I presume youve done mod/remainder arithmetic?
Its a simple linear diophantine equation.

We have done a little modular arithmetic but I’ve no clue what Diophantus means
Original post by grhas98
Hello,

I’m trying to do this maths questions, I know there’s a way to do it without just writing out all the multiples of 30 and 22 and finding one where the difference is 2, but I don’t know what that solution is. I know this is probably a really stupid question but bear with me

Find integers x and y such that x * 30 y* 22 = 2

what I would do is rearrange to find either y = .... or x = .... and then sub that into the original equation to work out either x or y. Then use this to workout other value. Thats a general method that will work with harder equations as well.
Original post by grhas98
We have done a little modular arithmetic but I’ve no clue what Diophantus means

If youve done some mod arithmetic, maybe think about the previous (where youve divided by 2) equation mod 11, for instance. Dividing by 2 makes 15 and 11 coprime.

But one simple solution is easy to iterate for small x,y.

Google simiple linear diophantine equations may help with a bit of understanding.
(edited 1 year ago)
Original post by speghettipasta
what I would do is rearrange to find either y = .... or x = .... and then sub that into the original equation to work out either x or y. Then use this to workout other value. Thats a general method that will work with harder equations as well.

But there is only one equation here and both must be integers? Isn’t that just something you do with simultaneos equations
Original post by mqb2766
If youve done some mod arithmetic, maybe think about the previous (where youve divided by 2) equation mod 11, for instance. Dividing by 2 makes 15 and 11 coprime.

But one simple solution is easy to iterate for small x,y.

I’m sorry but I not sure what you mean,

I see 15 and 11 are co-primes, how does that help. Bear in mind I only need any integer values of x and y, there are not bounded, is there not any quick simple solution that doesn’t requiring iterating?
Original post by grhas98
I’m sorry but I not sure what you mean,

I see 15 and 11 are co-primes, how does that help. Bear in mind I only need any integer values of x and y, there are not bounded, is there not any quick simple solution that doesn’t requiring iterating?

If you want to learn how to solve it, google linear diophantine equations. If you want to simply get a small solution, try small values of x and y. It would have taken you less time to try them than to keep replying.

But you can use mod arithmetic to simplify the solution as per the previous post.
(edited 1 year ago)
Original post by mqb2766
If you want to learn how to solve it, google linear diophantine equations. If you want to simply get a small solution, try small values of x and y. It would have taken you less time to try them than to keep replying.

The reason I am asking this is because the question is in 2 parts. The first part asks to find x and y such that x * 30 + y* 22 = gcd(30,22). It goes on to ask the same thing but with y < 30. Now I know an algorithm to find the linear combination of the gcd, so the second part doesn’t bother me. But clearly there is an easier way which involves larger integers otherwise the first part of the question wouldn’t exist
Original post by grhas98
The reason I am asking this is because the question is in 2 parts. The first part asks to find x and y such that x * 30 + y* 22 = gcd(30,22). It goes on to ask the same thing but with y < 30. Now I know an algorithm to find the linear combination of the gcd, so the second part doesn’t bother me. But clearly there is an easier way which involves larger integers otherwise the first part of the question wouldn’t exist

It will probably help for you to read a bit about linear diophantine equations and why it involves gcd and why there is one solution with y<30 and how they repeat ... Its an old, fairly simple idea.
(edited 1 year ago)
Original post by mqb2766
It will probably help for you to read a bit about linear diophantine equations and why it involves gcd and why there is one solution with y<30 and how they repeat ... Its an old, fairly simple idea.

Alright I’ll have a read, but I think it’s clear that’s not what the question wants. I’ve skimmed the content and can’t find anything on linear Diophantine equations so I don’t see why they would ask a question about them
Original post by grhas98
Alright I’ll have a read, but I think it’s clear that’s not what the question wants. I’ve skimmed the content and can’t find anything on linear Diophantine equations so I don’t see why they would ask a question about them

Tbf, youve not been clear about where the question is from (uni - discrete maths / comp sci?) or what youve covered. The question is very clear with a simple solution and there are several ways to solve it (basic mod or remainders, try simple values, .....). Post some form of attempt if you really still cant solve it.
(edited 1 year ago)