Mod arithmetic.

Slides:



Advertisements
Similar presentations
Division & Divisibility. a divides b if a is not zero there is a m such that a.m = b a is a factor of b b is a multiple of a a|b Division.
Advertisements

Chapter 4 Finite Fields. Introduction of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key concern operations on “numbers”
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Prime and Composite Numbers
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
Converting Numbers Between Bases. While the quotient is not zero…  Divide the decimal number by the new base.  Make the remainder the next digit to.
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Cyclic Groups. Definition G is a cyclic group if G = for some a in G.
Number System Conversions Lecture L2.2 Section 2.3.
Patterns and Sequences. Patterns refer to usual types of procedures or rules that can be followed. Patterns are useful to predict what came before or.
Objective: Learn to multiply and divide integers.
A number that divides evenly into a larger number without a remainder Factor- Lesson 7 - Attachment A.
Prep Math Competition, Lec. 1Peter Burkhardt1 Number Theory Lecture 1 Divisibility and Modular Arithmetic (Congruences)
Operators in Python. Arithmetic operators Some operators in Python will look familiar (+, -, *, /) Others are new to you (%, //, **) All of these do work.
Multiplying and Dividing Integers When you MULTIPLY: Two positives equal a positive Two negatives equal a positive One positive & one negative equal.
Divisibility Rules and Finding Factors
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
Arithmetic OperatorOperationExample +additionx + y -subtractionx - y *multiplicationx * y /divisionx / y Mathematical FormulaC Expressions b 2 – 4acb *
This will all add up in the end. Assignment operator =Simple Assignment operator Arithmetic Operators +Additive operator – Subtraction operator * Multiplication.
Arithmetic Expressions Addition (+) Subtraction (-) Multiplication (*) Division (/) –Integer –Real Number Mod Operator (%) Same as regular Depends on the.
HIGH SCHOOL: Algebra Perform arithmetic operations on polynomials. A-APR.1. Understand that polynomials form a system analogous to the integers, namely,
Doing math In java.
Factor A factor of an integer is any integer that divides the given integer with no remainder.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Lesson 11-2 Remainder & Factor Theorems Objectives Students will: Use synthetic division and the remainder theorem to find P(r) Determine whether a given.
PRIME NUMBERS AND FACTOR TREES. DEFINITION Prime Number – An integer whose only factors are 1 and itself 2, 3, 5, 7,11, 13, 17, 19.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
Sum of Arithmetic Sequences. Definitions Sequence Series.
Discrete Mathematics
Factors are numbers you can multiply together to get another number Example: 2 and 3 are factors of 6, because 2 × 3 = 6 Objectives: SWBAT 1) find the.
Modular Arithmetic Created by previous Honors Pre- Calculus students.
Greatest Common Factor and Least Common Multiples GCF and LCM.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Number-Theoretic Algorithms
3x + 2 6x3 - 5x2 – 12x – 4 2x2 – 3x – 2 6x3 + 4x2 -9x2 – 12x -9x2 – 6x
Congruence class arithmetic
Introduction to Cryptography
Integers and Division Section 3.4.
Adding and Subtracting Integers is like …
Exercise 24 ÷ 2 12.
CMP 131 Introduction to Computer Programming
A number that divides evenly into a larger number without a remainder
Direct Proof and Counterexample IV
Modular Arithmetic and Change of Base
Determining Factors and Multiples
Dividing Decimals by Whole Numbers
More Maths Programming Guides.
Modular Arithmetic ICS 6D Sandy Irani.
1-8 Multiplying and Dividing Integers
Modular Arithmetic.
Modular Arithmetic and Elliptic Curves
Multiplying Integers SAME SIGNS??? Answer will be POSITIVE. ex)
Some Simple Tips and Reminders
Arithmetic MOD 7 a finite algebra
Assignment #1 Solutions
Section 10.3 Modular Arithmetic
Direct Proof and Counterexample IV
Divide Remainder forms a fraction Step 1: Step 1: Step 2:
Polynomials 3: Finding remainders
CLOCK ARITHMETIC.
Miniconference on the Mathematics of Computation
Dividing Integers ÷ = + ÷ = + ÷ = + ÷ =.
Factor A factor of an integer is any integer that divides the given integer with no remainder.
Fractions: Dividing fractions by integers
Multiplication and Division of Integers
Fractions: Dividing integers by fractions
Converting Numbers Between Bases
Section 9.3 Modular Arithmetic.
Divide 9 × by 3 ×
Divide two Integers.
Presentation transcript:

mod arithmetic

mod arithmetic a mod m is the remainder of a divided by m a mod m is the integer r such that a = qm + r and 0 <= r < m again, r is positive Examples 17 mod 3 = 2 17 mod 12 = 5 (5 o’clock) -17 mod 3 = 1

congruences a is congruent to b modulo m if m divides a - b

a is congruent to b mod m if and only if the remainder of a divided by m is equal to the remainder of b divided by m. proof

If a is congruent to b mod m and c is congruent to d mod m then a+c is congruent to b+d mod m proof

If a is congruent to b mod m and c is congruent to d mod m then ac is congruent to bd mod m proof

Mod arithmetic examples -133 mod 9 = 2 (but in Claire?) list 5 numbers that are congruent to 4 modulo 12 hash function h(k) = k mod 101 h(104578690) h(432222187) h(372201919) h(501338753)