GROUP 6 PPT - MODULE 4 - 20241029 - 083830 - 0000 - Compressed
GROUP 6 PPT - MODULE 4 - 20241029 - 083830 - 0000 - Compressed
GROUP 6 PPT - MODULE 4 - 20241029 - 083830 - 0000 - Compressed
MEMBERS
NUMBER REMAINDER
INTEGERS THEORY
PRIVACY THEOREM
8 r. 4 66 r. 8
100 800
12 96
12 792
4 8
DON'T GET CONFUSED! 12-11 and 0-11 are the same,
it's just that 0-11 hours are more convenient to use in
modular arithmetic because of remainders.
Determining time and day using modular arithmetic
• If we want to determine a time in the future or in the
past, It's necessary to consider whether we have passed
12 o'clock.
Division
Addition or Subtraction (Gettting the remainder)
Examples:
3+8= 11 o'clock
8-5= 3 o'clock
Examples:
1. If it's 11 o'clock and you have to finish your
homework in 18 hours, what hour will be at that
time?
1) 11+18= 29
2 r. 5
29
2) 12 24
5
= 5 o'clock
Try This!
2) 12 30
24
2) 12 18
12
6 6
= 6 o'clock = 6 o'clock
Determining the day of the week using modular arithmetic
1) 5+15= 20
2 r. 6
20
2) 7 14
6
=Sunday
Assigned number for each day of the week
Modular Arithmetic
•Two integers a and b are said to be congruent modulo n, where
n € N, if 𝑎−𝑏/𝑛 is an integer.
Two integers ( a ) and ( b ) are said to be congruent
a-b modulo ( n ) if their difference ( a - b ) is divisible by (
n n ). In other words, when you subtract ( a ) from ( b ),
the result is a multiple of ( n ).
Illustration: a = 17 b = 5 n = 6
a-b 17-5 12
n
= = = 2 17 ≡ 5 mod 6
6 6
•In this case, we write a ≡ b (mod n). The number n is called the
modulus. The statement a ≡ b (mod n) is called a congruence.
•So, looking back in our clock arithmetic, instead of 13 = 1, in
modular arithmetic we write 13 ≡ 1 (mod 12) and read it “13 is
congruent to 1 modulo 12” or, to abbreviate, “13 is 1 modulo 12”.
Examples:
1. 22 ≡ 14 mod 8
8 | 22-14 22-14 is a multiple of 8; since 22-14= (8)(1)
2. 26 ≡ 10 mod 8
8 | 26-10 26-10 is a multiple of 8; since 26-10= 16 (8)(2)
Modulo Addition Table
Here we have: a= 18 b= 12 n= 3
a) a ≡ a (mod n) Reflexive
Reflexive property states that any number is equal or
congruent to itself. It’s always equals to 0.
6 ≡ 6 (mod 2)
Proof:
2 | 6-6
2|0=0
e) Assume that a ≡ b(mod n). We know that c ≡ c (mod n). Then, ac ≡ bc (mod n)
Multiplication
The multiplication property of congruence modulo states that if two
integers (a) and (b) are congruent to two other integers (c) and (d)
respectively, modulo (n), then their products are also congruent modulo
(n).
Theorem: Properties in Congruence
Proof:
2| 31-13 31•3= 93 13•3 = 39
2 | 18 = 9 3 | 93= 31 3 | 39= 13
a≡b mod n
(a+b) mod n
In modular arithmetic, adding the modulus to a number does
not change the equivalent value of the number. For instance;
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7)
27 ≡ 6 (mod 7)
In modular arithmetic, adding the modulus to a number does
not change the equivalent value of the number. For instance;
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7)
27 ≡ 6 (mod 7)
1. (46 + 53)mod 8 =
In modular arithmetic, adding the modulus to a number does
not change the equivalent value of the number. For instance;
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7)
27 ≡ 6 (mod 7)
1. (46 + 53)mod 8 = 3
In modular arithmetic, adding the modulus to a number does
not change the equivalent value of the number. For instance;
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7)
27 ≡ 6 (mod 7)
1. (46 + 53)mod 8 = 3
2. (43 + 29)mod 10 =
In modular arithmetic, adding the modulus to a number does
not change the equivalent value of the number. For instance;
13 ≡ 6 (mod 7)
20 ≡ 6 (mod 7)
27 ≡ 6 (mod 7)
1. (46 + 53)mod 8 = 3
2. (43 + 29)mod 10 = 2
Subtraction
Modulo n
(a−b) mod n
(33 – 16) mod 6
First, subtract 16 from 33:
33 - 16 = 17 (positive result).
(a×b) mod n
Like in addition and subtraction, let us evaluate given example
under multiplication modulo n to perform the operation
multiplication.
a+x ≡ 0 modn
a×x≡ 1 mod n
ADDITIVE INVERSES
Recall that if the sum of two numbers is zero (0),i.e.
a + (-a) = 0, then the numbers are additive inverses of each
other.
3+5 = 8
5+3 = 8
Find the additive inverse of 7 in mod 16 arithmetic.
Find the additive inverse of 7 in mod 16 arithmetic.
7+x ≡ 0 (mod 16)
7+9 = 16 ≡ 0 (mod 16)
MULTIPLICATIVE INVERSES
If the product of two number is 1, then the numbers are multiplicative inverses
of each other. This is one of the properties of real number, i.e.,
(𝑎) ( 1 /𝑎 ) = 1 .
The same concept applies to modular arithmetic (although the multiplicative
inverses will always be natural number).
Conclusion:
The values of x that satisfy the congruence equation 3x + 5 ≡ 3 mod 4
are x = 2 and x = 6.
Example: Solve 3x + 4 = 2x + 8 (mod 9)
Lesson Applications of
4.3 Modular Arithmetic
Intended Learning Outcomes
1. To apply the concept of modular arithmetic to determine the validity
of a certain serial number such the UPC, ISBN and the credit card.
FIND: MODULO 5
FIND: MODULO 5
Solution:
d12 = 10 – (3d1 + d2 + 3d3 + d4 + 3d5 + d6 + 3d7 + d8 + 3d9 + d10 + 3d11)mod 10
d12 = 10 – (136)mod 10
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
LET’S TRY THIS!
The staple wire has a bar code of 9-02870-766290. Is the UPC number of this
product a valid number?
Solution:
d12= 4 0
Since the computed check digit is not the last digit in a given code, therefore the bar
code is not valid.
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
LET’S TRY THIS!
A certain product has a bar code 4-804888-9027-8. Is the product code valid?
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
LET’S TRY THIS!
A certain product has a bar code 4-804888-9027-8. Is the product code valid?
Solution:
d12 = 10 – (112)mod 10
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
LET’S TRY THIS!
A certain product has a bar code 4-804888-9027-8. Is the product code valid?
Solution:
d12= 8 = 8
Since the computed check digit is the last digit in a given code, therefore the bar
code is valid.
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
The primary coding method is based on the Luhn Algorithm, which
uses mod 10 arithmetic. Credit card is usually or normally have 13
to 16 digits long. The first one to six digits are used to identify the
card issuer. The table below shows some of the identification
prefixes used by four popular card issuers. .
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
LUHN ALGORITHM
4. Find the sum of the new list of digits. The final sum must
be congruent to 0 mod 10.
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
=10 2 6 4 16 2 2 3 6 7 2 1 0 2 2 0
UNIVERSAL PRODUCT CODE (UPC) AND CREDIT CARD
=10 2 6 4 16 2 2 3 6 7 2 1 0 2 2 0
=(1+0) + 2 + 6 + 4 + (1+6) + 2 + 2 + 3 + 6 + 7 + 2 + 1 + 0 + 2 + 2+ 0
=1+ 2 + 6 + 4 + 7 + 2 + 2 + 3 + 6 + 7 + 2 + 1 + 0 + 2 + 2+ 0
=47
Since 47 0 mod 10, this is not a valid card number.
C. Cryptology and Cryptography
C. CRYPTOLOGY AND CRYPTOGRAPHY
Another usage of modular arithmetic is
cryptography. But what is the difference between
cryptology and cryptography?
Cryptology Cryptograpy
cryptography is the
the study of codes art of writing and
solving them.
C. CRYPTOLOGY AND CRYPTOGRAPHY
Try this out!
Try to decrypt the secret code of the riddles. In an
English alphabet, line up with wheels so that “a" lines
up with “R".
Riddle #1:
They come out at night without being called, and are lost in the
day without being stolen. What are they?
Answer: JKRI =
Riddle #2:
What has a face and two hands but no arms and legs?
Answer: TCFTB =
Riddle #3:
Why was the math book sad?
Answer: ZK YRU KFF DREP GIFSCVDJ =
C. CRYPTOLOGY AND CRYPTOGRAPHY
R→A E→N
S→B F→O
T→C G→P Riddle #1:
U→D H→Q
V→E I →R They come out at night without
being called, and are lost in the
W→ F J→S
day without being stolen. What are
X→G K→T they?
Y→H L→U Answer: JKRI =
Z→I M→ V
A→J N→W
B→K O→X
C→L P→Y
D→M Q→Z
C. CRYPTOLOGY AND CRYPTOGRAPHY
R→A E→N
S→B F→O Riddle #1:
T→C G→P
They come out at night without
U→D H→Q being called, and are lost in the
V→E I →R day without being stolen. What are
W→ F J→S they?
X→G
Y→H
K→T
L→U
Answer: JKRI =
STAR
Z→I M→ V
A→J N→W
J =S
B→K O→X K =T
C→L P→Y R =A
D→M Q→Z I =R
C. CRYPTOLOGY AND CRYPTOGRAPHY
R→A E→N
S→B F→O
T→C G→P Riddle #2:
U→D H→Q
V→E I →R What has a face and two hands
but no arms and legs?
W→ F J→S
Answer: TCFTB =
X→G K→T
Y→H L→U
Z→I M→ V
A→J N→W
B→K O→X
C→L P→Y
D→M Q→Z
C. CRYPTOLOGY AND CRYPTOGRAPHY
R→A E→N
S→B F→O Riddle #2:
T→C G→P
What has a face and two hands
U→D H→Q but no arms and legs?
V→E I →R Answer: TCFTB =
W→ F
X→G
J→S
K→T
Clock
Y→H L→U
Z→I
T=C
M→ V
A→J N→W C=L
B→K O→X F=O
C→L P→Y T=C
D→M Q→Z B=K
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT ( ENCRYPTION)
Formula:
c (p+m) mod 26
c=encrypted code
m=position/shifted position
p= no. corresponds to a letter in an Alphabet
n= 26(modulo)
C. CRYPTOLOGY AND CRYPTOGRAPHY
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT( ENCRYPTION)
LET’S TRY THIS: c (p+m) mod 26
Convert the plaintext“LOVE” into its ciphertext if each letter was shifted in
22 positions (m = 22)
For: L: For O:
c 8=H c 11 = K
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT( ENCRYPTION)
LET’S TRY THIS: c (p+m) mod 26
Convert the plaintext “LOVE” into its ciphertext if each letter was shifted in
22 positions (m = 22)?
FIND V: FIND E:
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT( ENCRYPTION)
LET’S TRY THIS: c (p+m) mod 26
Convert the plaintext “LOVE” into its ciphertext if each letter was shifted in
22 positions (m = 22)?
FIND V: FIND E:
c 18 = R c 1= A
HKRA
C. CRYPTOLOGY AND CRYPTOGRAPHY
Formula:
p (c+n) mod 26
c=encrypted code
m=position/shifted position
p= no. corresponds to a letter in an Alphabet
n= 26-m
Solving n:
n=26-m
C. CRYPTOLOGY AND CRYPTOGRAPHY
Code: H: n = 26 – 22 = 4, Code: K: n = 26 – 22 = 4,
p 12 = L p 15=0
C. CRYPTOLOGY AND CRYPTOGRAPHY
CIPHERTEXT-PLAINTEXT ( BREAKING ENCRYPTION)
LET’S TRY THIS: p (c+n) mod 26
Convert the ciphertext “HKRA” into its plaintext if each letter was shifted in
22 positions (m = 22)?
FIND:R FIND:A
C. CRYPTOLOGY AND CRYPTOGRAPHY
CIPHERTEXT-PLAINTEXT ( BREAKING ENCRYPTION)
LET’S TRY THIS: p (c+n) mod 26
Convert the ciphertext “HKRA” into its plaintext if each letter was shifted in
22 positions (m = 22)?
FIND:R FIND:A
Code: R: n = 26 – 22 = 4, Code: A: n = 26 – 22 = 4,
p 22mod 26 p 5mod 26
p 22 = V p 5=E
LOVE
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT ( ENCRYPTION BASED ON THE
CONGRUENCE)
Formula: NOTE: The ciphertext is the remainder of modulo
c (ap + m) mod 26
c=encrypted code
m=position/shifted position
p= no. corresponds to a letter in an Alphabet
a= any no. that have no common factor with 26
where a and 26 do not have a common factor. For example, “a” cannot be 14 because 14
and 26 have a common factor of 2. The reason why “a” and 26 cannot have a common
factor is related to the procedure for determining the decoding congruence.
C. CRYPTOLOGY AND CRYPTOGRAPHY
PLAINTEXT-CIPHERTEXT ( ENCRYPTION BASED ON THE
CONGRUENCE)
NOTE: The ciphertext is the
LET’S TRY THIS: c (ap + m) mod 26 remainder of modulo
Example: Use the congruence c (5p + 2) mod 26 to encode the
message LASER
ENCODING L INTO ENCRYPTION
p [21(c-2)mod26
C. CRYPTOLOGY AND CRYPTOGRAPHY
CIPHERTEXT-PLAINTEXT ( BREAKING ENCRYPTION BASED
ON THE CONGRUENCE)
Formula: p [t(c – m)] mod 26
Using this congruence, we can decode the ciphertext message JGSAN.
p [21(c – 2)] mod 26
DECODING J INTO PLAINTEXT
p (-21)mod 26 (-21)+26=5
p 5
A E
C. CRYPTOLOGY AND CRYPTOGRAPHY
CIPHERTEXT-PLAINTEXT ( BREAKING ENCRYPTION BASED
ON THE CONGRUENCE)
Formula: p [t(c – m)] mod 26
LET’ TRY THIS:
Using this congruence, we can decode the ciphertext message JGSAN.
DECODING N INTO PLAINTEXT
MODULO OPERATION
Facilitates the creation of repeating patterns, symmetry, and
dynamic variations that can enhance the overall visual
experience. Whether you're coding, painting, or designing
digitally, understanding and applying the modulo operation
can elevate your artwork.
Using addition, subtraction, and multiplication to create
patterns and designs known as modulo art.
D. MODULO OPERATION IN DESIGNING MODULO ART
Now, let us take a look once again our modulo 4 addition table .
Now, let us take a look once again our modulo 4 multiplication table .
Repeated
D. MODULO OPERATION IN DESIGNING MODULO ART
LATIN SQUARE DESIGN
The created pattern could be repeated, reflected or rotated.
Rotated
D. MODULO OPERATION IN DESIGNING MODULO ART
LATIN SQUARE DESIGN
The created pattern could be repeated, reflected or rotated.
Relected
Lesson
4.4
Group Theory
Intended Learning Outcomes:
1. Relate clock arithmetic into the fundamental concept of
group.
2. Explain the concept of group theory in permutatio
3. Define and differentiate group from an abelian group.
4. Name and list all the properties in order to days that
the elements in a given set could be said a group.
5. Show that the integers under its operation from a
group.
6. Define what an order of a group is.
7. Construct Cayley’s table
8. Explain what a symmetry of group and it’s symbolic notation is.
9. Compare and evaluate symmetry of group and its symbolic notation.
Introduction
4+3=
1-5=
4+3=0
1-5=3
Definition: Order of the group is just the number of element in a group and it is
denoted by |G|
Example:
D. Symbolic Notation The operation notation for symmetry triangle can be
presented into other notation called as symbolic notation and/or
permutation.
Example:
PADAYON, FUTURE ENGINEERS!
IT MAY BE HARD THIS TIME BUT IT WILL BE
WORTH IT.
LOVE, GROUP 6
Thank
you!!