CSCI 246 Class 5 RATIONAL NUMBERS, QUOTIENT REMAINDER THEOREM Quiz - - PowerPoint PPT Presentation

csci 246 class 5
SMART_READER_LITE
LIVE PREVIEW

CSCI 246 Class 5 RATIONAL NUMBERS, QUOTIENT REMAINDER THEOREM Quiz - - PowerPoint PPT Presentation

CSCI 246 Class 5 RATIONAL NUMBERS, QUOTIENT REMAINDER THEOREM Quiz Questions Lecture 8: Give the divisors of n when: n = 10 n = 0 Lecture 9: Say: 10 = 3*3 +1 Whats the quotient q and the remainder r? Lecture


slide-1
SLIDE 1

CSCI 246 – Class 5

RATIONAL NUMBERS, QUOTIENT – REMAINDER THEOREM

slide-2
SLIDE 2

Quiz Questions

 Lecture 8:

 Give the divisors of n when:

 n = 10  n = 0

 Lecture 9:

 Say: 10 = 3*3 +1 What’s the quotient q and the remainder r?

 Lecture 10:

 What notation would you use to say “The floor of

𝑏 𝑐”?

 What notation would you use to say “The ceiling of

𝑏 𝑐”?

slide-3
SLIDE 3

Notes

 Quiz will be handed back tomorrow  Will return grades next-day

slide-4
SLIDE 4

Lesson 8 – Rational Numbers and Divisibility

 Reminder

 What is Rational Numbers ℚ equal to?

slide-5
SLIDE 5

Lesson 8 – Rational Numbers and Divisibility

 Reminder

 What is Rational Numbers ℚ equal to?  ℚ =

𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0}

slide-6
SLIDE 6

Lesson 8 – Rational Numbers and Divisibility

 Reminder

 What is Rational Numbers ℚ equal to?  ℚ =

𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0

 Which operations are rational numbers “closed under”?

slide-7
SLIDE 7

Lesson 8 – Rational Numbers and Divisibility

 Reminder

 What is Rational Numbers ℚ equal to?  ℚ =

𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0

 Which operations are rational numbers “closed under”?

 Multiplication  Addition

slide-8
SLIDE 8

Lesson 8 – Rational Numbers and Divisibility

 Divisibility

slide-9
SLIDE 9

Lesson 8 – Rational Numbers and Divisibility

 Divisibility

 Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒  Consider 10 = 2 ∗ 5

 What’s n?  What’s d?  What’s k?

slide-10
SLIDE 10

Lesson 8 – Rational Numbers and Divisibility

 Divisibility

 Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒  What are the divisors of 21?

slide-11
SLIDE 11

Lesson 8 – Rational Numbers and Divisibility

 Prime Numbers: only divisible by 1 and itself

slide-12
SLIDE 12

Lesson 8 – Rational Numbers and Divisibility

 Prime Numbers: only divisible by 1 and itself  Give the first 4 prime numbers

slide-13
SLIDE 13

Lesson 8 – Rational Numbers and Divisibility

 Transitivity of Divisibility

Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ

slide-14
SLIDE 14

Lesson 8 – Rational Numbers and Divisibility

 Transitivity of Divisibility

Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c

slide-15
SLIDE 15

Lesson 8 – Rational Numbers and Divisibility

 Transitivity of Divisibility

Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then …?

slide-16
SLIDE 16

Lesson 8 – Rational Numbers and Divisibility

 Transitivity of Divisibility

Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then a|c Proof:

slide-17
SLIDE 17

Lesson 8 – Rational Numbers and Divisibility

 Transitivity of Divisibility

Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then a|c Proof:

since a|b there exists k1 /*by definition of divisibility (b=k1*a) */ since b|c there exists k2 /*by definition of divisibility (c=k2*b) */ ∴ 𝑑 = 𝑙1 ∗ 𝑙2 ∗ 𝑏

slide-18
SLIDE 18

Lesson 9 – Quotient Remainder Theorem

 Divisibility

 Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒

 Quotient – Remainder Theorem

 𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤

|𝑐|

slide-19
SLIDE 19

Lesson 9 – Quotient Remainder Theorem

 Divisibility

 Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒

 Quotient – Remainder Theorem

 𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤

|𝑐|

 What are the quotient q, and the remainder r in the following:

 11 = 2*5 + 1  99 = 9*10 + 9

slide-20
SLIDE 20

Lesson 9 – Quotient Remainder Theorem

 Divisibility

 Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒

 Quotient – Remainder Theorem

 𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤

|𝑐|

 Mod:

 Quotient (reminder) q = a div b  Remainder r = a mod d

slide-21
SLIDE 21

Lesson 9 – Quotient Remainder Theorem

Divisibility

Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒

Quotient – Remainder Theorem

𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤ |𝑐|

Mod:

Quotient (reminder) q = a div b

Remainder r = a mod d Example: What is the quotient and remainder when 99 is divided by 7? q = ? , a=?, d=?, r=?

slide-22
SLIDE 22

Lesson 9 – Quotient Remainder Theorem

Divisibility

Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒

Quotient – Remainder Theorem

𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑕𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤ |𝑐|

Mod:

Quotient (reminder) q = a div b

Remainder r = a mod d Example: What is the quotient and remainder when 99 is divided by 7? q = ? , a=?, d=?, r=? Rewrite the above in Modular arithmetic (mod) form:

slide-23
SLIDE 23

Lesson 10 – Floors, Ceiling functions

 Floor Function

 Assigns to the real number x the largest integer that is less than or equal to x

 Ceiling Function

 Assigns to the real number x the smallest integer that is greater than or equal to

x

slide-24
SLIDE 24

Lesson 10 – Floors, Ceiling functions

 Floor Function

 Assigns to the real number x the largest integer that is less than or equal to x

 Ceiling Function

 Assigns to the real number x the smallest integer that is greater than or equal to

x

 Examples:

 Floor of (1/2) = ?  Ceiling of (1/2) = ?

slide-25
SLIDE 25

Homework (Group)

1.

Determine whether 3| 7? Explain why or why not using the definitions?

2.

What are the quotient when 101 is devised by 11?

3.

What is 101 mod 11 equal to?

4.

Let a = 3, b=9, c=81; use the proof outlined in the lecture video with these values to show that because a|b and b|c that a|c

5.

Show that if a|b and b|a, where a and be are integers, then a=b or a=-b

6.

What is the floor of (-1/2)

7.

What is the ceiling of (-1/2)

8.

Prove or disprove that the ceiling of (x+y) = the (ceiling of x )+ (ceiling of y) for all real numbers x and y

slide-26
SLIDE 26

Homework (Individual)

1.

Determine whether 3|12? Explain why or why not using the definitions?

2.

What are the quotient and remainder when -11 is divided by 3?

3.

For the following, give the quotient and the remainder:

a)

19 is divided by 7

b)

  • 111 is divided by 11

c)

789 is divided by 23

d)

1001 is divided by 13

4.

What were the 3 cases given for the proof of the Quotient-Remainder Theorem?

5.

Data stored on a computer disk or transmitted over a data network are represented as a string of bytes. Each byte is made up of 8 bits. How many bytes are required to encode 100 bits of data? (hint: report the celling or floor function of this problem – which one makes sense here?)