Modulo operation | What does this mean?

  • Thread starter michonamona
  • Start date
  • Tags
    Mean
In summary, i and j are considered 'happy' if their difference is congruent to 1, 4, or 7 modulo 8. This means that the remainder when divided by 8 will be 1, 4, or 7, and this concept is important in number theory.
  • #1
michonamona
122
0

Homework Statement



Suppose i and j take on values from {0,1,2,...,7}. We say that i and j are 'happy' if i - j (their difference) is congruent to 1.4 or 7 modulo 8.

Note: 'happy' is some mathematical property not relevant to the question.


What does 7 modulo 8 mean? What does it mean for i - j to be congruent to 1.4?

Thank you for your help!

M
 
Physics news on Phys.org
  • #2
michonamona said:

Homework Statement



Suppose i and j take on values from {0,1,2,...,7}. We say that i and j are 'happy' if i - j (their difference) is congruent to 1.4 or 7 modulo 8.

Note: 'happy' is some mathematical property not relevant to the question. What does 7 modulo 8 mean? What does it mean for i - j to be congruent to 1.4?

Thank you for your help!

M
I'm not sure what you mean by i - j congruent to 1.4 modulo 8, did you mean: "...congruent to 1,4 or 7 modulo 8?" Either way, I shall attempt to explain this concept.

Do you remember when you first learned division, and you didn't care about decimal places? That is, if you divided one integer into another and didn't get an even answer, you reported the remainder as a part of your answer, right? For example, 8/3 = 2 R.2, right? Well, it turns out that this is a pretty important thing to study in number theory. So, we say that two numbers, m and k are congruent modulo n when the remainder of n/m is the same as the remainder of n/k. This is equivalent to saying that k-m (or m-k) is an integer multiple of n.

The congruency relation is an equivlancy relation. In this context, this means that for the arithmetic operations, you can treat the congruency relation just like "=". For example, if a is congruent to b mod n and c is congruent to d mod n, the a+b is congruent to c+d mod n.
 
  • #3
Robert1986 said:
I'm not sure what you mean by i - j congruent to 1.4 modulo 8, did you mean: "...congruent to 1,4 or 7 modulo 8?"
I'm pretty sure that was a typo somewhere that should read "i - j is congruent to 1, 4, or 7 modulo 8."
 

1. What is the modulo operation?

The modulo operation, denoted by the % symbol, is a mathematical operation that calculates the remainder after division between two numbers. For example, 7 % 3 would result in a remainder of 1.

2. How is the modulo operation used in programming?

In programming, the modulo operation is commonly used to determine if a number is even or odd, to wrap values around a certain range, or to repeat a sequence of numbers. It is also used in cryptography to generate secure random numbers.

3. Can negative numbers be used in the modulo operation?

Yes, the modulo operation can be used with negative numbers. The result will always be a positive number, as the negative sign is dropped when calculating the remainder.

4. Are there any special rules for using the modulo operation?

Yes, there are a few special rules for using the modulo operation. When using it with negative numbers, the result will always be positive. Additionally, the result of the modulo operation will always be less than the second number being divided.

5. How does the modulo operation differ from division?

The modulo operation differs from division in that it only calculates the remainder, while division calculates the quotient. For example, 10 / 3 would result in a quotient of 3 and a remainder of 1, while 10 % 3 would result in a remainder of 1.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
4
Views
740
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Introductory Physics Homework Help
Replies
12
Views
722
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
4K
  • Precalculus Mathematics Homework Help
2
Replies
39
Views
4K
  • Calculus and Beyond Homework Help
Replies
2
Views
993
Replies
3
Views
336
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
Back
Top