Grade 6 Math Circles March 8-9, Modular Arithmetic

Similar documents
Grade 7/8 Math Circles February 9-10, Modular Arithmetic

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic

Grade 7 & 8 Math Circles October 12, 2011 Modular Arithmetic

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902

Grade 6 Math Circles March 1-2, Introduction to Number Theory

Equivalent Fractions

Grade 7/8 Math Circles February 3/4, 2015 Arithmetic Aerobics Solutions

A Plan for Problem Solving (pages 6 9)

4) If your birthday fell on a Sunday this year, what day will it fall on next year? 5) If it is autumn now, what season will it be in 100 seasons?

Introduction To Modular Arithmetic

Modular Arithmetic and Doomsday

Modular arithmetic Math 2320

Summer Math Calendar

Groups, Modular Arithmetic and Geometry

Number Theory: Modulus Math

Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm

CONNECT: Divisibility

Junior Math Circles February 17, 2010 Exponents

MATH NUMBER SENSE 3 Performance Objective Task Analysis Benchmarks/Assessment Students: 1. Students understand place value of whole numbers.

Estimation and Number Theory

Math Review Packet. Grades. for th. Multiplication, Division, Decimals, Fractions, Metric & Customary Measurements, & Volume Math in the Middle

30 6 = 5; because = 0 Subtract five times No remainder = 5 R3; because = 3 Subtract five times Remainder

How to Become a Mathemagician: Mental Calculations and Math Magic

Grade 6 Math Circles. Divisibility

Grade 2 supplement. Set A6 Number & Operations: Money. Includes. Skills & Concepts

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Grade 6 Module 2 Lessons 1-19

What I can do for this unit:

Use the following games to help students practice the following [and many other] grade-level appropriate math skills.

To divide a number by a power of 10, you can use the exponent to determine how the position of the decimal point changes in the quotient.

Extra Practice 1. Name Date. Lesson 1: Numbers in the Media. 1. Rewrite each number in standard form. a) 3.6 million

Extra Practice 1. Name Date. Lesson 1: Numbers in the Media. 1. Rewrite each number in standard form. a) 3.6 million b) 6 billion c)

5th Grade. Divisibility Rules. Slide 1 / 239 Slide 2 / 239. Slide 3 / 239. Slide 4 / 239. Slide 6 / 239. Slide 5 / 239. Division. Division Unit Topics

Summer Math Calendar Second Grade

In this chapter, I give you a review of basic math, and I do mean basic. I bet you know a lot

42 can be divided exactly by 14 and 3. can be divided exactly by and. is a product of 12 and 3. is a product of 8 and 12. and are factors of.

Meet #4 February Intermediate Mathematics League of Eastern Massachusetts

2. Tell your partner to examine the cards, and give you the cards on which the number

Naming Dollars and Cents Exchanging Dollars, Dimes, and Pennies

DIVISION REVIEW. Math Grade 6 Review Lesson 4 Information Organized by Beckey Townsend

Grade 6 Math Circles November 15 th /16 th. Arithmetic Tricks

Answer Key. Easy Peasy All-In-One-Homeschool

6th Grade. Factors and Multiple.

Problems involving remainders are popular on the SAT test.

5th Grade. Decimal Addition. Slide 1 / 152 Slide 2 / 152. Slide 4 / 152. Slide 3 / 152. Slide 5 / 152. Slide 6 / 152. Decimal Computation

satspapers.org MATHEMATICS YEAR 4 LEVELS TEST 4b Total marks CALCULATOR NOT ALLOWED Name Class School Date

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

MATH STUDENT BOOK. 6th Grade Unit 1

Minute Simplify: 12( ) = 3. Circle all of the following equal to : % Cross out the three-dimensional shape.

Grades 7 & 8, Math Circles 27/28 February, 1 March, Mathematical Magic

The Sixth Annual West Windsor-Plainsboro Mathematics Tournament

