Solutions to midterm problems

1. Let P(x,y) denote the predicate "x is a parent of y" and D(x,y) mean "x is not the same person as y".

2. True/False


3. Prove by induction that An>=1
sum(5k+3) (k=1,n) = 2.5n2 + 5.5n

Proof:

Base case: n=1 works

Inductive step:

The best way to write it (no matter how you tried to prove it at first, is like this:)

sum(5k+3) (k=1,n+1) = sum(5k+3) (k=1,n) + 5(n+1) + 3 = 2.5n2 + 5.5n + 5n + 8 =
= 2.5 (n2 + 2n + 1) - 5n - 2.5 + 5.5n + 5n + 8 = 2.5(n+1)2 + 5.5(n+1)

4. Prove that for every pair of integers a and m such that 0<a<m and gcd(a,m)>1, a doesn't have an inverse modulo m, i.e., ~Eb: ab = 1(mod m)

Proof:

By contradiciton. Suppose Eb: ab = 1(mod m), i.e. ab = km+1 for some k
That can be re-written as ab-km = 1

Lets denote g = gcd(a,m). We know that g|a and g|m hence g|(ab-km) but ab-km=1 so g|1 which is impossible unless g=1

Contradiction!