CMSC 203 / 0202 Fall 2002

Download Report

Transcript CMSC 203 / 0202 Fall 2002

CMSC 203 / 0201
Fall 2002
Week #5 – 23/25/27 September 2002
Prof. Marie desJardins
September1999
TOPICS
 Integers and algorithms
 Applications of number theory
 Matrices
September1999
October 1999
MON 9/23
INTEGERS AND ALGORITHMS (2.4)
September1999
CONCEPTS / VOCABULARY
 Euclidean algorithm
 Base b expansions of integers (especially binary,
hexadecimal)
 Binary addition, binary multiplication, bit shifting
September1999
October 1999
Examples
 Exercise 2.4.9: Devise a simple method (algorithm)
for converting from hexadecimal notation to binary
notation.
 (p. 128) Apply the Euclidean algorithm to find the
greatest common divisor of 91 and 287.
 Lemma 2.4.1. Prove that if a = bq + r, where a, b, q,
and r are integers, then gcd(a,b) = gcd(b,r).
 Use Lemma 2.4.1 to prove that the Euclidean
algorithm finds the gcd of its two arguments.
September1999
October 1999
WED 9/25
APPLICATIONS OF NUMBER THEORY
(2.5 & 2.2 revisited)
** Homework #3 due today! **
** (Ungraded) quiz today! **
September1999
CONCEPTS / VOCABULARY
 gcd as linear combination
 Linear congruence
 Fermat’s Little Theorem
 Applications:
 From Section 2.3: Hashing, pseudorandom numbers,
cryptology
 From Section 2.5: Chinese remainder theorem,
computer arithmetic, pseudoprimes / Fermat’s Little
Theorem, public key cryptography, RSA
encryption/decryption
September1999
October 1999
Examples
 Exercise 2.5.1: Express the gcd of each of the
following pairs of integers as a linear combination
of these integers:
 (c) 36, 48
 (e) 117, 213
 (h) 3454, 4666
September1999
October 1999
Examples II
 Exercise 2.5.9: Show that if a and m are relatively
prime positive integers, then the inverse of a
modulo m is unique modulo m. (Hint: Assume that
there are two solutions b and c of the congruence
ax = 1 mod m. Use Theorem 2 to show that b = c
mod m.)
September1999
October 1999
FRI 9/27
MATRICES (2.6)
September1999
CONCEPTS / VOCABULARY
 mxn matrices, rows, columns, equality
 Matrix arithmetic, products
 Identity matrix
 Transpose At, symmetric matrices
 Zero-one matrix, join (), meet (), Boolean
product
September1999
October 1999
Examples
 Example 2.1.1. Let A =
1113
[2046]
1137







(a) What size is A?
(b) What is the third column of A?
(c) What is the second row of A?
(d) What is the element of A in the (3,2)th position?
(e) What is At?
What is AA?
What is AAt?
September1999
October 1999
Examples II
 Example 2.6.5: How many additions of integers
and multiplications of integers are used by
Algorithm 2.6.1 to multiply two nxn matrices with
integer entries?
 Example 2.6.21: Let A be an invertible matrix.
Show that (An)-1 = (A-1)n whenever n is a positive
integer.
September1999
October 1999