CSCI 246 – Class 5
RATIONAL NUMBERS, QUOTIENT – REMAINDER THEOREM
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
RATIONAL NUMBERS, QUOTIENT – REMAINDER THEOREM
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
𝑏 𝑐”?
Quiz will be handed back tomorrow Will return grades next-day
Reminder
What is Rational Numbers ℚ equal to?
Reminder
What is Rational Numbers ℚ equal to? ℚ =
𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0}
Reminder
What is Rational Numbers ℚ equal to? ℚ =
𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0
Which operations are rational numbers “closed under”?
Reminder
What is Rational Numbers ℚ equal to? ℚ =
𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0
Which operations are rational numbers “closed under”?
Multiplication Addition
Divisibility
Divisibility
Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒 Consider 10 = 2 ∗ 5
What’s n? What’s d? What’s k?
Divisibility
Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒 What are the divisors of 21?
Prime Numbers: only divisible by 1 and itself
Prime Numbers: only divisible by 1 and itself Give the first 4 prime numbers
Transitivity of Divisibility
Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ
Transitivity of Divisibility
Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c
Transitivity of Divisibility
Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then …?
Transitivity of Divisibility
Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then a|c Proof:
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 ∗ 𝑏
Divisibility
Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒
Quotient – Remainder Theorem
𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤
|𝑐|
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
Divisibility
Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒
Quotient – Remainder Theorem
𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤
|𝑐|
Mod:
Quotient (reminder) q = a div b Remainder r = a mod d
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=?
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:
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
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) = ?
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
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)
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?)