2008 Cedar Ridge Test Solutions

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates

Grade 6 Math Circles. Math Jeopardy

CEM 11+ Preparation Series Maths Booklet 25

Multiplying Whole Numbers. Dividing Whole Numbers. ex: 3, ex: 6,

Summer Math Calendar Third Grade

Summer Math Completed 5 th grade Entering 6 th grade

Fourth Grade Spiraling Review Week 1 of Fifth Six Weeks

MATH 135 Algebra, Solutions to Assignment 7

Correlation of USA Daily Math Grade 5 to Common Core State Standards for Mathematics

This book belongs to

Number Line: Comparing and Ordering Integers (page 6)

Rising 5th Grade Summer 2013 Math Packet

Essentials. Week by. Week

Whole Numbers. Predecessor and successor Given any natural number, you can add 1 to that number and get the next number i.e. you

Properties of Numbers

Number Shapes. Professor Elvis P. Zap

PA5-1: Counting page 1

3.NBT NBT.2

Grade 7/8 Math Circles Winter March 3/4 Jeopardy and Gauss Prep - Solutions

Grade 6, Math Circles 27/28 March, Mathematical Magic

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

2.NBT.1 20) , 200, 300, 400, 500, 600, 700, 800, NBT.2

Senior Math Circles February 10, 2010 Game Theory II

You will say it if you start at 0 and count in twos. eigh. teen. Answers will vary. This is one example = = = = 1 = 5

MATH CONCEPTS AND ESTIMATION

Modular Arithmetic: refresher.

MANIPULATIVE MATHEMATICS FOR STUDENTS

Monday Tuesday Wednesday Thursday

MUMS Problem Solving Competition. Melbourne University Mathematics and Statistics Society

Multiplication with Decimals and Whole Numbers. How can you use properties and place value to multiply a decimal and a whole number?

WORKING WITH NUMBERS GRADE 7

Essentials. Week by. Week. Calculate!

7 + 1 = = = = 5 = 3

CCM8$Unit$5$Equations$mruhrich.com$2014$ $

E CA AC EA AA AM AP E CA AC EA AA AM AP E CA AC EA AA AM AP E CA AC EA AA AM AP E CA AC EA AA AM AP E CA AC EA AA AM AP

Multiplication and Division

Math Contest Preparation II

Bellwork Teacher selected Prior Knowledge Over the last few days we have been working with exponents and also learning about scientific notation.

6.2 Modular Arithmetic

Downloaded from DELHI PUBLIC SCHOOL

SOME MORE DECREASE AND CONQUER ALGORITHMS

Counting Stick: Infants: First and Second Class: Third and Fourth Class: Fifth and Sixth Class

Grade 7/8 Math Circles November 8 & 9, Combinatorial Counting

6th Grade. Slide 1 / 215. Slide 2 / 215. Slide 3 / 215. Fraction & Decimal Computation. Fraction and Decimal Computation

6th Grade Fraction & Decimal Computation

One Way. Another Way Show partial products. Lesson

6th Grade. Slide 1 / 216. Slide 2 / 216. Slide 3 / 216. Fraction & Decimal Computation. Fraction and Decimal Computation

Arithmetic Sequences Read 8.2 Examples 1-4

Transcription:

Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 6 Math Circles March 8-9, 26 Modular Arithmetic Introduction: The 2-hour Clock Question: If its 7 pm now, what time will it be in 7 hours? 2 am How about in 2 hours? 3 pm tomorrow Now, this is a simple example that we re all familiar with, but how did we actually calculate this? Can you simplify this into 2 or 3 simple steps? Add 7 (time it is now) to 7 or 2 (number we re asked to add). 2 Keep subtracting 2 from this sum until you get a number less than 2. 2 Review of Divisibility Definition: An integer x is divisible by an integer n if x n is an integer (ie. there is no remainder when x is divided by n). We write x n, which is read x is divisible by n. Can you think of another way to ask Is x divisible by n? Exercise (a) Is 5 divisible by 3? Yes (b) Is 75 divisible by 2? No Note: this is another way of asking if 75 is even (c) Is 5 divisible by 5? No (d) is 5 divisible by 3? Yes

