<<

3/1/2019 Print Preview

Chapter 8: Mathematical Systems Operations Book Title: Mathematical Excursions Printed By: Jean Nicolas Pestieau ([email protected]) © 2018 Cengage Learning, Cengage Learning

Arithmetic Operations Modulo

In Example 2a we verified that . (Both and have when divided by , the modulus.) There are many other congruent to modulo , but of all these, only one is a whole less than the modulus. This number is the result when evaluating a modulo expression, and in this case we use an equal sign. Because and is less than the modulus, we can write . In general, becomes the remainder when is divided by .

Arithmetic modulo (where is a ) requires us to evaluate a modular expression after using the standard rules of arithmetic. Thus we perform the arithmetic operation and then divide by the modulus. The answer is the remainder. The result of an arithmetic operation is always a whole number less than .

Take Note

Recall that the natural numbers are the usual counting numbers: The set of whole numbers consists of the natural numbers and zero.

Example 4

Addition Modulo

Evaluate:

Solution

Add to produce . To evaluate , divide by the modulus, . The answer is the remainder.

The answer is .

Check Your Progress 4 https://mindtap.cengage.com/static/nb/ui/evo/index.html?eISBN=9780357048320&id=339189958&nbId=876894&snapshotId=876894&dockAppUid=101& 1/5 3/1/2019 Print Preview Evaluate:

In , adding the modulus to a number does not change the equivalent value of the number. For instance,

To understand why the value does not change, consider and . That is, in arithmetic, is equivalent to ; in arithmetic, is equivalent to . Just as adding to a number does not change the value of the number in regular arithmetic, in modular arithmetic adding the modulus to a number does not change the value of the number. This property of modular arithmetic is sometimes used in .

It is possible to use negative numbers modulo . For instance,

Suppose we want to find so that . Using the definition of modulo , we need to find so that is an . To do this, rewrite the expression and then try various values of from to the modulus until the value of the expression is an integer.

It may be necessary to use this idea when subtracting in modular arithmetic.

Example 5

Subtraction Modulo

Evaluate each of the following.

a. https://mindtap.cengage.com/static/nb/ui/evo/index.html?eISBN=9780357048320&id=339189958&nbId=876894&snapshotId=876894&dockAppUid=101& 2/5 3/1/2019 Print Preview b.

Solution

a. Subtract . The result is positive. Divide the difference by the modulus, . The answer is the remainder.

b. Subtract . Because the answer is negative, we must find so that . Thus we must find so that the value of

is an integer. Trying the whole number values of

less than , the modulus, we find that when , .

Check Your Progress 5

Evaluate:

The methods of adding and subtracting in modular arithmetic can be used for clock arithmetic and days-of-the-week arithmetic.

Example 6

Calculating Times

Disregarding A.M. or P.M., if it is 5 o’clock now, what time was it hours ago?

Solution

The time can be determined by calculating . Because is a negative number, find a whole number less than the modulus , so that

. This means to find so that is an integer. Evaluating the expression for whole number values of less than , we have, https://mindtap.cengage.com/static/nb/ui/evo/index.html?eISBN=9780357048320&id=339189958&nbId=876894&snapshotId=876894&dockAppUid=101& 3/5 3/1/2019 Print Preview

when , , an integer. Thus . Therefore, if it is 5 o’clock now, hours ago it was 8 o’clock.

Take Note

In Example 6, repeatedly adding the modulus to the difference results in the following.

Check Your Progress 6

If today is Tuesday, what day of the week will it be days from now?

Problems involving can also be performed modulo .

Example 7

Multiplication Modulo

Evaluate:

Solution

Find the and then divide by the modulus, . The answer is the remainder.

https://mindtap.cengage.com/static/nb/ui/evo/index.html?eISBN=9780357048320&id=339189958&nbId=876894&snapshotId=876894&dockAppUid=101& 4/5 3/1/2019 Print Preview The answer is .

Check Your Progress 7

Evaluate:

Chapter 8: Mathematical Systems Arithmetic Operations Modulo Book Title: Mathematical Excursions Printed By: Jean Nicolas Pestieau ([email protected]) © 2018 Cengage Learning, Cengage Learning

© 2019 Cengage Learning Inc. All rights reserved. No part of this work may by reproduced or used in any form or by any means - graphic, electronic, or mechanical, or in any other manner - without the written permission of the copyright holder.

https://mindtap.cengage.com/static/nb/ui/evo/index.html?eISBN=9780357048320&id=339189958&nbId=876894&snapshotId=876894&dockAppUid=101& 5/5