Professional Documents
Culture Documents
CHAPTER
7
Section 7.1 Modular Arithmetic
Introduction to Modular Arithmetic
Mathematical
Systems
Copyright © Cengage Learning. All rights reserved. Copyright © Cengage Learning. All rights reserved.
3
Figure 8.1B
Figure 8.1A
4 5 6
4/12/2022
Introduction to Modular Arithmetic Example 1 – Perform Clock Arithmetic Introduction to Modular Arithmetic
However, if the time now is 3 o’clock, then, using Figure Evaluate each of the following, where and indicate A similar example involves day-of-the-week arithmetic. If
8.2, we see that 7 hours ago it was 8 o’clock. If we use the addition and subtraction, respectively, on a 12-hour clock. we associate each day of the week with a number, as
symbol to denote subtraction on a 12-hour clock, we can a. b. b. c. c. d. shown below, then 6 days after Friday is Thursday and 16
write days after Monday is Wednesday.
and Solution:
Calculate using a 12-hour clock.
a.
b.
c. Symbolically, we write
Figure 8.2
and
d.
7 8 9
Introduction to Modular Arithmetic Introduction to Modular Arithmetic Example 2 – Determine Whether a Congruence Is True
Note: We are using the symbol for days-of-the-week Situations such as these that repeat in cycles are Determine whether the congruence is true.
arithmetic to differentiate from the symbol for clock represented mathematically by using modular arithmetic, a. 29 8 mod 3
arithmetic. or arithmetic modulo n. b. 15 4 mod 6
Solution:
a. Find Because 7 is an integer,
29 8 mod 3 is a true congruence.
10 11 12
4/12/2022
Introduction to Modular Arithmetic Example 3 – A Day of the Week Example 3 – Solution cont’d
Now suppose today is Friday. To determine the day of the July 4, 2017, was a Tuesday. What day of the week is Because 1826 ÷ 7 = 260 remainder 6, 1826 6 mod 7. Any
week 16 days from now, we observe that 14 days from now July 4, 2022? multiple of 7 days past a given day will be the same day of
the day will be Friday, so 16 days from now the day will be the week.
Sunday. Solution:
There are 5 years between the two dates. Each year has So the day of the week 1826 days after July 4, 2017, will be
Note that the remainder when 16 is divided by 7 is 2, or, 365 days except 2020, which has one extra day because it the same as the day 6 days after July 4, 2017. Thus July 4,
using modular notation, 16 2 mod 7. The 2 signifies 2 is a leap year. 2022, will be a Monday.
days after Friday, which is Sunday.
So the total number of days between the two dates is
5 365 + 1 = 1826.
13 14 15
The answer is 1.
16 17 18
4/12/2022
Solution:
Trying the whole number values of x less than 5, the
a. Subtract The result is positive. Divide the modulus, we find that when x = 2,
difference by the modulus, 6. The answer is the
remainder.
22 23 24
4/12/2022
The answer is 4. 25 26 27
Solving Congruence Equations Example 8 – Solve a Congruence Equation Example 8 – Solution cont’d
Solve: 2x + 1 3 mod 10
Solution:
Beginning with 0, substitute each whole number less than
10 into the congruence equation.
Additive and Multiplicative Inverses in Modular Arithmetic Example 9 – Find the Additive Inverse
We have known that if the sum of two numbers is 0, then Find the additive inverse of 7 in mod 16 arithmetic.
the numbers are additive inverses of each other. For
instance, 8 + (–8) = 0, so 8 is the additive inverse of –8, Solution:
and –8 is the additive inverse of 8.
In mod 16 arithmetic, so the additive inverse of
7 is 9.
Additive and Multiplicative Inverses The same concept applies in modular arithmetic. For
example, (3 + 5) 0 mod 8. Thus, in mod 8 arithmetic, 3 is
in Modular Arithmetic the additive inverse of 5, and 5 is the additive inverse of 3.
Here we consider only those whole numbers smaller
than the modulus.
31 32 33
Additive and Multiplicative Inverses in Modular Arithmetic Example 10 – Find a Multiplicative Inverse Example 10 – Solution cont’d
If the product of two numbers is 1, then the numbers are In mod 7 arithmetic, find the multiplicative inverse of 2.
multiplicative inverses of each other.
Solution:
For instance, , so 2 is the multiplicative inverse of To find the multiplicative inverse of 2, solve the equation
, and is the multiplicative inverse of 2. The same 2x 1 mod 7 by trying different natural number values of x In mod 7 arithmetic, the multiplicative inverse of 2 is 4.
concept applies to modular arithmetic (although the less than the modulus.
multiplicative inverses will always be natural numbers).
34 35 36
4/12/2022
CHAPTER
7
Section 7.2 Applications of Modular
Arithmetic
ISBN and UPC
Mathematical
Systems
Copyright © Cengage Learning. All rights reserved. Copyright © Cengage Learning. All rights reserved.
3
The first three digits of an ISBN are 978 (or 979), followed Correct ISBN: 978-0-395-82517-4
by 9 digits that are divided into three groups of various Incorrect ISBN: 978-0-395-28517-4
lengths. These indicate the country or region, the publisher,
and the title of the book. The last digit (the 13th one) is It is this check digit that is used to ensure accuracy.
called a check digit. The receiving clerk calculates the check digit as 6.
4 5 6
4/12/2022
ISBN and UPC Example 1 – Determine a Check Digit for an ISBN ISBN and UPC
Because the check digit is 6 and not 4 as it should be, the Determine the ISBN check digit for the book The Equation Another coding scheme that is closely related to the ISBN
receiving clerk knows that an incorrect ISBN has been that Couldn’t Be Solved by Mario Livio. The first 12 digits of is the UPC (Universal Product Code). This number is
sent. the ISBN are 978-0-7432-5820-? placed on many items and is particularly useful in grocery
stores.
Transposition errors are among the most frequent errors Solution:
that occur. A check-out clerk passes the product by a scanner, which
reads the number from a bar code and records the price on
the cash register.
The ISBN coding system will catch most of them.
In addition to pricing items, the UPC gives the store Find the check digit for the UPC of the Blu-ray Disc
manager accurate information about inventory and the release of the film Jurassic World. The first 11 digits are
buying habits of the store’s customers. 0-25192-21221-?
13 14 15
Determine whether 5234 8213 3410 1298 is a valid credit Finally, add all digits, treating two-digit numbers as two
card number. single digits.
Solution:
Highlight every other digit, beginning with the next-to-last
digit and reading from right to left. Cryptology
Because 60 0 mod 10, this is a valid credit card number.
16 17 18
4/12/2022
The original alphabet and the substitute alphabet are If a cryptologist thinks a message has been encrypted Use the cyclical alphabetic encrypting code that shifts each
shown below. using a cyclical substitution code like the one shown letter 11 positions to
previously, the key to the code can be found by taking a
word from the message (usually one of the longer words) a. code CATHERINE THE GREAT.
and continuing the alphabet for each letter of the word.
b. decode TGLY ESP EPCCTMWP.
22 23 24
4/12/2022
Solution:
Solution:
Solve the congruence equation for p.
The encrypting congruence is c (5p + 2) mod 26. Replace
p by the numerical equivalent of each letter from Table 8.1
and determine c.
Continuing, the plaintext is coded in ciphertext as JGSAN
DNUTXAN.
31
4/12/2022
CHAPTER
7
Section 7.3 Introduction to Group
Theory
Introduction to Groups
Mathematical
Systems
Copyright © Cengage Learning. All rights reserved. Copyright © Cengage Learning. All rights reserved.
3
The second requirement of a group is that the operation The number 0 is called an additive identity and the number
must satisfy the associative property. 1 is called a multiplicative identity. An identity element does
not always have to be zero or one.
We have known that the associative property of addition The last requirement of a group is that each element must
states that . have an inverse.
4 5 6
4/12/2022
Symmetry groups are based on regular polygons. A For instance, we can pick up the triangle and replace it
regular polygon is a polygon all of whose sides have the exactly as we found it. We will call this position I; it will
same length and all of whose angles have the same represent no change in position.
measure.
10 11 12
4/12/2022
For rotation Rr, the bottom right vertex does not change,
but vertices 1 and 2 are interchanged. As we will see, these rotations are elements that form a
group.
16 17 18
4/12/2022
19 20 21
Solution:
To find the result of R120Rt, we follow the movement of
each vertex. The path that vertex 2 follows is highlighted.
Permutation Groups
22 23 24
4/12/2022
Example 4 – Perform an Operation in a Permutation Group Example 4 – Solution Example 4 – Solution cont’d
Find BC, where B and C are elements of the permutation When these actions are combined, 3 remains as 3. The
group defined as
result of the operation is