CSE 321 Discrete Structures

Slides:



Advertisements
Similar presentations
Chapter 4 Finite Fields. Introduction of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key concern operations on “numbers”
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
CSE 311 Foundations of Computing I Lecture 13 Number Theory Autumn 2012 CSE
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
COMP 170 L2 Page 1 Part 2 of Course Chapter 2 of Textbook.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
Survey of Mathematical Ideas Math 100 Chapter 2
Operations on Sets – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Operations on Sets Reading: Kolman, Section 1.2.
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Foundations of Computing I CSE 311 Fall It’s Boolean algebra again Definition for  based on  Definition for  based on  Complement works like.
Discrete Mathematics R. Johnsonbaugh
CompSci 102 Discrete Math for Computer Science
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 With Question/Answer Animations. Section 2.1.
Introduction to Set theory. Ways of Describing Sets.
CSE 311 Foundations of Computing I Lecture 14 Euclid’s Algorithm Mathematical Induction Autumn 2012 CSE
CSE 311 Foundations of Computing I Lecture 10 Set Theory Autumn 2012 Autumn 2012CSE
Discrete Mathematics Set.
Foundations of Computing I CSE 311 Fall Review: Division Theorem Let a be an integer and d a positive integer. Then there are unique integers q.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Unit 2 Modular Arithmetic and Cryptography IT Disicipline ITD1111 Discrete Mathematics & Statistics STDTLP 1 Unit 2 Modular Arithmetic and Cryptography.
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.
CSE 311: Foundations of Computing Fall 2013 Lecture 11: Modular arithmetic and applications.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
Thinking Mathematically Venn Diagrams and Set Operations.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
CSE 311 Foundations of Computing I Lecture 12 Modular Arithmetic and Applications Autumn 2012 CSE
CSE 311 Foundations of Computing I Lecture 11 Modular Exponentiation and Primes Autumn 2011 CSE 3111.
CSE 311: Foundations of Computing Fall 2013 Lecture 9: Set theory and functions.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CS 210 Discrete Mathematics The Integers and Division (Section 3.4)
Lecture 04 Set Theory Profs. Koike and Yukita
Great Theoretical Ideas in Computer Science
CS 2210:0001 Discrete Structures Sets and Functions
Lecture 3.2: Public Key Cryptography II
The Basic Concepts of Set Theory
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
Set Operations Section 2.2.
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
The Basic Concepts of Set Theory
Cryptography Lecture 21.
CSE 311: Foundations of Computing
Discrete Math for CS CMPSC 360 LECTURE 12 Last time: Stable matching
Week #5 – 23/25/27 September 2002 Prof. Marie desJardins
Great Theoretical Ideas in Computer Science
CSE 311 Foundations of Computing I
CSE 321 Discrete Structures
Discrete Mathematics CS 2610
Discrete Mathematics R. Johnsonbaugh
CSE 321 Discrete Structures
CSE 321 Discrete Structures
Discrete Math for CS CMPSC 360 LECTURE 14 Last time:
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
CSE 321 Discrete Structures
Cryptography Lecture 17.
CSE 321 Discrete Structures
Presentation transcript:

CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic

Announcements Readings Today: Monday and Wednesday: 3.4 (5th Edition: 2.4) Monday and Wednesday: 3.5, 3.6, 3.7 (5th Edition: 2.5, 2.6)

Highlights from Lecture 7 Set Theory and ties to Logic Review of terminology: Complement, Universe of Discourse, Cartesian Product, Cardinality, Power Set, Empty Set, N, Z, Z+, Q, R, Subset, Proper Subset, Venn Diagram, Set Difference, Symmetric Difference, De Morgan’s Laws, Distributive Laws

Number Theory (and applications to computing) Branch of Mathematics with direct relevance to computing Many significant applications Cryptography Hashing Security Important tool set

Modular Arithmetic Arithmetic over a finite domain In computing, almost all computations are over a finite domain

What are the values computed? [-128, 127] public void Test1() { byte x = 250; byte y = 20; byte z = (byte) (x + y); Console.WriteLine(z); } public void Test2() { sbyte x = 120; sbyte y = 20; sbyte z = (sbyte) (x + y); Console.WriteLine(z); } 14 -116

Arithmetic mod 7 a +7 b = (a + b) mod 7 a 7 b = (a  b) mod 7 + 1 2 3 1 2 3 4 5 6 X 1 2 3 4 5 6

Group Theory A group G=(S, ) is a set S with a binary operator  that is “well behaved”: Closed under  Associative: a ² (b ² c) = (a ² b) ² c Has an identity Each element has an inverse A group is commutative if the ² operator also satisfies a² b = b ² a

Groups, mod 7 {0,1,2,3,4,5,6} is a group under +7

Multiplicative Inverses Euclid’s theorem: if x and y are relatively prime, then there exists integers s, t, such that: Prove a  {1, 2, 3, 4, 5, 6} has a multiplicative inverse under 7 sx + ty = 1

Generalizations ({0,…, n-1}, +n ) forms a group for all positive integers n ({1,…, n-1}, n ) is a group if and only if n is prime

Basic applications Hashing: store keys in a large domain 0…M-1 in a much smaller domain 0…n-1

Pseudo Random number generation Linear Congruential method xn+1 = (a xn + c) mod m m = 10, a = 3, c = 2, x0 = 0

Simple cipher Caesar cipher, a = 1, b = 2, . . . Shift cipher HELLO WORLD Shift cipher f(p) = (p + k) mod 26 f-1(p) = (p – k) mod 26 f(p) = (ap + b) mod 26

Modular Exponentiation 1 2 3 4 5 6 a a1 a2 a3 a4 a5 a6 1 2 3 4 5 6