Does this have any meaning:x = (-6) mod 5Is it just like:x = -(6

  • Thread starter Chen
  • Start date
Thanks for the help!In summary, the conversation discusses the meaning of various expressions involving the modulus operator, including (-6) mod 5, -(6 mod 5), 6 mod (-5), and 6 mod (5/2). It is determined that x = 6 mod (-5) is equivalent to 6 = x mod (5). There is also a discussion about extending modulus arithmetic to include real numbers, particularly in the context of quantum cryptography, and the importance of being careful when doing so. The conversation also touches on proving various properties of the modulus operator, such as xmk mod k = 1, and the use of Euler's totient function and Fermat's Little Theorem in this proof.
  • #1
Chen
977
1
Does this have any meaning:
x = (-6) mod 5
Is it just like:
x = -(6 mod 5)
Or what about:
x = 6 mod (-5)
And:
x = 6 mod (5/2)
 
Mathematics news on Phys.org
  • #2
Chen said:
1.Does this have any meaning:
x = (-6) mod 5
2.Is it just like:
x = -(6 mod 5)
3.Or what about:
x = 6 mod (-5)
4.And:
x = 6 mod (5/2)
1.yes
2. don't think so.
3.x=6 mod(-5) is like 6=x mod(5)

btw in the quote i put numbers near your questions.
 
  • #3
What's the result then of (-6) mod 5 and why is it different than -(6 mod 5)? And what about mod (5/2)?

Thanks,
 
  • #4
x = -6 (mod 5) is equivalent to x + 6 = 0 (mod 5), or x + 1 = 0 (mod 5). It's obviously not uniquely determined, but the smallest positive x that'll work is x = 4.

Personally, I'd say that -(6 (mod 5)) = -(1) = -1, which is not 4 ;) But I don't know, I've never seen an expression like that.

And about x = 6 mod (5/2), it's the same as saying x - 6 = 0 (mod 5/2), or x - 6 is divisible by 5/2. How do you propose we define "divisibility" in the rational numbers...? Seems like nonsense to me :)
 
Last edited:
  • #5
a ≡ b(mod n) can be extended to include cases where a and b are real numbers, for example: 5.74 ≡ -3.26(mod 3), but n must be a natural number.
 
Last edited:
  • #6
muzza got to you first in the post. (:
btw chen i see a pattern in your posts (perhaps is just my imagination) have you recently read the book of simon singh called: "secrets of encryption (or is it decryption)" because in this book theere's a brief overview of modulus and quantum cryptography.

anyway if you haven't read the book you should, it's a great book.
 
  • #7
I read The Code Book (that the original name, it got changed in the translation to Hebrew) not so recently - last summer. But I've applied to the Technyon's excellence program and the next step is to prepare a lecture about a scientific subject of some sort... so I chose quantum cryptography, but in the process I also talk about classical cryptography (RSA, Diffie-Helllman) so I want to make sure I understand everything. :smile: Unfortunately I don't have the book right now, it was my friend's, so I'm trying to recollect what I read. If you want I can send you the paper once I'm done...

Good guess, by the way... :biggrin:
 
Last edited:
  • #8
4 is congruent to -1 is congruent to - 6 mod 5, they are all the same mod 5.

remeber that when you write 1 in mod five you actually mean the equivlance class [1], so that [4]=[-1]=[-6], note that -[r]=[-r].

You should not extend modulo arithemetic without care beyond the integers, otherwise you WILL hit problems, particularly mod a composite: you are implying that 1/3 exists mod 6, and is not zero, but 3 has no multiplicative inverse mod 6
 
  • #9
Alright, thanks. :smile: I was just wondering really how far you can take this action.

One more thing, how can I prove that xmk mod k = 1 for every x, m and k? I hope it's not too complicated.
 
  • #10
Chen said:
Alright, thanks. :smile: I was just wondering really how far you can take this action.

One more thing, how can I prove that xmk mod k = 1 for every x, m and k? I hope it's not too complicated.


you can't prove it because it's not true. counter example x=k any k. if we force x to be non-zero then x=2, k=4, m=anything.

what is true is if k is a prime then x^k=x mod k for all x, or if you prefer x^{k-1}=1 mod k for all non-zero x k a prime - fermat's little theorem.

more generally, if x and k are coprime then x^{\phi(k)}=1 mod k, where phi is euler's totient function. the proofs are in any elementary number theory/group theory book.
 
  • #11
Hmm, that's right. I tried to simplify the problem but I made a mistake along the way. I'll look for the complete proof somewhere else, I imagine it's long.
 
  • #12
Look up some book on elementary number theory. Should cover congruences pretty early

P.S : I've read the Code Book too - in fact, I have it. Was quite fun. There's another book I have at home that goes through the math needed to understand how RSA works. I'll tell you what it's called when I get home. You should be able to find it in a library.
 
Last edited:
  • #13
Actually I found a proof here:
http://cs.colgate.edu/faculty/stina/courses/core/139/s04/notes/rsa-proof.doc
It does skip two steps (gcd(a,b) = xa + yb and Euler's theorem that if m and n are two relatively prime positive integers, then m[itex]\phi[/itex](n) mod n = 1), but I think I will be able to recover that from somewhere else. :smile:
 
Last edited by a moderator:
  • #14
given the k of mod k, the elements prime to it of 1,2,...,k-1 form a group of rder \phi(k), so fermat's (extended) little theorem follows from lagrange's theorem for groups (for any finite group, the order of the element divides the order of the group). that they form a group (under multiplication obviously) follows constructively from the euclidean algorithm which constructs explicitly the x and y needed in gcd(a,b)=ax+by in your above post
 
  • #15
"The Mathematics of Ciphers - Number Theory and RSA Cryptography" by S.C. Coutinho
 

1. What does "x = (-6) mod 5" mean?

The expression "x = (-6) mod 5" means that x equals the remainder when -6 is divided by 5. In other words, it is the number that is left over after dividing -6 by 5.

2. How is "x = (-6) mod 5" different from "x = -(6"?

The two expressions are not equivalent. "x = -(6" is not a complete mathematical expression and does not have a clear meaning. On the other hand, "x = (-6) mod 5" is a valid mathematical expression with a specific meaning.

3. Can x be a negative number in "x = (-6) mod 5"?

Yes, x can be a negative number in this expression. The result of a mod operation can be positive or negative, depending on the sign of the dividend (in this case, -6).

4. What is the purpose of using "mod" in mathematical expressions?

The "mod" (short for modulo) operation is used to find the remainder after dividing two numbers. It is commonly used in various mathematical concepts, such as number theory, algebra, and cryptography.

5. How do you calculate "x = (-6) mod 5"?

To calculate "x = (-6) mod 5", you can use the following steps:

  1. Divide -6 by 5. The quotient is -1 and the remainder is -1.
  2. Since the remainder is negative, add the divisor (5) to the remainder (-1). The result is 4.
  3. Therefore, x = 4.

Similar threads

Replies
5
Views
837
Replies
5
Views
2K
  • General Math
Replies
3
Views
1K
  • General Math
Replies
1
Views
1K
Replies
3
Views
461
  • General Math
Replies
3
Views
864
Replies
1
Views
900
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
11
Views
1K
  • General Math
Replies
5
Views
1K
Back
Top