0

$136 \cdot x\equiv 119 \pmod{257}$

And you can write this like: $136 \cdot x = 119 + 257 \cdot y$

$136\cdot x - 257\cdot y = 119$

And after that you use eculidean algorithm below:

$257 = 136\cdot 1 + 121$

$136 = 121\cdot 1 + 15$

$121 = 15\cdot 8 + 1$

$15 = 15\cdot 1 + 0$

And after that you go backwards and below:

$257 -136\cdot 1 = 121$

$136-121\cdot 1 = 15$

$121 - 15\cdot 8= 1$

And i am going up and replacing each 15 and 121 in the equtions and i get this solution below:

$9 \cdot 257 -17 \cdot 136 = 1$

And multiply the equation by 119 i get this below:

$1071 \cdot 257 - 2023 \cdot 136 = 119 $

And the lcm is $257 \cdot 136 = 34952 $

But now i am stuck the solution should become 33 how can i see this from my equtions i have calculated it is impossible and this is too big numbers to handle for my head?

I am stuck?

jore12z
  • 65
  • 4
  • 1
    When you got to: $1071\cdot 257 - 2023\cdot 136= 119$ you were done. That means $136\cdot -2023 \equiv 119\pmod {257}$. So to solve $136x \equiv 119\pmod {257}$ that means $x \equiv -2023 \equiv 33 \pmod {257}$. "And the lcm is 257⋅136=34952" Um.... why are you trying to find the lcm? Any multiple of $257\equiv 0 \pmod {257}$ so finding the lcm is essentially "multiplying both sides by $0$" – fleablood Nov 19 '22 at 16:29
  • @fleablood I have one question if i mod 2023 with 257 i get 224? And the difference is 33 how come? – jore12z Nov 19 '22 at 16:33
  • Keep in mind what you are trying to do. To solve $136x \equiv 119 \pmod{257}$ we solve it by multilpying both sides by $136^{-1}$ to get $x\equiv 136^{-1} \cdot 136 x \equiv 136^{-1}\cdot 119\pmod {257}$. So we have to figure out what $136^{-1}$. By getting $9.257 - 17\cdot 136 =1$ we have $-17\cdot 136 \equiv 1$ so $136^{-1} \equiv -17$. Multiply $-17$ by $119$ and we get $-2023\cdot 136 \equiv 1\pmod{257}$. So the solution is $-2023 \equiv 33 \pmod {257}$. (In my original comment I forgot about the negative sign.) – fleablood Nov 19 '22 at 16:36
  • $-224\equiv 33\pmod {257}$ – fleablood Nov 19 '22 at 16:37
  • Once you get to "9⋅257−17⋅136=1" you should go back to modular arithmetic. $-17\cdot 136 \equiv 1 \pmod {257}$. Then go back to the original question $136x\equiv 119\pmod{257}$ and multiply both sides by $-17$. So $-17\cdot 136x\equiv x \equiv -17\cdot 119\equiv -2023 \pmod {257}$. Then the final step is reducing $-2023\equiv 33 \pmod{257}$ – fleablood Nov 19 '22 at 16:43
  • @fleablood Thanks i understand have another question not about this problem. How do you that you have one solution in this 33 or more than one solution? – jore12z Nov 19 '22 at 16:47
  • See the linked dupes for most known methods, e.g. under a minute by hand via Gauss's algorithm $$\bmod 257!:,\ x\equiv \dfrac{119}{136}\overset{\times 2}\equiv\dfrac{-19}{15}\overset{\times 17}\equiv\dfrac{-66}{-2}\equiv 33\qquad $$ – Bill Dubuque Nov 19 '22 at 16:50
  • You have one solution because 1) $\gcd(136, 257)=1$ and (equivalently) 2) $136x\equiv 1 \pmod{257}$ was solvable. $px + my=1$ is solvable if and only if $\gcd(p,m)=1$. If $\gcd(m,p)=d$ then $px+my=d$ is doable, and the solution to $mx \equiv K \pmod p$ will have solutions if and only if $K$ is a multiple of $d$ and, if so, it will have $\frac pd$ solutions. – fleablood Nov 19 '22 at 17:03
  • @fleablood Thanks i got gcd(136,257) = 1 with Eculidean Algorithm another problem not this one but similar i got gcd(136,255) = 17 and then i had multiple solutions? – jore12z Nov 19 '22 at 17:07
  • Wow... never saw Gauss's algorithm before and it's like a dope slap of an "Oh, duh! Of course!"... And I guess we can use it as a way to find $136^{-1}$. $\frac 1{136}\equiv \frac 2{272}\equiv \frac 2{15}\equiv \frac {34}{255}\equiv {34}{-2}\equiv -17$. – fleablood Nov 19 '22 at 17:10
  • We should probably move to chat but. If you had to solve $136x \equiv 119 \pmod {255}$ will have $15$ solutions. You'd basically solve $8x \equiv 7\pmod {15}$ and get $x\equiv -1\pmod {15}$ so your $15$ solutions are $x \equiv -1 + 15k \pmod{255}$ for $k = 0,....,14$. – fleablood Nov 19 '22 at 17:15
  • @fleablood Yeah thanks How do i create a chat? – jore12z Nov 19 '22 at 17:27

0 Answers0