/
Number Theory CSE 311 Autumn 2020 Number Theory CSE 311 Autumn 2020

Number Theory CSE 311 Autumn 2020 - PowerPoint Presentation

rose
rose . @rose
Follow
342 views
Uploaded On 2021-12-08

Number Theory CSE 311 Autumn 2020 - PPT Presentation

Lecture 11 httpsabstrusegoosecom353 Announcements Lots of folks sounded concerned about English proofs in sections THATS NORMAL English proofs arent easy the first few times or the next few timessometimes not even after a decade ID: 904592

integers arithmetic definition modular arithmetic integers modular definition divides integer theorem equivalence division mod proof means claim number unique

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "Number Theory CSE 311 Autumn 2020" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Number Theory

CSE 311 Autumn 2020Lecture 11

https://abstrusegoose.com/353

Slide2

Announcements

Lots of folks sounded concerned about English proofs in sections.THAT’S NORMAL

English proofs aren’t easy the first few times (or the next few times…sometimes not even after a decade…) Keep asking questions! Don’t expect breakout room activities to be “easy.” If you know the right answer immediately, you won’t learn much by doing it.

Slide3

Last Time

Went reaaaaaaaaaaaal fast…so we could practice proofs in section and slowly today.

We’ll keep practicing in the background.

Slide4

Two More Set Operations

Given a set, let’s talk about it’s powerset.

is a subset of

The powerset of is the

set of all subsets of

 

Slide5

Two More Set Operations

Called “the Cartesian product” of

and

.

is the “real plane” ordered pairs of real numbers.

 

Slide6

Divides

Which of these are true?

 

For integers

we say

(“

divides

”)

iff there is an integer

such that

 

Divides

Slide7

Why Number Theory?

Applicable in Computer Science“hash functions” (you’ll see them in 332) commonly use modular arithmetic

Much of classical cryptography is based on prime numbers. More importantly, a great playground for writing English proofs.

Slide8

A useful theorem

Remember when non integers were still secret, you did division like this?

For every

,

with

There exist

unique

integers

with

Such that

 

The Division Theorem

is the “quotient”

is the “remainder”

 

Slide9

Unique

“unique” means “only one”….but be careful with how this word is used.

is unique, given

. – it still depends on but once you’ve chosen and

“unique” is not saying

It’s saying

 

For every

,

with

There exist

unique

integers

with

Such that

 

The Division Theorem

Slide10

A useful theorem

The

is the result of a/d (integer division) in JavaThe

is the result of a%d in Java

 

For every

,

with

There exist

unique integers

with

Such that

 

The Division Theorem

That’s slightly a lie,

is always non-negative, Java’s % operator sometimes gives a negative number.

 

Slide11

Terminology

You might have called the % operator in Java “mod”

We’re going to use the word “mod” to mean a closely related, but different thing.Java’s % is an operator (like + or you give it two numbers, it produces a number. The word “mod” in this class, refers to a set of rules

 

Slide12

Modular arithmetic

“arithmetic mod 12” is familiar to you. You do it with clocks.What’s 3 hours after 10 o’clock?

1 o’clock. You hit 12 and then “wrapped around”“13 and 1 are the same, mod 12” “-11 and 1 are the same, mod 12”We don’t just want to do math for clocks – what about if we need

Slide13

Modular Arithmetic

To say “the same” we don’t want to use

… that means the normal We’ll write

because “equivalent” is “like equal,” and the “modulus” we’re using in parentheses at the end so we don’t forget it.

 

Slide14

Modular arithmetic

We need a definition! We can’t just say “it’s like a clock”Pause what do you expect the definition to be?

Is it related to % ?

Slide15

Modular arithmetic

We need a definition! We can’t just say “it’s like a clock”Pause what do you expect the definition to be?

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

Huh?

Slide16

Long Pause

It’s easy to read something with a bunch of symbols and say “yep, those are symbols.” and keep goingSTOP Go Back.

You have to fight the symbols they’re probably trying to pull a fast one on you. Same goes for when I’m presenting a proof – you shouldn’t just believe me – I’m wrong all the time!You should be trying to do the proof with me. Where do you think we’re going next?

Slide17

So, why?

What does it mean to be “the same in clock math”If I divide by 12 then I get the same remainder.

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

Slide18

Another try

Let

and

.

We say

if and only if the

guaranteed by the division theorem is equal for

and

 

Equivalence in modular arithmetic (correct, but bad)

For every

,

with

There exist

unique

integers

with

Such that

 

The Division Theorem

Slide19

Another Try

This is a perfectly good definition. No one uses it.

Let’s say you want to prove

So,

uhh

, who wants to divide

by

and figure out what the remainder is?

 

Let

and

.

We say

if and only if the

guaranteed by the division theorem is equal for

and

 

Equivalence in modular arithmetic (correct, but bad)

Slide20

Once More, with feeling

How do humans check if numbers are equivalent?

You subtract 12 as soon as the number gets too big, and make sure you end up with the same number (i.e. )So is

for some integer and

is

for some integer So

 

Let

and

.

We say

if and only if the

guaranteed by the division theorem is equal for

and

 

Equivalence in modular arithmetic (correct, but bad)

Slide21

Now I see it

So, is it actually better?

Prove for all

 

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

Slide22

Claim: for all

Before

we start,

we must know:

1. What every word in the statement means.

2. What the statement as a whole means.

3. Where to start.

4. What your target is.

 

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

For integers

we say

(“

divides

”)

iff

there is an integer

such that

 

Divides

Fill out the poll everywhere for Activity Credit!

Go to pollev.com/cse311 and login with your UW identity

Or text cse311 to 22333

Slide23

Claim:

Proof:

Let

be arbitrary integers with

,

and suppose

.

 

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

For integers

we say

(“

divides

”)

iff

there is an integer

such that

 

Divides

Slide24

A proof

Claim:

Proof:

Let

be arbitrary integers with

,

and suppose

.

By definition of mod,

By definition of divides,

for some integer

.

Adding and subtracting

we have

.

Since is an integer

By definition of mod,

 

Slide25

You Try!

Claim: for all

If

then

 

Before we start we must know:

1. What every word in the statement means.

2. What the statement as a whole means.

3. Where to start.

4. What your target is.

Let

and

.

We say

if and only if

 

Equivalence in modular arithmetic

For integers

we say

(“

divides

”)

iff

there is an integer

such that

 

Divides

Slide26

Claim: for all

If

then

Proof:

Let

be arbitrary integers with

and suppose

.

 

Slide27

Claim: for all

If

then

Proof:

Let

be arbitrary integers with

and suppose

.

By definition of mod

By definition of divides,

for some integer

Multiplying both sides by

, we have

.Since and are integers,

by definition of divides.

So,

, by the definition of mod. 

Slide28

Don’t lose your intuition!

Let’s check that we understand “intuitively” what mod means:

 

is even” Note that negative (even)

values also make this true.

 

This is true! They both have remainder

when divided by

.

 

This is true as long as

for some integer