CSCI 190 Exam I Practice

CSCI 190 Exam I
Practice
1)
a) Write the contrapositive of the following conditional statement
If it is raining, then the streets are wet.
b)
Write the negation of the following:
Some Mt. SAC students are international students.
c) Express the following argument symbolically and determine if it is valid: If I study hard,
then I get A’s or I get rich. I don’t get A’s and I don’t get rich. Therefore I didn’t study
hard.
2)
Prove or disprove each of the following:
a) For the domain of real numbers, x( x  x )
2
b) For the domain of integers, xy ( xy  0)
3) Prove that 3n  9 is odd if and only if
4)
Prove that if A  B  A , then
n is even.
A  B (hint: first pick x  A . You need to show x  B )
5) Prove that there is no largest integer.
6)
a) Show
3n 2  n is O(n 2 )
b) Show n is not O (n )
3
7)
2
Compute the Boolean Product
A
1 0 
0 0 
B for A  
and B  


0 1 
1 1 
8)
a) Sketch
 x 
for x in [2, 2]
b) Show f : Z  Z  Z defined as f (m, n)  m  n is onto. Justify your answer.
9)
Find the close form (non-recursive form)of the recursive sequence an  2nan1 , a0  5
10) (2 points each: true/false, short answers: No partial credit points will be given. You are not
required to show work.)
a) True/False: Let A, B be sets. If
b) True/False:
x   x
AB
, then A  B
for all real numbers x (including negatives)
c) True/False: Determine if the following statement is true or false: 1  1  56 if and only if
30  16  25
d) Is the set of rational numbers countable or uncountable? _______________
e) Is the set of real numbers countable or uncountable? __________________
f)
Rewrite the following sentence in “If P then Q” form. I pass CSCI 190 only if I study 10
hours a week.
__________________________________________________________________________
g) Find the power set of
A   ,{} ____________________
h) Find
n
 A where
i
Ai  {1,2,3i} _______________________
i 1
i)
Compute
2
2
 (2i  j) ______________________
i 1 j 1
j)
Find the nth term of the sequence 0,3,8,15,  ____________________
k) For f : R  R defined by f ( x)  x , find f ([ 2, 2]) and f
2
l)
Let A, B be
n n
1
([0, 2])
matrices with C=AB. Find an expression for
cij (using

) given
A  [aij ], B  [bij ], C  [cij ]
_____________________________________________________
11) Prove if
a b and b c , then a c for nonzero integers a,b,c.
12) Show f (n)  n  3n  1 is (n )
2
2
13)
a) (1 point) True/False:
  {1,2,3}
b) (1 point) True/False:
}  {1,2,3}
c) (2 points) Find the power set of {a , b}
d) (2 points) For A  {1,2} and B  {3,7} , find A  B
14) Find a non-recursive expression for an  2an 1  1, a0  1
15) Determine if f : Z  Z  Z defined by f (m, n)  6m  2n is onto.
16) Prove that ~ ( p  q ) is logically equivalent to p  (~ q )
17)
Prove that if Prove that if
a b , then a b c for nonzero integers a,b,c.
18) Prove or disprove the following:
xy ( y  x) , where the domain is the set of all natural numbers 1, 2, 3, ….
19) Construct a truth table to determine if
20) Show that if
p  ( p  q)  p
A  B then A  B  B
21) Suppose x is a nonzero real number. Prove that if
1
is an irrational number, then x is also an
x
irrational number.
22) Prove or disprove:
a) For the domain of real number xy ( x  y  0)
b) For the domain of real numbers, xy ( x  y  0)
23) Prove that there is no positive integer satisfying
x 3  4 x  20
24) (2 points each) Do NOT show work.
a) True/False   {1,2}
b) Write the negation of xy p( x, y) . Make sure the negation appears next to p(x,y)
a  4(mod 7) ______________
d) For f : R  R defined by f ( x)  2 x  1 , compute f ([2, 4])
c) Find an integer 6  a  13 such that
e) Negate the following sentence: Nancy is tall and beautiful.
f)
1.2   1.2   =_______________________
g) What conclusion if any can be drawn from the following: If there is gas in the car,
then I will not drink beer. If I drink beer, then I will go shopping. I did not go shopping.
h) For f : Z  Z defined by f ( z )  3z  1 , find f
1
({0,1, 2})
25)
a) (7 points) Find a formula (in closed form) for the recursive sequence
an  an 1  n, a0  1
b)
(3 points) Find the nth term of the sequence 2,6,18,54,
26) Prove or disprove: xy( x  y  4) , where the domain is the set of all real numbers.
2
27) Prove or disprove:
28) For a function
2
f : R  R defined by f ( x)  x3  1 is a bijection.
f : R  R defined by f ( x)  x 2  1 , find a) f 1[1,5] b) f [1,5]
29) Prove that
30)
2 is irrational.
If m  n is even, then n is even or m is even.
31)
a) Show n!  O(n n )
b) Show 2n  O(n!)
c) Show 3n  O(2n )
32) Prove that if
a b , then a 2 b 2 for integers a,b,