
MAT 300 Mathematical Structures April 23, 2004
Test 3, sample solutions (reworked 4/24/04))
1. a. A relation fbetween two sets Aand Bis called a function, if ∀b∈B∃a∈Asuch
that (a, b)∈f, and whenever a∈A, b1, b2∈Bare such that (a, b1),(a, b2)∈fthen b1=b2.
b. A function ffrom a set Ato a set Bis called one-to-one if whenever a1, a2∈Aare such that
f(a1) = f(a2) then a1=a2.
c. A number m∈Zis called a divisor of a number n∈Zif there exists q∈Zsuch that mq =n.
d. A number p∈Zis called prime if p > 1, and 1 and pare its only divisors.
e. Two sets Aand Bare said to have the same cardinality if there exists a one-to-one
correspondence between Aand B.
f. A set Ais called finite if Ais empty, or if there exists a natural number nand a one-to-one
correspondence between Aand the set {i∈N:i≤n}.
2. The division algorithm asserts that for all m∈Z, all n∈Z\ {0}, there exists unique q∈Zand
r∈ {0,1,...n−1}such that m=nq +r.
3. Suppose A, B and Care sets, g:A7→ Band f:B7→ Care functions, and (f◦g) is a one-to-one
correspondence. a. Then fmust be onto and gmust be one-to-one.
b1. To prove that fis onto, suppose z∈C. Since (f◦g) is onto, there exists x∈Asuch that
(f◦g)(x) = z. Let y=g(x)∈B. Then f(y) = f(g(x)) = z∈C, showing that fis onto.
b2. To show that gmust be one-to-one, suppose that x1, x2∈Aare such that g(x1) = g(x2).
Hence (f◦g)(x1) = f(g(x1)) = f(g(x2)) = (f◦g)(x2), from which we may conclude
that x1=x2since (f◦g) is one-to-one.
4. Suppose a, b, c ∈Nare such that a|band b|c. This means that there exist q1, q2∈Nsuch that
b=aq1and c=bq2. Together this implies c=a(q1q2), i.e. a|csince q1q2∈N.
5. (Prove the contrapositive.) Suppose n∈Nand 2 6n. By the division algorithm, ∃q∈Nsuch that
n= 2q+ 1. Hence n2= (2q+ 1)2= 2Q+ 1 where Q= 2q2+ 2q∈N, i.e. 2 6 |n2.
(Bonus version) Proof by contradiction. Suppose p∈Nis prime, n∈N, and p|n2. This means
that there exists q∈Nsuch that pq =n2.
Now suppose that p6 | n, i.e. gcd(p, n) = 1. Theorem 6.4.1 this implies that there exist x, y ∈Z
such that 1 = xp +yn. Hence n=px +yn2=p(x+yq), i.e. p|ncontradicting the assumption.
6. Suppose n∈N. Let S={x∈N:x > 1 and x|n}. Since n∈S, this set is nonempty and the
well-ordering principle applies, i.e., Shas a smallest element. Call it p. Clearly p|n(since p∈S).
Now suppose that q∈N\ {1}divides p. Using 4., i.e., using that “|” is a transitive relation on
N, this implies that q|nand hence q∈S. But q≤pand pis the smallest element of S, hence
q=p, showing that pis prime.
C.a. Applying the Euclidean Algorithm to 60 and 11 yields: 60 = 11 ·5 + 5 and 11 = 5 ·2 + 1.
Working backwards, these yield 5 = 60 −5·11 and 1 = 11 −2·5. Taken together these give
1 = 11 −2·(60 −5·11) = 11 ·11 −2·60, i.e., 11 ·11 ≡1 (mod 60).
b. Using a., obtain 3 = 33 ·11 −6·60, which may be rewritten as 33 ·11 ≡3 (mod 60).
c. In the setting of the “clock-problem”, the minute-hand and the hour-hand are 3 tick-marks apart
at 33 times 12 minutes after 12 : 00 noon/midnight, i.e. at 3 : 36 p.m. and at 3 : 36 a.m.