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 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 𝑐 ”?
Notes Quiz will be handed back tomorrow Will return grades next-day
Lesson 8 – Rational Numbers and Divisibility Reminder What is Rational Numbers ℚ equal to?
Lesson 8 – Rational Numbers and Divisibility Reminder What is Rational Numbers ℚ equal to? 𝑏 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0 } ℚ =
Lesson 8 – Rational Numbers and Divisibility Reminder What is Rational Numbers ℚ equal to? 𝑏 ℚ = 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0 Which operations are rational numbers “closed under”?
Lesson 8 – Rational Numbers and Divisibility Reminder What is Rational Numbers ℚ equal to? 𝑏 ℚ = 𝑐 𝑏, 𝑐 ∈ ℤ, 𝑐 ≠ 0 Which operations are rational numbers “closed under”? Multiplication Addition
Lesson 8 – Rational Numbers and Divisibility Divisibility
Lesson 8 – Rational Numbers and Divisibility Divisibility Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒 Consider 10 = 2 ∗ 5 What’s n? What’s d? What’s k?
Lesson 8 – Rational Numbers and Divisibility Divisibility Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒 What are the divisors of 21?
Lesson 8 – Rational Numbers and Divisibility Prime Numbers: only divisible by 1 and itself
Lesson 8 – Rational Numbers and Divisibility Prime Numbers: only divisible by 1 and itself Give the first 4 prime numbers
Lesson 8 – Rational Numbers and Divisibility Transitivity of Divisibility Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ
Lesson 8 – Rational Numbers and Divisibility Transitivity of Divisibility Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c
Lesson 8 – Rational Numbers and Divisibility Transitivity of Divisibility Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then …?
Lesson 8 – Rational Numbers and Divisibility Transitivity of Divisibility Theorem: Let 𝑏, 𝑐, 𝑑 𝜗ℤ Suppose a|b and b|c Then a|c Proof:
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 k 1 /*by definition of divisibility (b=k 1 *a) */ since b|c there exists k 2 /*by definition of divisibility (c=k 2 *b) */ ∴ 𝑑 = 𝑙 1 ∗ 𝑙 2 ∗ 𝑏
Lesson 9 – Quotient Remainder Theorem Divisibility Defn: 𝑗𝑔 𝑜, 𝑒 ∈ ℤ ∧ 𝑒 ≠ 0, 𝑢ℎ𝑓𝑜 𝑜 𝑗𝑡 𝑒𝑗𝑤𝑗𝑡𝑗𝑐𝑚𝑓 𝑐𝑧 𝑒 𝑗𝑔𝑔 ∃𝑙 ∈ ℤ 𝑡. 𝑢. 𝑜 = 𝑙 ∗ 𝑒 Quotient – Remainder Theorem 𝑔𝑝𝑠 𝑏𝑜𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑏, 𝑐 𝑐 ≠ 0 , ∃ 𝑣𝑜𝑗𝑟𝑣𝑓𝑚𝑧 𝑗𝑜𝑢𝑓𝑓𝑠𝑡 𝑟, 𝑠 𝑡. 𝑢. 𝑏 = 𝑟 ∗ 𝑐 + 𝑠, 𝑥ℎ𝑓𝑠𝑓 0 ≤ 𝑠 ≤ |𝑐|
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
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
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=?
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:
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
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) = ?
Homework (Group) Determine whether 3| 7? Explain why or why not using the definitions? 1. What are the quotient when 101 is devised by 11? 2. What is 101 mod 11 equal to? 3. Let a = 3, b=9, c=81; use the proof outlined in the lecture video with these values to show 4. that because a|b and b|c that a|c Show that if a|b and b|a, where a and be are integers, then a=b or a=-b 5. What is the floor of (-1/2) 6. What is the ceiling of (-1/2) 7. Prove or disprove that the ceiling of (x+y) = the (ceiling of x )+ (ceiling of y) for all real 8. numbers x and y
Homework (Individual) Determine whether 3|12? Explain why or why not using the definitions? 1. What are the quotient and remainder when -11 is divided by 3? 2. For the following, give the quotient and the remainder: 3. 19 is divided by 7 a) -111 is divided by 11 b) 789 is divided by 23 c) 1001 is divided by 13 d) What were the 3 cases given for the proof of the Quotient-Remainder Theorem? 4. Data stored on a computer disk or transmitted over a data network are represented as a 5. 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?)
Recommend
More recommend