Prove the statement below For all integers m and n and a pos

Prove the statement below:

For all integers m and n, and a positive integer d, (m + n) mod d = ((m mod d) + (n mod d)) mod d

Solution

Lets assume,

m = A*d + B, where B = m % d

n = C*d + D , where D = n % d

=> (m+n) = (A+C) * d + (B+D)

=> (m + n) % d = (A+C) * d % d + (B+D) % d

=> (m + n) % d = (B + D) % d

=> (m+n) % d = ( ( m % d) + (n % d) ) % d

Hence proved

Prove the statement below: For all integers m and n, and a positive integer d, (m + n) mod d = ((m mod d) + (n mod d)) mod dSolutionLets assume, m = A*d + B, wh

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site