-1

how to solve this $11x\equiv 44\pmod{64}$ ?

attempt:

first of all need to find the inverst of $11x\equiv 44\pmod{64}$

by Euclid algorithm then:

  1. $64=11\cdot 5 +9$

  2. $11=1\cdot 9 +2$

  3. $9=2\cdot4+1$

  4. $1=9-2\cdot4$

what is the next step for the make the inverst I do not understand ?

amWhy
  • 209,954
  • 1
    Use \pmod{63} to get $\pmod{63}$ – Arturo Magidin Nov 28 '20 at 00:08
  • You need to express the gcd, in this case $1$, in the form $1 = 10\alpha + 63\beta$ with $\alpha,\beta\in\mathbb{Z}$, using the Euclidean algorithm; then $\alpha$ is the multiplicative inverse of $10$ modulo $63$. That said, if you can just “eyeball” how to express $1$ in that form, then that will suffice; and there’s a fairly easy way of doing that when you have $63$ and $10$. – Arturo Magidin Nov 28 '20 at 00:10
  • @arturomagidin sorry i edit my question . i don't know how to continue from step 4. –  Nov 28 '20 at 00:14
  • Is it mod 63 or 64? – Neat Math Nov 28 '20 at 00:16
  • @neatmath 64 i fix that , sorry . –  Nov 28 '20 at 00:17
  • 4
    You can just divide by 11 since $\gcd(11,64)=1$, $x\equiv 4 \pmod{64}$. – Neat Math Nov 28 '20 at 00:20

7 Answers7

0

As others have said, you can just eyeball it, since $11 \times 4 = 44.$

The formal approach is as follows:

$1 = 9 - (2)4$

$= 9 - [11-9](4)$

$= (9)5 - (11)4$

$= [64 - (11)5]5 - (11)4$

