Sample Tests
389
Chapter 2Test 1
1. Let A = cfw_a, c, e, h, k , B = cfw_a, b, d, e, h, i, k, l , and C = cfw_a, c, e, i, m . Find each of the following sets.
(a) A B
(b) A B C
(c) A C
(d) A B C
(e) A B
(f) A (B C)
2. Prove or disprove that if A , B , and

4. Find all shortest path weights with the FloydWarshall method for the graph on the right side.
- give all matrices that are obtained on the way
(can copy symbol for infinity here: )
1
D3 =
2
9
5
2
Solution: changes shown in red, all the rest or matrices

4. How many ways are there to arrange the letters a, b, c, and d such that a is not followed immediately
by b?
4! 3! =18
5. What is the minimum numbers of students, each of whom comes from one of the 50 states, who
must be enrolled in a university to guar

Homework #4
-CS 2510
IMPORTANT NOTE: For these problems, dont just give final result, show the steps (e.g. if using
multiplication principle instead of saying 5040, show what you multiply by what: 10*9*8*7. You
can actually leave it as that, calculating w

CS 2510
HOMEWORK #3
NOTE: These answers did not get a 100.
PROBLEM 1
Consider the function f(x) = + 3
(a) Find the domain and range of f:
Domain: x 3
Range: y3
(b) Calculate the values of f
at x=1,
f(1) =4
at x=1/4,
f(1/4) =3.5
at x= -1,
f(-1) =N/A
at x=4

#1. Page 75, #20. Prove the square of an even number is an even number
We want to show that if n is even then n2 is even. Many of you misread this!
Proof
Suppose that n is even.
Then n = 2k for some integer k
Definition of even
Then n2 = (2k) 2 = 4k2 = 2(

Homework #1
-Please type your answers after each given problem. Do not erase problem formulations.
You may need to use the following symbols: , . Youll find other symbols below. Copy and
paste them to your answers where needed.
-#1. Let p, q, and r be the

Problem 1.
Describe the following sets using set builder notation:
a) cfw_0, 5, 10, 15, 25
cfw_x| x W and x 25 and x is a multiple of 5
b) cfw_-3, -1, 1, 3
cfw_x| x Z and -3 x 3 and x is odd
c) cfw_a, e, i, o, u
cfw_x | x is a small alphabet vowel
Problem

Problem 4.
Give a set notation for areas of Venn diagrams using A, B, C and universal set U, as well as any
operations on sets. Problem 4a is done for you as an example.
Diagram 1
Diagram 2
Diagram 3
a) Diagram 1, grey area: A B C
b) Diagram 1, white area

Homework #1
-Please type your answers after each given problem. Do not erase problem formulations.
You may need to use the following symbols: , . Youll find other symbols below. Copy and
paste them to your answers where needed.
-#3. Show that each of thes

Homework #1
-Please type your answers after each given problem. Do not erase problem formulations.
You may need to use the following symbols: , . Youll find other symbols below. Copy and
paste them to your answers where needed.
-#6. Determine the truth va

Homework #1
-Please type your answers after each given problem. Do not erase problem formulations.
You may need to use the following symbols: , . Youll find other symbols below. Copy and
paste them to your answers where needed.
-#10. Use the rules of infe

Proving
If my client is guilty, then the knife was in the drawer.
Either the knife was not in the drawer or Jason Pritchard saw the knife.
If the knife was not there on October 19, it follows that Jason Pritchard
did not see the knife.
Furthermore, if the

Equivalence rules
Expression
RVS
R V S) V Q
(R S) Q
(R V S)
(R S)
RS
R
PQ
Equivalent to
SVR
R (S Q)
R V (S V Q)
R S
R V S
R V S
(R)
(P Q) (Q P)
Abbreviation for rule
Commutative comm
Associative-assoc
De-Morgans Laws De-M.
Implication imp
Double Negation-