HW 2
HW 2
LATEXsubmissions are mandatory. Submitting your assignment in another format will result in a loss
of 10 points on the assignment. The template is here.
Problem 1
[4pts] Prove or disprove: For every integer n, if n is even then n2 + 1 is prime.
Proof:
Problem 2
[4pts] Prove or disprove: The average of any two odd integers is odd.
Proof:
Problem 3
[4pts] Prove or disprove: For any rational number r, then 3r2 − 2r + 4 is rational. (Read the next
problem before attempting.)
Proof:
Problem 4
[10 pts] Prove that if one solution of a quadratic equation of the form x2 + bx + c = 0 is rational, with
b and c being rational, then the other solution is also rational.
Proof:
Problem 5
[5pts] As a follow-up to the last question, let p(x) = ak xk + ak−1 xk−1 + . . . + a1 x1 + a0 be a polynomial.
Show that the rationals are closed under polynomial evaluation, i.e. if r is a rational number, then p(r)
is also rational. (The purpose of this problem is to emphasize that when you want to prove something
very general, it helps to prove something specific and gain intuition first.)
Proof:
Problem 6
[10 pts] Prove that if the decimal representation of a nonnegative integer n ends in d1 d0 and if
4|(10d1 + d0 ), then 4|n.
Proof:
Problem 7
[10 pts] A matrix A has 3 rows and 4 columns:
a11 a12 a13 a14
a21 a22 a23 a24
a31 a32 a33 a34
The 12 entries in the matrix are to be stored in row major form in locations 7609 to 7620 in a computer’s
memory. This means that the entires in the first row (reading left to right) are stored first, then entries
in the second row, and finally entries in the third row.
• Which location with a22 be stored in?
• Write a formula in i and j that gives the integer n so that aij is stored in location 7609 + n.
• Find formulas in n for r and s so that ars is stored in location 7609 + n.
• Now generalize! Let M be a matrix with m rows and n columns, and suppose that the entries are
1
Your name: Homework 2 Due: 17 June 2019 at beginning at class CSCI 2824-310
Proof:
2
Your name: Homework 2 Due: 17 June 2019 at beginning at class CSCI 2824-310
Problem 8
[10 pts] We define reciprocal of a nonzero real number x as 1/x. Consider the statement “The re-
ciprocal of any irrational number is irrational.” Prove this statement using both contraposition and
contradiction.
Proof:
Problem 9
[10pts] Prove that there exists a unique prime number of the form n2 + 4n − 5, where n is a positive
integer.
Proof:
Problem 10
[11pts]
Find a formula for
1 1 1
+ + ··· + n ∈ Z+ (positive integers)
1·2 2·3 n · (n + 1)
Prove that your formula is correct. Be sure to state whether you are using strong induction or weak
induction.
Proof:
Problem 11
[10pts] Show by induction that ∀n ∈ N, (n + 3)2 ≥ n2 + 9. Be sure to state whether you are using
strong induction or weak induction.
Proof:
Proof:
Problem Reflection
[3pts] Exercise a growth mentality by reflecting on this assignment and your work. Feel free to say
whatever you want, but you are required to answer the following. You are graded on whether you
complete this, not on what you say.
• How many hours did you spend on this assignment?
• What problem was hardest? Why?