Understanding the Addition Theorem for Modular Operations

  • Thread starter ajbiol
  • Start date
  • Tags
    Addition
In summary, the addition theorem states that for three integers x, y, and d where d is greater than 0, the modular operation (x+y)%d is equal to (x%d + y%d) %d. This can be proven by breaking down x and y into their respective quotients and remainders, and then simplifying the equation. The reason for ignoring the product of q(1)d and q(2)d is because d is zero modulo d, making the product equal to zero. This follows from the definition of x%d.
  • #1
ajbiol
3
0
Hello all,

I was wondering if someone can explain to me a step in a proof given to me by my professor in regards to a modular operation theorem.

Addition theorem: Given three integers x, y, d (d > 0), (x+y)%d = (x%d + y%d) %d

Proof:
Let x = q(1)d + r(1) and y = q(2)d + r(2).
We have (x+y)%d = (q(1)d + r(1) + q(2)d + r(2)) %d
= (r(1) + r(2)) %d
Therefore: (x+y)%d = (x%d + y%d) %d

I don't get how my professor jumped from (q(1)d + r(1) + q(2)d + r(2))%d to (r(1) + r(2))%d.

Is there a specific reason for why we just ignore the product of q(1)d and q(2)d?

Thank you in advance.
 
Physics news on Phys.org
  • #2
Is there a specific reason for why we just ignore the product of q(1)d and q(2)d?
The Big Idea is that d is zero modulo d, so q(1)d is zero because you're multiplying q(1) by zero.

As for the technical detail, doesn't the equality follow directly from the definition of x%d? If you don't think so, then please state what definition you are using, and apply that definition to the two sides of that equation.
 
  • #3
d has to be greater than zero in our given. so i don't believe q(1)d and q(2)d are negated because d is zero.

ajbiol said:
Addition theorem: Given three integers x, y, d (d > 0), (x+y)%d = (x%d + y%d) %d
 
  • #4
ajbiol said:
d has to be greater than zero in our given. so i don't believe q(1)d and q(2)d are negated because d is zero.
d is zero modulo d.
 
  • #5
oh i get it! ty ty!
 

What is modular operation?

Modular operation, also known as modular arithmetic, is a mathematical operation that deals with the remainder of a division between two numbers.

How does modular addition work?

Modular addition involves adding two numbers and then taking the remainder of that sum when divided by a third number, known as the modulus.

What is the purpose of modular addition?

Modular addition is often used in computer science and cryptography to perform operations on large numbers without the risk of overflow or underflow.

Can modular addition be used with negative numbers?

Yes, modular addition can be used with negative numbers. The result will be a positive number if the modulus is greater than the sum of the two numbers, or a negative number if the modulus is smaller than the sum.

Is modular addition commutative?

Yes, modular addition is commutative, meaning that the order of the numbers being added does not affect the final result. The same is true for modular multiplication.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
958
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Advanced Physics Homework Help
Replies
19
Views
818
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
617
  • Calculus and Beyond Homework Help
Replies
0
Views
158
  • Calculus and Beyond Homework Help
Replies
3
Views
556
  • Calculus
Replies
29
Views
708
Replies
3
Views
1K
Back
Top