Modular Arithmetic Proof: How to Solve with Help | Homework Statement

  • Thread starter Thread starter JPanthon
  • Start date Start date
  • Tags Tags
    Arithmetic Proof
Click For Summary

Homework Help Overview

The discussion revolves around a proof in modular arithmetic involving integers a, b, and n, where n is greater than or equal to 2. The original poster seeks to prove that the sum of two integers modulo n can be expressed as the sum of their individual remainders modulo n.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the meaning of modular arithmetic and how to express integers in terms of their remainders. The original poster attempts to manipulate the expressions for a and b in terms of their remainders, but expresses uncertainty about the next steps. Others suggest clarifying the definitions and implications of modular operations.

Discussion Status

Some participants have provided insights into the nature of modular arithmetic and how to approach the proof. There is a mix of interpretations regarding the steps needed to complete the proof, with some participants offering examples and philosophical reflections on the learning process. The discussion remains open, with no explicit consensus reached.

Contextual Notes

Participants note the importance of understanding the definitions of modular arithmetic and the implications of adding remainders. There is an emphasis on exploring examples to clarify the concepts involved.

JPanthon
Messages
20
Reaction score
0

Homework Statement



Suppose a, b, n are integers with n >/= 2
Prove that:


(a + b) mod n = ((a mod n) + (b mod n)) mod n



Homework Equations



Modular arithmetic rules.

The Attempt at a Solution



r1 = a(modn)
=> a = q1n + r1

r2 = bmodn
=> b = q2n + r2

r1 + r2 = a - q1n + b - q2n
= (a + b) + (-q1 - q2)n



Here is where I have no idea where to go. :S
 
Physics news on Phys.org
Hi JPanthon! :smile:

This is where you are done.
(a mod n) means "a" plus an integer times "n".
You have proven that (a mod n) plus (b mod n) equals (a+b) plus an integer times n, which is what you had to prove. :wink:
 
I like Serena said:
Hi JPanthon! :smile:

This is where you are done.
(a mod n) means "a" plus an integer times "n".
You have proven that (a mod n) plus (b mod n) equals (a+b) plus an integer times n, which is what you had to prove. :wink:

Thank you for your reply :)

So, "((a mod n) + (b mod n)) mod n" means (a+b) plus an integer times n?

Could you help me see this?
 
In math, (a mod n) means the set of "a plus any integer times n", also denoted as: \bar a = \{ a + q n| q \in \mathbb Z \}
(b mod n) means "b plus any integer times n".
((a+b) mod n) meant "a+b plus any integer times n".

It should be clear that if you add the first two, you get something that is the same as the third.

Edit: The way to prove it, is to write out what (a mod n) means, which is a+q1n, add it to b+q2n, and show that it can be written as (a+b)+q3n.
 
I like Serena said:
In math, (a mod n) means the set of "a plus any integer times n", also denoted as: \bar a = \{ a + q n| q \in \mathbb Z \}
(b mod n) means "b plus any integer times n".
((a+b) mod n) meant "a+b plus any integer times n".

It should be clear that if you add the first two, you get something that is the same as the third.

Edit: The way to prove it, is to write out what (a mod n) means, which is a+q1n, add it to b+q2n, and show that it can be written as (a+b)+q3n.

Thank you again. If you would just help me once more.

It's this part I don't understand: ((a mod n) + (b mod n)) mod n

I understand how I've proven (a+b)modn = a(modn) + b(modn) ,
but not a(modn) + b(modn) = ((amodn) + b(modn)) modn
 
Not boasting but frankly this is obvious to me. We'd like it to be obvious to you.

(a mod n) + (b mod n) means you divide one number a by n and you get a remainder, you divide another number b by n and you get another remainder. The sum of these remainders you'd expect to be the same as what you'd get if you, to save time, divided (a + b) by n.
Except if this sum turned out equal or bigger than n, in which case to get it (mod n) you'd subtract n from it in that case, so that's your [a (mod n) + b (mod n)](mod n) .

I hope that's obvious, and if not do what will help you in a lot of cases like this, do a simple example - let for example n be 7. Let a be 8 and b 9. Let a be 13 and b be 12. Then you'll have and example of both cases I just mentioned.

Notice that the final (mod n) is kind of overpowered. You're only ever going to get zero or one notches above n IYKWIM. Using a simple example to clarify is one technique suggested by Polya in his little book 'How to solve it'. But another thing he says is 'when you've solved the prob the job's not finished'. Think how could you naturally extend this. What about (a + b + c) (mod n)? Or something more general. If you got the habit of thinking that sort of thing right through, you'd begin to feel confident and on top.

A lot of students here sound to me as if they had their noses one inch in front of the paper with the problem and it intimidates them. Learning is being discussed on another thread, and although exercises and active work are necessary, I tend to agree with this:
timsea81 said:
It's more philosophical than the computational math you're probably used to, so don't feel like you're wasting time by just carefully thinking about the problem without writing anything down. Hope that helps.
 
Later I thought of this simple thing.

You have been doing modular arithmetic for a long time.

In ordinary addition of numbers the last digit of a sum is the sum (mod 10).

Or if you bring together your cents from here and there and you can change every 100c into a dollar bill, then the small change, the coins you have left is the sum (mod 100).

The theorem is obvious in these cases and so are the extensions I mentioned, or if it isn't try a few examples.
 
I see epenguin already explained it.

I'd like to add that the reason you're getting this sort of problem, is due to the following.

Suppose you need to calculate ((13 + 9) mod 8), with possibly numbers that are much larger.

What you need to know, is that:
((13 + 9) mod 8) = (((13 mod 8) + (9 mod 8)) mod 8) = ((5 + 1) mod 8) = (6 mod 8)

But of course you can only use this, if you can be sure it is true, which it is.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
6
Views
3K