1 / 18

Congruence and Sets

Congruence and Sets. Dali - “The Persistence of Memory”. Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois. Review of Last Class. Counting, natural numbers, and integers Representation of numbers: unary, Roman, decimal, binary

jeff
Download Presentation

Congruence and Sets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Congruence and Sets Dali - “The Persistence of Memory” Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois

  2. Review of Last Class • Counting, natural numbers, and integers • Representation of numbers: unary, Roman, decimal, binary • Divisibility: a| b iff b =ma for some integer m • Prime numbers and composite numbers • GCD and LCM is the largest integer that divides both and is the smallest integer that both and divide • Euclidean algorithm for computing gcd • p and q are relatively prime if they have no common prime factors. i.e., gcd(p.q) = 1

  3. Goals of this lecture • Introduce the concept of congruence mod k • Be able to perform modulus arithmetic • Rationals • Reals

  4. Applications of congruence • bitwise operations • error checking • computing 2D coordinates in images • encryption • telling time • etc.

  5. Congruence mod k • Two integers are congruent mod k if they differ by an integer multiple of k • Definition: If is any positive integer, two integers and are congruent mod k iff divides

  6. Examples of congruent mod k overhead

  7. Modulus addition proof Claim: For any integers with , if and then Definition: overhead

  8. Modulus multiplication proof Claim: For any integers with , if and then Definition: overhead

  9. Equivalence classes with modulus The equivalence class of integer (written ) is the set of all integers congruent to In (mod 7), In (mod 5), In ,

  10. Modulus arithmetic overhead

  11. RSA Key Generation • Creating the public and private keys for encryption/decryption • Choose two prime numbers and • Choose an integer such that and is relatively prime with • Solve for (e.g., with extended Euclidean algorithm) • Using the keys • Public key: • Private key: • Encryption • Turn message into an integer • Coded message • Decryption • Original message

  12. Rationals

  13. Reals

  14. Thank you • Next week: sets and relations

More Related