Expression, modular arithmetic

In summary, "Expression, modular arithmetic" refers to the mathematical technique of performing calculations with integers while considering their remainders when divided by a specific modulus. This system is useful in various fields, including computer science and cryptography, as it simplifies complex calculations and helps solve problems involving periodicity and congruences. Modular arithmetic follows specific rules, such as addition, subtraction, and multiplication, while emphasizing the concept of equivalence classes of integers under a modulus.
  • #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!
 

FAQ: Expression, modular arithmetic

What is modular arithmetic?

Modular arithmetic is a system of arithmetic for integers, where numbers wrap around upon reaching a certain value, known as the modulus. It is often expressed as "a mod n", which gives the remainder when integer 'a' is divided by integer 'n'.

How do you perform addition in modular arithmetic?

To perform addition in modular arithmetic, you add the two numbers as you normally would, and then take the result modulo the modulus. For example, in modulo 5, adding 3 and 4 gives 7, and 7 mod 5 equals 2.

What is the significance of the modulus in modular arithmetic?

The modulus determines the range of values in modular arithmetic. It defines the "wrap-around" point, meaning that any result of an operation that exceeds the modulus will be reduced to a value within the range of 0 to modulus-1.

Can you explain how to multiply in modular arithmetic?

To multiply in modular arithmetic, multiply the two numbers as usual, and then take the result modulo the modulus. For example, in modulo 6, multiplying 4 and 5 gives 20, and 20 mod 6 equals 2.

How do you find the inverse of a number in modular arithmetic?

The inverse of a number 'a' modulo 'n' is a number 'b' such that (a * b) mod n = 1. To find it, you can use the Extended Euclidean Algorithm if 'a' and 'n' are coprime; otherwise, an inverse does not exist.

Back
Top