3 Modular Operator The modular operator might seem a little intimidating at first, but it s really not. All it does is, given 2 integers (x and n), it produces the remainder when the first number is divided by the second. Notation: x (mod n) = r This means that when x is divided by n, there is a remainder of r. We say: x modulo n is equal to r. Examples: (a) 7 (mod 4) = 3 (b) 5 (mod 3) = (c) 9 (mod 4) = 3 (d) 2 (mod 5) = Exercise 2: Calculate each of the following. (a) 7 (mod 5) = 2 (b) 8 (mod 4) = (c) 8 (mod 3) = 2 (d) 7 (mod 8) = (e) 37 (mod 6) = (f) 24 (mod 6) = 4 2

4 Binary Numbers and Codes A binary code is any system that only uses 2 states: /, on/off, true/false etc. A binary number is any number containing only s and s. These are all examples of binary numbers: Binary numbers have all sorts of applications, many of which are used on a daily basis, like: Computers Calculators TV s Barcodes CD s and DVD s Braille Binary codes are also used in many work fields, such as computer science, software engineering and electrical engineering - and basically all other fields of engineering too! There are multiple ways to express a binary code, the two most common forms of writing a binary code using numbers are Decimal form and Binary form. For example: in binary form becomes 3 in decimal form. And becomes 9. Now, the conversion between these may not be obvious, but it s pretty easy. Before we jump into converting between binary and decimal forms, let s do a quick review on exponents: x = x = x x 2 = x x x 3 = x x x x 4 = x x x x x 5 = x x x x x and so on... (for any x) Also, fill out this table, it will be very useful for the rest of the lesson. n 2 3 4 5 6 7 8 2 n 2 = 2 = 2 2 2 = 4 2 3 = 8 2 4 = 6 2 5 = 32 2 6 = 64 2 7 = 28 2 8 = 256 3

4. Converting Binary to Decimal To convert a binary number to its decimal form, follow these 3 simple steps: ➀ Write out the number - but leave lots of space between your digits, like this: ➁ Multiply each number by a 2, and starting with an exponent of on the very last 2, and increase the exponent by each time, like this: [ (2 3 )] [ (2 2 )] [ (2 )] [ (2 )] ➂ Sum them up and calculate: [ (2 3 )] + [ (2 2 )] + [ (2 )] + [ (2 )] =[ (8)] + [ (4)] + [ (2)] + [ ()] =8 + + + = 9 Exercise 5: Convert each of the follwing binary numbers to decimal form. (a) (2 2 ) + (2 ) + (2 ) = 4 + 2 + = 6 (b) (2 2 ) + (2 ) + (2 ) = 4 + + = 5 (c) (2 4 ) + (2 3 ) + (2 2 ) + (2 ) + (2 ) = 4 + 2 + = 7 (d) (2 5 ) + + + + + (2 ) = 32 + = 33 4

4.2 Converting Decimal to Binary Now this is the part where modular arithmetic comes in handy! We know that if we compute any number (mod 2) it will either be or, and so that s exactly what we use for converting decimal numbers to binary. Basically, we compute our number (mod 2) and that will be our last digit. Then we compute our quotient (mod 2) and place that as our 2 nd last digit, and so on until our quotient is. For example: Converting 3 to binary form, we would do the following. Now reading from the bottom up, 3 in decimal form is in binary form. Note: Your last step should always be the same as the one above. Exercise 6: Convert each of the following numbers to binary form. (a) 76 (b) 93 (c) 97 (d) 255 76 = 2(38) + 93 = 2(96) + 97 = 2(48) + 255 = 2(27) + 38 = 2(9) + 96 = 2(48) + 48 = 2(24) + 27 = 2(63) + 9 = 2(9) + 48 = 2(24) + 24 = 2(2) + 63 = 2(3) + 9 = 2(4) + 24 = 2(2) + 2 = 2(6) + 3 = 2(5) + 4 = 2(2) + 2 = 2(6) + 6 = 2(3) + 5 = 2(7) + 2 = 2() + 6 = 2(3) + 3 = 2() + 7 = 2(3) + = 2() + 3 = 2() + = 2() + 3 = 2() + = 2() + = 2() + 5

