[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

12=4524x+3564y, x and y must be integers. how do i solve this?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 14
Thread images: 2

File: Screenshot_2016-08-13-10-03-18.png (434KB, 720x1280px) Image search: [Google]
Screenshot_2016-08-13-10-03-18.png
434KB, 720x1280px
12=4524x+3564y, x and y must be integers. how do i solve this?
>>
>>303659
There are infinite combinations. You need another equation.
>>
>>303659

One Equation, two variables --> infinite solutions.Put in sth for x and you can calculate a y for each x.
>>
>>303660
>>303662
one solution would be enough for me, i just can't seem to get it. keep in mind that both x and y must be integers
>>
12 = 4524x+3564y
1 = 377x+297y

297
217
137
57
354
274
194
114
34
331
251
171
91
11
308
228
148
68
365
285
205
125
45
342
262
182
102
22
319
239
159
79
376

x = 26, y = -33
>>
File: gif (74).gif (2MB, 139x215px) Image search: [Google]
gif (74).gif
2MB, 139x215px
>>303673
how

i mean thanks. but how? i also tried a lot with 377 and 297 and i also got to the 80 which you're substracting there. but how do you get from 57 to 354?
>>
>>303676
nevermind. added 297 obviously. now i just need to explain to myself why that works.
>>
>>303676
Subtracting 80 is shorthand for taking the remainder of n*297 when divided by 377. Once you get either 1 or -1 (i.e. 376), that's your solution for y.

If you're doing it by hand (as I actually was), once you get a remainder below 80, you subtract 80 from it, then add the result to 377. 57 - 80 + 377 = 354.

Since it took n=33 to get a remainder of 376, which again, is equivalent to a remainder of -1, we get y=-33.
>>
>>303666

12=Ax+By
-->12-Ax =By
-->12-Ax / B = y
-->12-4524x /3564 = y
-->12/3564 - (4524/3564)x = y
-->1/297 - 1131/891 x
-->1/297 - 377/297 x = y
-->(1-377)x / 297 = y

Put in values for x until quotient is integer

-->x = 26 --> y=-33
>>
>>303685
i tried that, but not until 26. thought there must be an easier way
>>303683
still trying to grasp it. especially hard since english isn't my first language. but thanks a lot!
>>
>>303688

Well "must be integer" is not a directly in usable way addable property, you can surely add it in math language as x,y E Z but it doesn't in any way help with the calculation, so yeah at the end iterative solving (in laymans terms: Trying) is needed. You either put in 26 values for x and calculate the result, or you have to 33 times subtract 80 from 297, keeping the rollover in mind.
Pick your poison.
>>
>>303688
I was doing a poor job of explaining things, what I used is modular arithmetic.
https://en.wikipedia.org/wiki/Modular_arithmetic

Once we have 1 = 377x+297y, basically, the quantities 377x and 297y have to have a difference of 1, right? It doesn't matter which quantity is the smaller one. So it follows that we're looking for an integer "n" such that either
297n = 1+377a
or
297n + 1 = 377a

For some integer a.

Stated another way, for this integer n, the remainder of 297n when divided by 377 must be either 1 or 376. So you go through
297n (mod 377) until it's congruent to 1 or 376.

You could also do this the other way, using 377n (mod 297), going for 1 or 296, which would've been faster in this case.
>>
>>303693
okay thanks, i guess the teacher was just being an ass again.
>>
>>303701

It's not possible faster than the smaller legit value.
like had you chosen to use x as the lonely variable you would have had to input 33 values for y until a hit. ON the other hand using the mod arithmetic vice versa would have resulted in only 25 steps.
The problem is you don't know which variable will lead to the faster result at first, it's pretty much a guess...
Thread posts: 14
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.