MAD 2104, Section 2 - Midterm 1 Solutions
1. (8 pts.) Let p and q be primes.
(a) If p and q are distinct, then nd gcd(p2 , q 3 ) and lcm(p2 , q 3 ).
Solution: The divisors of p2 are 1, p and p2 . The divisors of q 3 are 1, q, q 2 and q 3 . Since
p2 3
p =

MAD2104-02
Practice Test 2
1. p is the statement I will prove this by cases, q is the statement There are more
than 500 cases, and r is the statement I can nd another way.
(a) State (r q) p in simple English.
(b) State the converse of the statement in par

MAD 2104 Assignment 6: Set Operations & Properties of Functions
Set Operations
Overview: We now revisit sets and induction. This time we cover operations on sets
and learn methods of proving set identities.
Read:
Online Course Notes Section 4.1 Set Opera

Solutions for Assignment 1
Section 1.1, #2. (a)How many 4-digit numbers are there. i.e., numbers from 1000
to 9999?
Solution: Number of integers from 1000 to 9999 = 9999 - 1000 + 1 = 9000.
(b) How many 5-digit numbers are there that end in 1?
Solution: Nu

Solutions to Assignment 3
Section 1.7 #10.
(a) As A (x) = 1 i x A, (1) = A.
A
(b) As A (x) = 0 i x Ac , (0) = Ac .
A
Section 1.7 #12.
f 1 f (x, y) = f 1 (x + y, x y)
x + y + x y x + y (x y)
,
)
2
2
= (x, y).
=(
a+b ab
,
)
2
2
2a 2b
=( , )
2 2
= (a, b).
f

MAD 2104, Section 2 - Midterm 2 Solutions, Fall 2002
1. (16 pts.) Give a precise denition of the following:
(a) A transitive relation from a set S to itself.
Solution. R is transitive if (x, y) R and (y, z) R implies (x, z) R.
(b) The degree of a vertex v

MAD 2104, Section 2 - Midterm 3 Solutions
1. Let A =
a 0
0 b
where a and b are real numbers.
(a) (8 pts.) Compute A2 and A3 . Use this to guess a general formula for An , where n P.
a2 0
0 b2
Solution:A2 =
An =
an 0
0 bn
and A3 =
a3 0
0 b3
. So the obviou

FALL 2002 : MAD2104-02
Practice Test 3
1. Let A =
1 0
. Find a formula for An (in terms of n) where n is a positive integer.
1 1
2. Let A =
a b
c d
such that ad bc = 0 and let B =
1
adbc
d b
.
c a
(a) Compute AB and BA.
(b) Find x and y such that
1 2
1 3

MAD 2104, Section 2 - Quiz #1 Solutions
1. (4 points) Let f : N N be dened by f (n) = n3 + 2.
(a) Find f (2) and f (3).
Solution: As f (n) = 2 i n = 0, it follows that f (2) = cfw_0. Similarly, since f (n) = 3
i n = 1, it follows that f (3) = cfw_1.
(b) D

MAD 2104 Assignment 5: Induction
Induction
Overview: Many of the proofs you will be asked to do this semester will use the
principles of induction. This method of proof is also an important concept in many
computer science applications. An understanding o