Math 101 PPT 5 Codes
Math 101 PPT 5 Codes
Adapt.
Overcome.
CEFI is now ready.
MODULE 5 :
Codes
ISAAC M. SUBELDIA
College of Liberal Arts, Sciences, and Education
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Focus:
❑ Cryptography
❑ Modular Arithmetic
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
(practice and study of techniques for secure communication)
https://www.bartleby.com/subject/engineering/computer-
science/concepts/cryptography
LESSON:
Cryptography
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Cryptography
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Substitution Cypher
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Caeser Cypher
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Caeser Cypher
Use the Caesar cipher with shift of 3 to encrypt the message: “We ride at noon”.
We use the mapping above to replace each letter. W gets replaced with Z, and so forth. giving the
encrypted message:
“We ride at noon” = “ZH ULGH DW QRRQ”
Noticed that the length of the words could give an important clue to the cipher shift used. To
obscure the message, the letters are often rearranged into equal sized blocks.
Example: ZHU LGH DWQ RRQ
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
1. “I will do my best”
L ZLOO GR PB EHVW
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Transposition Cipher
LESSON:
Modular Arithmetic
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Modular Arithmetic
Mathematicians
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Practice: Modulo
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Equivalence Relations
The following are equivalent to each other and may be used
interchangeably.
𝐀 ≡ 𝐁 (𝐦𝐨𝐝 𝐂) 𝟏𝟑 ≡ 𝟐𝟑 (𝐦𝐨𝐝 𝟓)
A mod C = B mod C 13 mod 5 = 23 mod 5
𝐂ȁ 𝐀 − 𝐁 𝟓ȁ𝟏𝟑 − 𝟐𝟑
−10
(means that “A - B is divisible by C”) (5ȁ−10, = −2)
5
𝐀=𝐁+𝐊∗𝐂 𝟏𝟑 = 𝟐𝟑 + 𝐊 ∗ 𝟓
(We can satisfy this with K = -2;
(where K is some integer)
13 = 23 + (−2) ∗ 5)
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Solving Congruence
1. No Solution
2. One Solution
3. Many Solution
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
𝟐𝐱 ≡ 𝟓𝟏 (𝐦𝐨𝐝 𝟖)
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
7 = 1, 7
1 Solution:
b = 7t + 3
will 1 divide 26 exactly? b = 7(0) + 3
YES, Therefore it has 1 SOLUTION. b=3
𝐱 ≡ 𝐛 𝐦𝐨𝐝 𝐂
𝐱 ≡ 𝟑 𝐦𝐨𝐝 𝟕
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
EXAMPLE:
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
A. In Z8
4 + 9 = 13. Since 13 divided by 8 is 1 with remainder 5, so 4 + 9 mod 8 = 5
1. 4 + 9
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Modular Multiplication
Multiplication property of modular arithmetic:
(A * B) mod C = (A mod C * B mod C) mod C
EXAMPLE:
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
A. In Z8
12 * 3 = 36. Since 36 divided by 8 is 4 with remainder 4, so 12 * 3 mod 8 = 4
1. 12 * 3
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Binary System
❑ Developed by Gottfried Wilhelm Leibniz, a German
mathematician.
❑ Binary numeral system, a method of mathematical
expression which uses only two symbols: typically "0" (zero)
and "1" (one).
❑ Here each new digit is 2x greater than the digit to its right.
Example: 10011011
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
COLLEGE OF LIBERAL ARTS, SCIENCES, & EDUCATION
Calayan Educational Foundation, Inc.
Quiz
1. Quiz 5: Modular ARithmetic
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.
Thank You!
No part of this material may be reproduced, stored in a retrieval system or transmitted in any form or by any means – electronic, mechanical, photocopying, recording
or otherwise, without permission in writing from the author or lecturer.