# CMPSCI 190DM: A Mathematical Foundation for Informatics

# Second Midterm Exam

#### David Mix Barrington

#### 23 October 2015

### Directions:

- Answer the problems on the exam pages.
- There are four problems
for 100 total points.
Actual scale was A = 90,
C = 60.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.

Q1: 20 points
Q2: 15 points
Q3: 20 points
Q4: 20 points
Q5: 25 points
Total: 100 points

**Question 1 (20):**
Briefly identify the following terms or concepts (4 points each):
- (a) the
**Pigeonhole Principle**
- (b) an
**odd number**
- (c) the
**Division Theorem**
- (d) the
**mod** operation
- (e) a
**perfect square**

**Question 2 (15):**
Identify each of the following statements as true or false. No
explanation is needed or wanted, and there is no penalty for
guessing. (3 points each)
- (a) The binary representation of the decimal number 36 is
100010.
- (b) If S is a set of eleven different positive integers,
there
exist two elements x and y of S, with x ≠ y, such that x and
y have the same last digit in decimal notation.
- (c) The sum of any two rational numbers is rational.
- (d) Every number that is divisible by 6 is also
divisible by 12.
- (e) If n is an odd number, then (n-3)
^{3} + 6
must be an even number.

**Question 3 (20):**
Prove that if an integer n is not divisible by 4, then
n^{3} is also not divisible by 4. (Hint: Use Proof by
Cases
and the Division Theorem on n, with m = 4.)
**Question 4 (20):**
Define a number sequence so that a_{1} = 3 and, for any
n with n > 1, a_{n} = a_{n-1} +
3n^{2} - 3n + 1. Prove by induction that for all
positive integers n, a_{n} = n^{3} + 2.
**Question 5 (25):**
The **Tribonacci sequence** is defined by the rules
T_{1} = 1, T_{2} = 1, T_{3} = 1, and for
all n with n > 3, T_{n} = T_{n-1} +
T_{n-2} + T_{n-3}.
- (a, 5)
Compute T
_{k} for all k such that 1 ≤ k ≤ 7.
- (b, 20) Prove by induction that for all positive
integers n, T
_{n} is odd. You will need separate base cases
for n = 1, n = 2, and n = 3.

Last modified 25 October 2015