CMPSCI 190DM: A Mathematical Foundation for Informatics
Practice for First Second Exam
David Mix Barrington
17 October 2015
Directions:
- Answer the problems on the exam pages.
- There are four problems
for 100 total points.
Scale will be determined after the exam but a good guess is A = 90,
C = 60.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
Q1: 15 points
Q2: 15 points
Q3: 20 points
Q4: 20 points
Q5: 30 points
Total: 100 points
Corrections in green made on 20 October 2015.
Question 1 (15):
Briefly identify the following terms or concepts (3 points each):
- (a) for x to be a multiple of y
- (b) a proof by contradiction
- (c) a rational number
- (d) the base case of a proof by induction
- (e) a predicate on the positive integers
Question 2 (15):
Determine whether each of these five statements is true or false. No
explanation
is needed or wanted, and there is no penalty for guessing.
- (a) 91 is not divisible by 7.
- (b) (31 mod 6) = (25 mod 4) (Remember that E&C's "mod"
is the same as Java's "%" on non-negative integers.)
- (c) The binary representation of the decimal number "19"
is "10101".
- (d) Every perfect square can be written as either "4k" or "4k+1"
for some integer k.
- (e) The square of every irrational number is irrational.
Question 3 (20):
Prove that if k is any integer, the number 7k + 5 is not a
perfect square. (Hint: Argue the contrapositive, and apply the
Division Theorem with m = 7 to the number you are squaring.)
Question 4 (20):
Define a number sequence so that a1 = 3 and for all k
with k > 1, ak = ak-1 + 4k - 7. Prove
by
induction that for any positive integer n, an =
2n2 - 5n + 6.
Question 5 (30):
Define a number sequence so that b1 = 2,
b2 = 3, and for all k with k > 2, bk =
bk-1 - bk-2 + 1.
- (a, 5) Calculate bi for all integers i from i
through 10.
- (b, 5) Determine the value of b100. (Hint:
I don't expect you to determine all the intermediate values --
find a pattern in part (a) or use the result of part (c).)
- (c, 20) Prove by induction that for any n with n >
6, bn = bn-6. (Hint: Prove the base
cases
of n = 7 and n = 8, then use the sequence definition in your
inductive case.)
Last modified 20 October 2015