
CS 1050 A SPRING 2008
Sample Problems for Test # 1
1. What is the truth value of (p∨q)→(p∧q) when both pand qare false?
2. What are the converse and contrapositive of the statement”If it is sunny, then I go swimming ”?
3. Show that ¬(p⊕q) and p↔qare equivalent using a truth table. (The compound proposition p⊕qis
false if pand qhave the same truth value and is true otherwise.)
4. Suppose that Q(x) is the statement “x+1=2x.” What are the truth values of ∀xQ(x) and ∃xQ(x)?
5. Prove or disprove each of the following statements.
a) The sum of an even integer and an odd integer is always odd.
b) For any two integers aand b, if a·bis even then ais even or bis even.
c) There exist two irrational numbers xand ysuch that xy is rational and x+yis rational.
6. Prove each of the following statements by induction
(a) ∀n≥1,Pn
i=1 i2i= (n−1)2n+1 + 2
(b) ∀n≥1,4n+1 + 52n−1is divisible by 21.
(c) ∀n≥4,2n+ 3 ≤2n
(d) ∀n≥0, n5−nis divisible by 5.
7. Which amount of money can be formed using just two-dollar bills and five-dollar bills? Prove your
answer using strong induction.
8. Recursively define the set of bit strings that have more zeros than ones.
9. True or false? Explain.
(a) 1
2n2−n+ 5 = O(n2)
(b) nlog2n+ 3√n=O(nlog2n)
(c) (n2+ 2n)(n3+ 3n) = O(5n)
(d) 2n+ log n+ 5 = O(n2)
10. Give a recursive algorithm for computing the sum of the first nodd positive integers.
1