Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 4 - Elementary Number Theory and Methods of Proof - Exercise Set 4.4 - Page 190: 50

Answer

- **\((m+n) \mod d = a+b\)?** Not necessarily. It holds when \(a+b < d\), but if \(a+b \ge d\), then \((m+n) \mod d \neq a+b\) (since the remainder must be less than \(d\)). - **\((m+n) \mod d = (a+b) \mod d\)?** Yes. The proof shows that for any integers \(m, n, a, b,\) and \(d>0\) with \(m \mod d = a\) and \(n \mod d = b\), we have \[ (m+n) \mod d = (a+b) \mod d. \]

Work Step by Step

Let \( m, n, a, b, d \) be integers with \( d > 0 \) and suppose \[ m \mod d = a \quad \text{and} \quad n \mod d = b. \] This means that there exist integers \( q \) and \( r \) such that \[ m = qd + a \quad \text{and} \quad n = rd + b, \] with \(0 \le a, b < d\). ### Part 1: Is \((m+n) \mod d = a+b\)? Compute \(m+n\): \[ m+n = qd + a + rd + b = (q+r)d + (a+b). \] When we take \((m+n) \mod d\), we are interested in the remainder when \(m+n\) is divided by \(d\). The term \((q+r)d\) is divisible by \(d\), so \[ (m+n) \mod d = (a+b) \mod d. \] Notice that if \(a+b < d\), then \((a+b) \mod d = a+b\). However, if \(a+b \ge d\), then \((a+b) \mod d\) is not equal to \(a+b\) but rather to \(a+b-d\) (or more generally, the unique number in the set \(\{0,1,\ldots,d-1\}\) that is congruent to \(a+b\) modulo \(d\)). Thus, in general, **\((m+n) \mod d\) is not necessarily equal to \(a+b\)**; it equals \(a+b\) only in the case when \(a+b < d\). ### Part 2: Is \((m+n) \mod d = (a+b) \mod d\)? From the computation above, we obtained \[ (m+n) = (q+r)d + (a+b). \] Taking modulo \(d\), we get \[ (m+n) \mod d = (a+b) \mod d. \] This is true regardless of the size of \(a+b\).
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.