Expression, modular arithmetic

  • #1
bremenfallturm
57
11
Homework Statement
Solve ##15\cdot 16-7(9+10)+11## in ##\mathbb Z_{17}##
Relevant Equations
Given a number ##a\equiv b \pmod n##, ##a+c\equiv b+c \pmod n##
This is basic modular arithmetic but I just can't get it to work no mather how many different methods I try.
I probably have failed to understand some basics of modular algebra...
1726766286268.png

Help is appreciated!
Correct is supposed to be ##16##
 
Physics news on Phys.org
  • #2
Taking the remainder respects multiplication and addition. Whenever you get a number greater than ##16## you can reduce it by its remainder. E.g. ##15\cdot 16=240=17\cdot 14+2## so ##15\cdot 16 \equiv 2 \pmod{17}## and the same holds for ##9+10## etc. Negative numbers become positive by e.g. ##-14=(-1)\cdot 17 +3 \equiv 3\pmod{17}.##
 
  • #3
bremenfallturm said:
Homework Statement: Solve ##15\cdot 16-7(9+10)+11## in ##\mathbb Z_{17}##
Relevant Equations: Given a number ##a\equiv b \pmod n##, ##a+c\equiv b+c \pmod n##

This is basic modular arithmetic but I just can't get it to work no mather how many different methods I try.
I probably have failed to understand some basics of modular algebra...
View attachment 351313
Help is appreciated!
Correct is supposed to be ##16##

You correctly found [itex]15 \equiv -2[/itex] and [itex]16 \equiv -1[/itex], but when you multiplied these together you somehow got [itex]-2[/itex] instead of [itex]2[/itex]. The rest of of your working is correct, but more complicated than necessary. [itex]7 \equiv 7 [/itex] and [itex]19 \equiv 2[/itex], so [itex]7 \cdot 19 \equiv 14[/itex]; [itex]11 \equiv 11[/itex]. Thus [tex]
15 \cdot 16 - 7(10 + 9) + 11 \equiv 2 - 14 + 11 \equiv 2 - 3 \equiv -1 \equiv 16.[/tex]
 
  • #4
bremenfallturm said:
Homework Statement: Solve ##15\cdot 16-7(9+10)+11## in ##\mathbb Z_{17}##
Minor nit -- The above is an expression, so you're not asked to "solve" it, but only to evaluate it. You can solve equations or inequalities that involve unknown variables.
 
  • Like
Likes Gavran and SammyS
  • #5
pasmith said:
You correctly found [itex]15 \equiv -2[/itex] and [itex]16 \equiv -1[/itex], but when you multiplied these together you somehow got [itex]-2[/itex] instead of [itex]2[/itex]. The rest of of your working is correct, but more complicated than necessary. [itex]7 \equiv 7 [/itex] and [itex]19 \equiv 2[/itex], so [itex]7 \cdot 19 \equiv 14[/itex]; [itex]11 \equiv 11[/itex]. Thus [tex]
15 \cdot 16 - 7(10 + 9) + 11 \equiv 2 - 14 + 11 \equiv 2 - 3 \equiv -1 \equiv 16.[/tex]
Thank you! I understand what I did wrong now. Calculating in ##\mathbb Z_n$$ is obviously something you need to get used to :) I'll practise more and ask further questions in a new topic if I need more help!
Mark44 said:
Minor nit -- The above is an expression, so you're not asked to "solve" it, but only to evaluate it. You can solve equations or inequalities that involve unknown variables.
I see, of course I meant "calculate". Sorry!
 
Back
Top