Slide 1

Slide 1 text

Class 22: Primes cs2102: Discrete Mathematics | F17 uvacs2102.github.io David Evans University of Virginia

Slide 2

Slide 2 text

Plan This week: Number Theory and Cryptography Today: Primes Thursday: Asymmetric Cryptosystems Return Exam 2 at end of class today Remaining assignments: Problem Set 9 (out Sunday, due Dec 1) Problem Set Ѡ (posted today, (optionally) due Dec 4 Final Exam – 9am-noon, Thursday, Dec 7

Slide 3

Slide 3 text

Recap from Class 20 Number theory: study of the integers Definition: divides ( | ) iff there is an integer such that = . Fundamental theorem of arithmetic: every positive number can be written uniquely as a product of primes: = ) ⋅ + ⋅ … ⋅ -where . ≤ .0) Introduced without proof – we will prove it today!

Slide 4

Slide 4 text

[Number theorists] may be justified in rejoicing that there is one science at any rate, and that their own, whose very remoteness from ordinary human activities should keep it gentle and clean. (as quoted in MCS book)

Slide 5

Slide 5 text

G. H. Hardy A Mathematician’s Apology 1940

Slide 6

Slide 6 text

The Man who Knew Infinity 2015 Movie Srinivasa Ramanujan (Dev Patel) G. H. Hardy (Jeremy Irons)

Slide 7

Slide 7 text

[Number theorists] may be justified in rejoicing that there is one science at any rate, and that their own, whose very remoteness from ordinary human activities should keep it gentle and clean. (as quoted in MCS book)

Slide 8

Slide 8 text

[Number theorists] may be justified in rejoicing that there is one science at any rate, and that their own, whose very remoteness from ordinary human activities should keep it gentle and clean. (as written) But science works for evil as well as for good (and particularly, of course, in time of war); and both Gauss and less mathematicians may be justified in rejoicing that there is one science at any rate, and that their own, whose very remoteness from ordinary human activities should keep it gentle and clean.

Slide 9

Slide 9 text

There is one comforting conclusions which is easy for a real mathematician. Real mathematics has no effects on war. No one has yet discovered any warlike purpose to be served by the theory of numbers or relativity, and it seems very unlikely that anyone will do so for many years.

Slide 10

Slide 10 text

G. H. Hardy A Mathematician’s Apology 1940

Slide 11

Slide 11 text

Theorem: There are infinitely many prime numbers.

Slide 12

Slide 12 text

Theorem: There are infinitely many prime numbers.

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Note: is 1 prime? Fundamental theorem of arithmetic: every positive number can be written uniquely as a product of primes: = ) ⋅ + ⋅ … ⋅ -where . ≤ .0)

Slide 15

Slide 15 text

Definition. A prime is a number greater than 1 that is divisible only by itself and 1. Fundamental theorem of arithmetic: every positive number can be written uniquely as a product of primes: = ) ⋅ + ⋅ … ⋅ -where . ≤ .0)

Slide 16

Slide 16 text

Visualizing Integers

Slide 17

Slide 17 text

Fundamental theorem of arithmetic: every positive number can be written uniquely as a product of primes: = ) ⋅ + ⋅ … ⋅ -where . ≤ .0) (1) There exists a factorization (Theorem 2.3.1). Every positive integer greater than one can be factored as a product of primes. (2) That factorization is unique.

Slide 18

Slide 18 text

(1) There exists a factorization (Theorem 2.3.1). Every positive integer greater than one can be factored as a product of primes.

Slide 19

Slide 19 text

(2) That factorization is unique.

Slide 20

Slide 20 text

Groups, Rings, and Fields

Slide 21

Slide 21 text

Defining Rings A ring is a set, , with two binary operations that satisfy the three ring axioms: 1. R is Abelian (commutative) under the first operation (): ∀, , ∈ : associative: = commutative: = identity: ∃ ∈ : = inverse: ∃ ∈ : =

Slide 22

Slide 22 text

Niels Henrik Abel 1802-1829

Slide 23

Slide 23 text

Abelian Group is Abelian (commutative) under the first operation (): ∀, , ∈ : • associative: = • commutative: = • identity: ∃ ∈ : = • inverse: ∃ ∈ : = What is are examples of sets and operations that satisfy this property?

Slide 24

Slide 24 text

Abelian Group is Abelian (commutative) under the first operation (): ∀, , ∈ : associative: = commutative: = identity: ∃ ∈ : = inverse: ∃ ∈ : = Which of these are Abelian groups: (1) = ℕ, = + (2) = ℕ, = × (3) = ℤ, = + (4) = ℚ, =× (5) = {, }, =

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Exam 2

Slide 27

Slide 27 text

13 39 31 49 53 54 41 24 3 0 10 20 30 40 50 <60 <70 <75 <80 <85 <90 <95 <100 >=100 Exam 2 Histogram

Slide 28

Slide 28 text

Results by Question 0 (Name) 1 (revisit Exam 1) 2 (State Machines) 3 (Recursive Definition) 4 (Structural Induction) 5 (Program Verification) 6 (Termination) 7 (Correctness) 8 (Infinite Cardinalities) Average 20 6.1 6.8 5.9 6.8 8.9 9.8 7.1 9.0 Median 20 7 7 6 8 9 10 7 10 For each problem, a good answer was worth 10 points.

Slide 29

Slide 29 text

Results by Question 0 (Name) 1 (revisit Exam 1) 2 (State Machines) 3 (Recursive Definition) 4 (Structural Induction) 5 (Program Verification) 6 (Termination) 7 (Correctness) 8 (Infinite Cardinalities) Average 20 6.1 6.8 5.9 6.8 8.9 9.8 7.1 9.0 Median 20 7 7 6 8 9 10 7 10 Note: we will ask a form of this question again on the final!

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Class 5 Challenge 5

Slide 32

Slide 32 text

Formula vs. Circuit NAND(NAND(, NAND(, )), NAND(, NAND(, )) 5 NAND operations 4 NAND gates Connor Roos’ solution (exhaustive proof there are no 3-NAND solutions)

Slide 33

Slide 33 text

Returning Exam 2 Group 4 Group 3 Group 2 Group 1 qed4wg (Quinn) kai4vb (Kelsey) ea6dc (Elmo) aa8dp (Akanksha) rac4ad (Raina) kc4au (Kunal) eae4bf (Eliza) aap7sc (Alex) … … … … zpg9js (Zach) pw2hm (Peter) jyy3gx (Josh) dz7as (Daniel)