Вы находитесь на странице: 1из 8

Name:

CIS 275 Intro to Discrete Mathematics


Exam 2 (Version Blue)
5 November 2013

Question

Points
Possible

18

16

22

12

12

12

Total

100

Points
Received

1. This exam is a closed-book, closed-notes exam.


2. Legibility counts! Make sure I can read (and find!) your answers.
If you need more room for an answer than that given, use the back side of the pages. Be sure to
leave a note indicating where the answer is.
3. This test should have 8 pages (including this cover sheet). Let me know now if your copy does
not have the correct number of pages.
4. The last page of this exam lists some relevant definitions. Also recall these sets:
Z: set of all integers
R: set of all real numbers
Z+ = {z Z : z > 0}
Z = {z Z : z < 0}
N= {z Z : z 0}
+

R = {r R : r > 0}
R = {r R : r < 0}

CIS 275: Intro to Discrete Mathematics

Exam 2

1. (18 points) Suppose the following definitions are made:

` : N Z+

t + 1, if t < 3
`(t) = 1,
if t = 3

t 1, if t > 3

h : N N N
h(w, y) = w + 2y
g : R+ R+

i : Z N
(
42, if x > 4
i(x) =
33, if x 4

g(z) = z2

(a) Calculate the following:


i. domain of h

ii. codomain of `

iii. range of i
iv. (` i)(5)
v. U 1 , where U = {(a, e), (b, c), (c, c), (d, e), (e, d)}

(b) Fill in the following table, writing yes if the given function has the stated property and
no otherwise.
1-1
h
g
`
i

onto

CIS 275: Intro to Discrete Mathematics

Exam 2

2. (16 points) Consider the following relations on the set {2, 0, 1, 3}:
S1
S2
S3
S4

=
=
=
=

{(2, 0), (2, 1), (2, 3)}


{(0, 0), (1, 1), (1, 3), (2, 2), (3, 0), (3, 1), (3, 3)}
{(2, 2), (0, 0), (0, 3), (1, 1), (3, 0), (3, 3)}
{(1, 1), (3, 3)}

Fill in the table below to indicate which relations possess which properties:
Write yes to indicate that the given relation has the stated property.
Write no to indicate that the given relation does not have the stated property.
S1

S2

S3

S4

Reflexive
Symmetric
Antisymmetric
Transitive

3. (8 points) Let B be the following set of bit strings:

B = {0010, 1010, 1100, 10011, 01001, 11011}


Furthermore, define the relations R1 , R2 on B as follows:
(b1 , b2 ) R1 if and only if the length of b1 is less than or equal to the length of b2
(b1 , b2 ) R2 if and only b1 and b2 contain exactly the same number of 0s
(a) R1 is not an equivalence relation: explain why not by explicitly identifying how one of
the three essential properties fails to hold.

(b) R2 is an equivalence relation: list the equivalence classes of R2 .

CIS 275: Intro to Discrete Mathematics

Exam 2

4. (22 points)
(a) Give a relation on the set {1, 4, 6} that is transitive and not reflexive.

(b) Give a relation on the set {1, 4, 6} that is symmetric and not transitive.

(c) Give an equivalence relation on the set {2, 7, 8, 9} that has exactly two equivalence
classes.

(d) How many elements are in the smallest equivalence relation on the set {2, 4, 6, 8, 10}?

(e) How many elements are in the largest equivalence relation over the set {2, 4, 6, 8, 10}?

(f) Give a function h : {3, 1, 4} {6, 0, 2} that is not 1-1 and not onto.

(g) Give a function f : Z Z that is onto and not 1-1.

(h) Give a function g : Z N N that is 1-1 and not onto.

(i) Give a function e : Z+ N that is 1-1 and onto.

(j) How many functions have domain {1, 2, 3} and codomain {4}?

(k) How many bijections have domain {1, 2, 3} and codomain {4}?

CIS 275: Intro to Discrete Mathematics

Exam 2

5. (12 points) Consider the following claim:


If r is a palfow and q is phoric, then q ? r is not thetic.
Note: I am not asking you to prove the claim, so you do not need to worry about the definitions
of thetic, phoric, or palfow.
(a) Suppose you wanted to prove this claim via a direct proof.
i. What would you need to assume?

ii. What would you need to show?

(b) Suppose you wanted to prove this claim via a proof by contraposition.
i. What would you need to assume?

ii. What would you need to show?

(c) Suppose you wanted to prove this claim via a proof by contradiction.
i. What would you need to assume?

ii. What would you need to show?

CIS 275: Intro to Discrete Mathematics

Exam 2

6. (12 points) Give a proof of the following claim:


Let S W W and T W W be relations on set W . If S and T are both symmetric,
then S\T is symmetric.
Note: As always, you should follow the course format for writing proofs. Be explicit about what
youre assuming, what you need to show, and your underlying reasoning. You do not need to
rewrite the claim.

CIS 275: Intro to Discrete Mathematics

Exam 2

7. (12 points) Give a proof of the following claim:


Let g : C D, h1 : D F, and h2 : D F be functions. If g is onto and
h1 g = h2 g, then h1 = h2 .
Recall: Two functions f : X Y and k : X Y are equal (written f = k) provided that, for
all x X, f (x) = k(x).
Note: As always, you should follow the course format for writing proofs. Be explicit about what
youre assuming, what you need to show, and your underlying reasoning. You do not need to
rewrite the claim.

CIS 275: Intro to Discrete Mathematics

Exam 2

A Collection of Some Relevant Definitions

Subsets
Let A and B be sets, where U is the universal set.
A is a subset of B if and only if the following condition holds:
x U , (x A x B).

Relations
Let R X X be a relation.
R is reflexive if and only if the following condition holds:
x X, ((x, x) R).
R is symmetric if and only if the following condition holds:
x, y X, ((x, y) R (y, x) R)
R is antisymmetric if and only if the following condition holds:
x, y X, ((x, y) R (y, x) R x = y)
R is transitive if and only if the following condition holds:
x, y, z X, ((x, y) R (y, z) R (x, z) R)
R is an equivalence relation if and only if R is reflexive, symmetric, and transitive.
R is a partial order if and only if R is reflexive, antisymmetric, and transitive.
R is a total order if and only if R is a partial order and the following condition holds:
x, y X, ((x, y) R (y, x) R)

Functions
Let f : X Y be a function.
f is an injection (or 1-1) if and only if the following condition holds:
x1 , x2 X, ( f (x1 ) = f (x2 ) x1 = x2 ).
f is a surjection (or onto) if and only if the following condition holds:
y Y, (x X, f (x) = y).
f is a bijection (or a 1-1 correspondence) if and only if f is both 1-1 and onto.

Вам также может понравиться