week 7 modular numbers

Upload: nur-anati

Post on 04-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Week 7 Modular Numbers

    1/30

    Discrete Mathematics is part of mathematics thatdeals with sets of objects that can be counted orprocesses that consist of a sequence of individual steps

  • 8/14/2019 Week 7 Modular Numbers

    2/30

    Natural numbers The sets of objects is called finite if the cardinality of

    the set is a natural number.

    This famous image has been digitized by computerand used as cover for Finite Mathematics textbook.

  • 8/14/2019 Week 7 Modular Numbers

    3/30

    True or False?

    4 + 2 = 6

    11 + 2 = 1

  • 8/14/2019 Week 7 Modular Numbers

    4/30

    Clock ArithmeticWith mathematical system based on a 12-hour clockExample :

    Appointment at 4:00 pm but you late two hours andarrive at 6:00 pm, so if it is 11:00 am and arrive at1:00pm. That is , on a 12-hour clock;

    4+2 = 6 and 11 + 2 = 1

  • 8/14/2019 Week 7 Modular Numbers

    5/30

    Addition on a 12-hour clock+ 1 2 3 4 5 6 7 8 9 10 11 12

    1

    2

    34

    5

    6

    78

    9

    10

    11

  • 8/14/2019 Week 7 Modular Numbers

    6/30

    Addition on a 12-hour clock+ 1 2 3 4 5 6 7 8 9 10 11 12

    1 2 3 4 5 6 7 8 9 10 11 12 1

    2 3 4 5 6 7 8 9 10 11 12 1 2

    3 4 5 6 7 8 9 10 11 12 1 2 34 5 6 7 8 9 10 11 12 1 2 3 4

    5 6 7 8 9 10 11 12 1 2 3 4 5

    6 7 8 9 10 11 12 1 2 3 4 5 6

    7 8 9 10 11 12 1 2 3 4 5 6 78 9 10 11 12 1 2 3 4 5 6 7 8

    9 10 11 12 1 2 3 4 5 6 7 8 9

    10 11 12 1 2 3 4 5 6 7 8 9 10

    11 12 1 2 3 4 5 6 7 8 9 10 11

    Table 1

  • 8/14/2019 Week 7 Modular Numbers

    7/30

    Exercise 1:

    Find clock sums 7 + 5

    9 + 5

    4 + 11 12 + 3

  • 8/14/2019 Week 7 Modular Numbers

    8/30

    Exercise 1:

    Find clock sums 7 + 5 = 12

    9 + 5 = 2

    4 + 11 = 3 12 + 3 = 3

  • 8/14/2019 Week 7 Modular Numbers

    9/30

    Elementary operations Subtraction : a b = x means a = b + x

    Multiplication :a x b = ab means b+b+b++b

    Zero multiplication :if a = 0, then a x b =0 x b=0 Division : ab = a = x means a = bx provided b has

    ban inverse for multiplication.

    Plus a times

  • 8/14/2019 Week 7 Modular Numbers

    10/30

    Table of modulo 4+ 0 1 2 3

    0 0 1 2 3

    1 1 2 3 02 2 3 0 1

    3 3 0 1 2

    x 0 1 2 3

    0 0 0 0 0

    1 0 1 2 32 0 2 0 2

    3 0 3 2 1

  • 8/14/2019 Week 7 Modular Numbers

    11/30

    Exercise 2Carry out the given operations on a 12-hour clock byusing the definitions for the elementary operations

    a. 4 9 b. 4 x 9 c. 4 7 d. 4 .9

  • 8/14/2019 Week 7 Modular Numbers

    12/30

    Answer

    a) 4 9 = x means 4 = 9 + x. What number when addedto 9 produces 4 ? (from Table 1, x = 7)

    b) 4 x 9 means 9+9+9+9 = 12 (From Table 1)

    c) 4 7 = t means 4 = 7t. The number that multipliedby 7 to obtain the result 4? (By trial and error:7x1=7,7x2=2,7x3=9,7x4=4)Therefore. T = 4.

    d) 4 . Means 49 = s or 4 = 9s. Proof this !!9

  • 8/14/2019 Week 7 Modular Numbers

    13/30

    Modulo Five Arithmetic

    + 0 1 2 3 4

    0

    1

    23

    4

    0 1 2 3 4

    0

    1

    23

    4

    Consider a mathematical systembased on a 5-hour clock, numbered0, 1, 2, 3 and 4.

    Table 2

  • 8/14/2019 Week 7 Modular Numbers

    14/30

  • 8/14/2019 Week 7 Modular Numbers

    15/30

    Instead of speaking about arithmetic on the 5-hourclock mathematicians usually speak of modulo 5arithmetic. The set {0,1,2,3,4}, together with theoperations in table 2 is called modulo 5 or mod 5system.

    Eg. Suppose it is 4 oclock on a 5-hour clock. Whattime will the clock show 9 hours later?

  • 8/14/2019 Week 7 Modular Numbers

    16/30

    Eg. Suppose it is 4 oclock on a 5-hour clock. Whattime will the clock show 9 hours later?

    Answer:We could write

    4 + 9 = 3 and 2 + 1 = 3

    Thus 4 + 9 = 2 + 1. Since we do not wish to confuse this

    with ordinary arithmetic, then we use the followingnotation:

    4 + 9 2 + 1, (mod 5)

    Which is read 4 + 9 is congruent to 2 + 1, mod 5

  • 8/14/2019 Week 7 Modular Numbers

    17/30

  • 8/14/2019 Week 7 Modular Numbers

    18/30

    Exercise 3:

    Checking Congruence

    Decide whether each statement is true or false.

    a) 3 8 (mod 5) b) 3 53 (mod 5)

    c) 3 19 (mod 5)

  • 8/14/2019 Week 7 Modular Numbers

    19/30

    Answer1. Decide whether each statement is true or false.

    a) 3 8 (mod 5) because 8 3 = 5, and 5 multiple of 5

    b) 3 53 (mod 5), 53 3 =50 and 50 is multiple of 5c) 3 19 (mod 5), 19 3 = 16 and 16 is not a multiple

    of 5

  • 8/14/2019 Week 7 Modular Numbers

    20/30

    Another way to determine whether two numbers arecongruent mod m is to divide each by mand checkthe remainders. If the remainders are the same, thenthe numbers are congruent mod m.

    Eg. 3 5 gives a remainder 3,and 53 5 gives a remainder of 3,

    so 3 53, 5 .

  • 8/14/2019 Week 7 Modular Numbers

    21/30

    Exercise 4:

    Solve modular equationsSolve each equation for x.

    a) 4 + 9 , 5 b) 15 + 92 , ( 5)

    c) 2 + 4 , ( 5)

    d) 2 4 , ( 5)

    e) 7 x 5 , ( 7)

    f) 3 - 5 , ( 12)

  • 8/14/2019 Week 7 Modular Numbers

    22/30

    Answera) 4 + 9 = 13 3, 5

    b) 15 + 92 = 107 2, ( 5)

    c) 2 + 4 = 6 1, ( 5)d) 2 4 = 7 4, ( 5)

    3, ( 5)

    e) 7 x 5 = 35 0, ( 7)

    f) 3 - 5 = 15 5, 12 10, ( 12)

  • 8/14/2019 Week 7 Modular Numbers

    23/30

    Modular ArithmeticBased on 12-hour clock :

    9 + 7 = 16 and 16 12 = 1 with remainder 4

    3 + 15 = 18 and 18 12 = 1 with remainder 6

    12 + 15 = 27 and 27 12 = 2 with remainder 3

    15 2 = 13 and 13 12 = 1 with remainder 1

    Exercise 5

    True or false ?

    a) 16 4 (mod 12) b) 12 0 (mod 12)

    c) 23 8 (mod 12) d) 29 4 (mod 12)

  • 8/14/2019 Week 7 Modular Numbers

    24/30

  • 8/14/2019 Week 7 Modular Numbers

    25/30

    Answer 19 = 7, (mod 12)

    37 = 1, (mod 12)

    47 = 11,(mod 12 52 = 4, (mod 12)

    108 = 0, (mod 12)

    230 = 2, (mod 12)

  • 8/14/2019 Week 7 Modular Numbers

    26/30

    Exercise 7 (Level 2)1. Assume that today is Tuesday (1 Mac 2012). Draw themodulo 7 table for the month of Mac. Then, determinethe day of

    a) 9 Mac

    b) 22 Mac

    c) 31 Mac

  • 8/14/2019 Week 7 Modular Numbers

    27/30

    AnswerDay Tue Wed Thur Fri Sat Sun Mon1 2 3 4 5 6 0

    a) 9 Mac , 9 2, 7 9 7 = 2Thus, 9 Mac is Wednesday

    b) 22 Mac, 22 1 7 22 7 = 1Thus, 22 Mac is Tuesday

  • 8/14/2019 Week 7 Modular Numbers

    28/30

    2. Assume that today is Monday (day 2). Determine theday of the week it will be at the end of each of thefollowing periods. (Assume no leap years.)

    a) 24 days

    b) 155 days

    c) 365 days

    d) 2 years

  • 8/14/2019 Week 7 Modular Numbers

    29/30

  • 8/14/2019 Week 7 Modular Numbers

    30/30

    Mind opener

    Find some resources from books and journal about

    Modular Arithmetic and History of Numbers Make a copy and keep inside your folio

    Chinese calendar

    Rat : 0,12,24,..Ox : 1,13,25.