Problem Set. Calculate each of the following (a) (mod 3) = (b) 45 (mod 5) = (c) 49 (mod 7) = (d) 234 (mod 4) = 2 (e) 478 (mod 6) = 4 (f) 582 (mod 9) = 54 (mod 9) + 42 (mod 9) = 6 (g) 679 (mod 8) = 64 (mod 8) + 39 (mod 8) = 7 2. Complete the following table by either converting the given binary number to decimal form or vice versa. Binary Decimal (a) 5 (b) 39 (c) 5 (d) 2 (e) 85 (f) 5 (g) 45 (h) 59 3. If my birthday was on Monday, January 5, 25, what day of the week will my birthday be on this year (26)? 365 (mod 7) = 35 (mod 7) + 5 (mod 7) = + (mod 7) = My birthday would have been on Tuesday, January 5 th, 26. 4. If Mary s birthday was on a Thursday in 24, what day of the week will her birthday be on next year (27)? [(365 2) + 366] (mod 7) = ( 2) (mod 7) + 2 (mod 7) = 2 + 2 (mod 7) = 4 Mary s birthday would have been on a Monday, since that is 4 days after Thursday. 5. Using a regular deck of 52 cards, I dealt all the cards in the deck to 3 people (including myself). Were the cards dealt evenly? 52 (mod 3) = No, it wasn t dealt evenly. 6

6. A litre of milk is 4 cups, and one cake recipe uses 3 cups. If I have 8 litres of milk, how many cakes can I make? And how many cups of milk will be leftover, if any? 8 4 (mod 3) = 2 (mod 3) = 2 (8 4) 2 = 32 2 = 3 = 3 3 3 I will be able to make cakes with 2L of milk leftover. 7. I bought as many mini-erasers as possible at 25 cents each and spent the rest of my money on paperclips at 3 cents each. How many of each did I buy given that I have $.7? Is there anything leftover? (Assume there s no tax.) Maximum amount of money I can spend on erasers is $.5, getting me 6 erasers and leaving me with $.2 to buy paper clips. 2 (mod 3) = 2 and since 2 = 3(6) + 2 I can buy 6 erasers and 6 paperclips, and would have 2 leftover. 8. I have 5 trays with 6 muffins each that I divided evenly among 4 of my friends, and I ate the leftovers. How many muffins did each of my friends eat? How many muffins did I eat? 5 6 = 3 = 7(4) + 2 Each of my friends ate 7 and I ate 2. 9. If Math Circles started on Tuesday, February 2 nd, 26, and lasts for 44 days, what day will it end? (Give the full date.) Note that 44 us not the number of classes there are, rather it is the number of days in between the first and last day of Math Circles. 44 + 2 (mod 29) = 5 + 2 (mod 29) = 7 = So it will fall on the 7 th day of March. 44 (mod 7) = 2 = So it will fall 2 days after Tuesday, ie. on a Thursday. The last day will be Thursday, March 7 th, 26.. If John celebrated his 6 th birthday on Wednesday, February th, 26, what day of the week was he born? (Don t forget about leap years!) Clearly John was born in the year 2. Since his birthday is before February 29 th, he would have lived through 4 leap years (2, 24, 28 and 22) and 2 normal 365-day long years. So we want to calculate: [(365 2) + (366 4)] (mod 7) = [( 5) + +(2 4)] (mod 7) = 5 + 8 (mod 7) = 6 This means that his 6 th birthday fell 6 days (in the week) after the day on which he was born. So if we work backwards, 6 days before Wednesday is Thursday. John was born on Thursday, February th, 2. 7