$= [(64)5 - (11)25 - 11(4)$

$= (64)5 - 11(29).$

Therefore, $(11)29 \equiv -1 \pmod{64}.$

Therefore, $(11)35 \equiv (11)(64 - 29) \equiv 1 \pmod{64}.$

Therefore, $x \equiv (11 \times 35) \times x \equiv (44 \times 35) \equiv 4 \pmod{64}.$

user2661923
  • 35,619
  • 3
  • 17
  • 39
0

Once you learned modular fraction you will probably never want to go back to Euclid's algorithm. In your case if the RHS is not some nice number like 44, you want to find the inverse of 11 under modulo 64, then you apply inverse reciprocity $$ \pmod{11}: 0 \equiv 1+64k \equiv -10-2k \implies k\equiv -5 \equiv 6 $$

Therefore $$ \frac{1}{11}\equiv \frac{1+64\cdot 6}{11}\equiv \frac{1+(66-2)\cdot 6}{11} \equiv 6 \cdot 6-1 \equiv 35 \pmod{64} $$

Neat Math
  • 4,790
  • I do not understand your notation. $-5$ is not congruent to $6$ mod 64. – Aaron Nov 28 '20 at 01:44
  • My bad. It should be mod 11. I have edited. See the link I included for more examples from Bill Dubuque. – Neat Math Nov 28 '20 at 01:49
  • Thanks for the link, that's an interesting technique. – Aaron Nov 28 '20 at 01:58
  • 1
    @Aaron $!\bmod 61!:\ x \equiv 44/11 \equiv 4,$ is already an exact quotient, so there is no need to use inverse reciprocity, i.e. to find $,k,$ making $, x\equiv (44+64k)/11,$ an exact quotient (but it does of course work, e.g. if done rotely by a computer: $! \bmod 11!:\ 0\equiv 44+64k\equiv -2k\iff k\equiv 0)\ \ $ – Bill Dubuque Nov 28 '20 at 06:28
  • 1
    @NeatMath When deciding which of $44/11$ or $1/11$ is simpler to compute we can always quickly check if either is already an exact quotient before diving head first into algorithms. We might even try factorizations that simplify finding exact quotients. – Bill Dubuque Nov 28 '20 at 08:34
0

It's important to have so theory under you belt.

$11$ has a unique inverse inverse $\mod 64$ if and only if $\gcd(11,64)=1$ which it it does.

So solve $11x \equiv 44 \pmod {64}$ we multiply both sides by $11^{-1}$ (whatever that is) and get

$11^{-1}\cdot 11x \equiv 11^{-1}\cdot 44\equiv 11^{-1}\cdot 11\cdot 4\pmod {64}$ so

$x \equiv 4\pmod {64}$.

And that's it. You don't need to figure out what $11^{-1}$ actually is (it is $35$ because $11\cdot 35\equiv 385=1+6\cdot 64$ so $35\cdot 11x\equiv 35\cdot 44\pmod {64}$ so $x\equiv 385x \equiv 1540 = 4 + 35\cdot 24\equiv 4 \pmod {64}$); It's enough to know there is an inverse for $11$ and that it is unique.

If a number is invertible you can do division. And the will be okay if $11$ and $64$ are relatively prime.

=========

But note if $\gcd(11,64)\ne 1$ there is no inverse and this might have no solutions or multiple solutions.

$11x = 44 \pmod 66$ for example has $4$ as a solution but also $x\equiv 10,16,22,28,......$ as solutions.

And although $11x \equiv 43 \pmod {64}$ has a unique solution $x \equiv 35\cdot 43 \equiv 33 \pod {64}$ $11x \equiv 43 \pmod {66}$ doesn't have any solutions.

fleablood
  • 124,253
  • understood 100% but, u said if gcd(a,b)=1 then i can multiply both sides by inverse of a. what happen if like i have this question $10x \equiv 34\pmod{63}$ i know that $\gcd(63,10)=1$ if i multiply both side by the inverse i get $x\equiv 34\cdot10^{-1}\pmod{63}$ what i do from here ? –  Nov 28 '20 at 13:40
  • Well, it that case you do have to either figure out what $10^{-1}$ actually is, or figure out what representative of $34$ is a multiple of $10$. So to be continued..... – fleablood Nov 28 '20 at 15:11
  • 1
    Method 1: Figure out what $10^{-1}\pmod {63}$ is. i.e. solve $10a = 1 + 63k$. That means $63k$ must end with the digit $9$ so if $k = 13$ we have $10a = 1 + 189$ and $a = 19$ so $10^{-1}\equiv 19\pmod{63}$. So $10x \equiv 34\pmod{63}\implies x \equiv 1910x \equiv 1934\equiv 646\equiv 16\pmod{63}$. Method II to follow...... – fleablood Nov 28 '20 at 15:15
  • Method 2: Find a representive of $34$ that is a multiple of $10$. That is solve $10m= M \equiv 34 = 34 + 63k\equiv 34 \pmod{63}$. The last digit of $63k$ must be a $6$ so if we take $k=2$ then $10x \equiv 34 \equiv 34 + 2*63 = 160$ so $x \equiv 16\pmod{63}$. ... Of course because we were trying with $10$ which has the simple "ends in zero" rule this were easier than they often are. – fleablood Nov 28 '20 at 15:19
  • Method 1: $10a+1+63k$ where this equation come from and why i can write it like that. and i understand that $10^{-1}\equiv 19\pmod{63}$ , why $636\equiv 16\pmod{63}$ is true ? what is the step from $646\equiv 16\pmod{63}$? –  Nov 28 '20 at 17:10
  • To fin $10^{-1}$ is to find an $a$ where $10a \equiv 1 \pmod {63}$. And $10a \equiv 1 \pmod {63}\iff 63|10a -1\iff \exists k; 10a-1 = 63k\iff \exists k; 10a = 1+63k$. That's what $10a \equiv 1\pmod{63}$ means. – fleablood Nov 28 '20 at 17:13
  • $646 = 630 + 16 = 63*10 + 16 \equiv 16 \pmod {63}$. – fleablood Nov 28 '20 at 17:14
  • @fleablood: did you mean $11x\equiv43\pmod{6\color{red}6}$ doesn't have any solutions, at the end? – J. W. Tanner Nov 29 '20 at 00:40
  • Good Grief! Of course I did. The typo fairy is working overtime. – fleablood Nov 29 '20 at 05:26
0

Your work (excluding 4.) means that $11x \equiv 1\pmod{64}$ has a solution.

  1. $64=11\cdot 5 +9$

  2. $11=9\cdot 1 +2$

  3. $9=2\cdot4+1$

So

$\;1 = 9 - (2\cdot4) =$
$\quad\quad 9 - (11\cdot4 - 9\cdot4) =$
$\quad\quad64 - 11\cdot5 - (11\cdot4 - 9\cdot4) =$
$\quad\quad 64 - 11\cdot5 - \bigr(\,11\cdot4 - (64\cdot4 - 11\cdot20)\,\bigr) =$
$\quad\quad 64 + 11\cdot(-5) + 11\cdot(-4) + 4\cdot64 + 11\cdot(-20)=$
$\quad\quad 5\cdot64 + 11\cdot(-29)$

So $11 \cdot (-29) \equiv 11\cdot(35) \equiv 1 \pmod{64}$

Finally,

$\;11x\equiv 44\pmod{64} \implies x\equiv 35\cdot44 \equiv 4 \pmod{64}$

CopyPasteIt
  • 11,366
0

how to solve this $11x\equiv 44\pmod{64}$ ?

first of all need to find the inverse of $11x\equiv 44\pmod{64}$

No, we can cancel an invertible without knowing the actual value of the inverse. By Bezout, since $\,\gcd(11,64)=1,\,$ we know that $\, 11^{-1}$ exists $\!\bmod 64,\,$ so $\rm\color{#0a0}{scaling}$ our congruence by $\,\color{#0a0}{11^{-1}}\,$ scales the coef of $\,x\,$ to be $1,\,$ effectively solving it for $\,x,\,$ explicitly

$$\:\!\color{#0a0}{11}\:\!x\:\!\equiv\:\! \color{#0a0}{11}\cdot 4\,\ \overset{\large \times\, \color{#0a0}{11^{-1}}\!\!\!\!\!\!}{\underset{\color{#c00}{\large \times\,11}}{\color{#c00}\Longleftarrow}\!\color{#0a0}\Longrightarrow}\ \ x\equiv 4\qquad\qquad\quad$$

Via modular fractions $\,x \equiv {\large \frac{44}{11}}\equiv {\large \frac{4\:\!\cdot\:\! \color{#0a0}{11}}{\color{#0a0}{11}}}\equiv 4\:$ i.e. $\,4\color{#0a0}{(11)11^{-1}}\equiv 4,\,$ mod any $\,n\,$ coprime to $11.\,$

Note that $\color{#0a0}{\text{scaling by $\,\color{#0a0}{11^{-1}}$}}$ is an invertible operation, with inverse being $\color{#c00}{\text{scaling by $11$}}$, so it results in an equivalent congruence (otherwise the operation might yield an inequivalent congruence with extraneous roots, so we'd need to verify that $\,x\equiv 4\,$ is actually a root). In fractional form this scaling by $\,11^{-1}$ is more commonly viewed as cancelling a common factor $11$ from top & bottom.

Recall that generally modular fractions are well-defined (uniquely exist) iff the denominator is coprime to the modulus. Thus reducing fractions by cancelling common factors is always valid, since a factor of the denominator remains coprime to the modulus, so it is invertible, so cancellable. Similarly all the other common laws of fractions remain valid for modular fractions as long as we restrict to fractions writable with invertible denominator $\:\!d\,$ (i.e. $\,d\,$ is coprime to the modulus).

Bill Dubuque
  • 272,048
0

$11x \equiv 44 ($ mod $64 $) $=> 64|(11x-44)=> 64|11(x-4).$ As $gcd(64,11)=1$ , therefore it implies $64|(x-4)$. Therefore $64k= x-4=> x=64k+4$

Anwesha1729
  • 352
  • 2
  • 8
  • Yes, you can unwind congruence language to divisibility language, then apply Euclids Lemma, but that's the wrong way pedagogically. The primary point of using modular arithmetic is to make such divisibility inferences more arithmetically intuitive. Here that intuition is the ubiquitous arithmetical fact that invertible elements are cancellable (by scaling by the inverse). Euclid's Lemma is a divisibility form of that. Btw, you need bidirectional arrows for the proof to be correct - see my answer. – Bill Dubuque Nov 28 '20 at 07:42
  • Yes, we can use concept of inverse here but it can be done simply using divisibility language. – Anwesha1729 Nov 28 '20 at 07:46
  • You might find it more "simple" in this toy example. But with less trivial examples you will soon encounter immense difficulty manipulating divisibility relations rather than the much more arithmetically intuitive congruence equations. – Bill Dubuque Nov 28 '20 at 07:50
  • That is true. But this is the most basic concept to be kept in mind using which other laws are derived. – Anwesha1729 Nov 28 '20 at 07:56
  • What's derived or not depends on the presentation. Generally in abstract algebra congruences are more fundamental (general abstract algebras don't have congruences determined by a single congruence class, so there is no analog of the divisibility characterization of congruences as there are in PIDs, e.g. see this recent question). – Bill Dubuque Nov 28 '20 at 08:04
0

For fun, another approach you can take is Hensel lifting, which lets us find the roots of a polynomial $\mod 2$ and lift to a higher solution $\mod 2^n$. In order to do that, we need check that the criteria that you can find some $x$ such that $f(x)\equiv 0 \mod 2$ and $f'(x) \not \equiv 0 \mod 2$.

For that you define $f(x)=11x-44$ which we want the root(s) of. Then let's use $x=1$ as our guess, if that doesn't work we just try $x=0$.

$$ f(1) \equiv 11*1 - 44 \not \equiv 1 \mod 2$$ $$ f'(1) \equiv 11 \not \equiv 0 \mod 2$$

This fails the first criteria, since we require it to be $0 \mod 2$, so $1$ does not lift to a solution. Let's check $x=0$ now.

$$ f(0) \equiv 11*0 - 44 \equiv 0 \mod 2$$ $$ f'(0) \equiv 11 \not \equiv 0 \mod 2$$

We've succeeded in meeting the criteria for Hensel's lemma, and now we can apply the iteration formula which converges to the solution! We take as our guess $x_0 = 0$ and then iterate by,

$$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$

So let's do that now,

$$x_1 = x_0 - \frac{f(x_0)}{f'(x_0)}= 0 - \frac{f(0)}{f'(0)} = - \frac{11*0-44}{11} = 4$$

Let's iterate again,

$$x_2=x_1-\frac{f(x_1)}{f'(x_1)} = 4 -\frac{f(4)}{f'(4)} = 4 - \frac{11*4-44}{11} = 4$$

Since $x_2=x_1 = 4$ it means we've reached a fixed point and this is our final solution, we're done!


Some final remarks, in case you're wary about the $f'(x_n)$ evaluations in the denominator, the criteria we checked at the start end up satisfying the base case of an induction argument that makes up Hensel's lemma which ensures that we're only ever inverting a number that's relatively prime to $2$.

If you've never seen this before, you'll probably find it bizarre to see Newton's method used to solve modular arithmetic problems, and it turns out this is part of p-adic analysis. This gives you a way to get your hands on genuine p-adic numbers that satisfy some algebraic equation.

Merosity
  • 2,489
  • 1
  • 8
  • 16