. Mary is facing South and rotates 2295 clockwise. Which direction is she facing now? We want to know how many degrees she rotated CW from South. So we calculate: 2295 (mod 36) = 35 Mary rotated 35 clockwise and so she would be facing North-West. N W E 2. For this question, we will only consider n-digit binary numbers which do not start with a. (a) How many different 5-digit binary numbers are there? Solution : We will first approach this question by looking into how many possibilities there are for each of the 5 digits. 2 2 2 2 = 6 Notice that the only possible number in the first digit is, if it were it would be considered a 4-digit binary number. Solution 2: We can also approach this question by drawing a tree where the first level represents the first digit, which can only be filled by a. The second row represents the second digit which can be filled with a or and so on. S Counting the number of nodes on the last row, we get an answer of 6, which is the same as what we got the first time. 8

(b) How many different 5-digit binary numbers are there that have as the last digit? Solution : Using a similar table from part (a), we have the following: 2 2 2 = 8 Notice that it is just half of our answer in part (a), because half of the possible 5-digit numbers end in and the other half end in. Solution 2: A tree for this question would look something like this: Counting the number of nodes on the fifth level, we get an answer of 8. 3. Look back at the table titled Common Bases (a) Was the year 9 a leap year? We will calculate 9 modulo 4, and 4 to test if it was a leap year or not. 9 (mod 4) = 9 (mod ) = 9 (mod 4) = 3 No, 9 wasn t a leap year, since 9 (mod 4) = and 9 (mod ) = but 9 (mod 4) (b) Was the year 2 a leap year? Similarily, we will calculate 2 modulo 4, and 4 to test if it was a leap year or not. 9

2 (mod 4) = 2 (mod ) = 2 (mod 4) = Yes, 2 was a leap year. (c) Is the year 2 going to be a leap year? We will calculate 2 modulo 4, and 4 to test if it will be a leap year or not. 2 (mod 4) = 2 (mod ) = 2 (mod 4) = No, 2 will not be a leap year. (d) Is the year 22 going to be a leap year? We will calculate 22 modulo 4, and 4 to test if it will be a leap year or not. 22 (mod 4) = 22 (mod ) = 22 (mod 4) = 2 No, 22 will not be a leap year.

4. There are seven stacks of coins that look the same. Each stack has exactly coins. There are two stacks that have counterfeit coins, and all coins in each of those two stacks are counterfeit. Your task is to figure out which two of the seven stacks contain the counterfeit coins. The counterfeit coins weigh g each, while the real coins weigh g each. You have an electric balance, but you can only use it to make one measurement. How can you determine which two stacks contain the counterfeit coins with only one use of the balance? Explain why the strategy works. (Hint: Think about taking different numbers of coins from each of the stacks and placing them on the balance together. Think about the important numbers in the binary number system.) We would like to take a different number of coins from each stack so that we know which stacks have the counterfeit coins. If the question had just counterfeit coin pile, then we could just take from the first, 2 from the second, 3 from the third and so on. Note: if there were no counferfeit coins, the total weight taking one from the first pile and 2 from the second and so on would be (7)(7+) 2 = 28. However we cannot do that this time, because we wouldn t be able to know for sure which piles had the counterfeit coins. For example if the total weight was 33, then there could be 2 possibilities including the st and 4 th or 2 nd and 3 rd. But we want to avoid these ambiguous situations. To do this, we basically want to write a 7-digit binary number with two s. From the st stack, we take 2 =. From the 2 nd stack, we take 2 = 2. From the 3 rd stack, we take 2 2 = 4 and so on until you take 2 6 = 64. Then when you weigh them, and convert this number in decimal form to binary form, and from the position of the two s you can easily determine which piles contains the counterfeit coins.