You are on page 1of 8

1

MATH2081 2013 B
-
MATHEMATICS FOR
COMPUTING
-
MID-SEMESTER TEST

Exam Date: 24
th
July 2013

Reading Time: 15.00 15.10

Writing Time: 15.10 16.10

Examination Room: 2.01.04

Name:

ID No:

Group:

RULES

1. Calculators must not be taken into the examination room.

2. There are 6 questions. You must answer only 5 of them. There is a total of 100
marks. Each question is worth 20 marks. Please write at the bottom of this page
which question you choose not to answer. If you do not indicate a question, the first
question will not be marked.

3. Show all your work to get full marks. Even if your answer is incorrect, you might
get partial credit for the right way of reasoning.

4. This examination contributes 20% to the total assessment of the Math2081 course.

5. There are total 8 pages (including cover) in this booklet.

THE QUESTION THAT I CHOOSE NOT TO ANSWER IS:
2

Question 1: (10 + 10 Marks)

a) Prove that (A \ B) \ C = A \ (C (A B)).

b) Please answer the following questions and explain your answers.
1. Does there exist a set A _ N such that A = P(A)? (P(A) is the powerset of A)
2. Is P(C) = C?
3. Let A _ N be a finite set. Can there exist an onto function f : A P(A)?


a) The left side yields x e (A \ B) \ C x e (A \ B) and x e C x e A and x e B and x e C; all this
by definition of \.

Now let us consider the right half of the expression. Then x e A \ (C (A B)) x e A and x e (C
(A B)) [by definition of \] x e A and x e

[by definition of complement] x


e A and x e

[by DeMorgans rules] x e A and x e C and x e

[DeMorgans
rules] x e A and x e C and (x e A or x e B).

Both sides contain x e A and x e C. Since we now x e A, x e A in the right hand side can not
be true. But, since is true, we see that x e B must be true. But then both sides are equivalent
and the claim is proven.

b)
1. No, this can not exist. P(A) will be a set that contains sets, whereas A will be set that contains
numbers. So they can not be equal.
2. No, P(C) = {C}. Remember, P(C) contains all subsets of C. The only subset of C is C
itself.
3. No, such a function can not exist. Let A be a finite set with |A| = k. Then |P(A)| = 2
k
, by a fact
in the lecture. We have that k < 2
k
for all k e N. So we have more outputs than inputs and
hence an onto function can not exist.


3

Question 2: (10 + 10 Marks)

a) Let o _ N x N be defined by o = {(x, y) | x = y or x < y}. Is o reflexive, symmetric, and
transitive? Is o an equivalence relation?

b) Let o _ N x N be a relation. Is the following true? If o is reflexive and symmetric, then o is
transitive. If it is true, prove it, if it is false, give a counterexample.

a) This is not reflexive, as, for example, (0, 0) e o, since not 0 = 0 nor 0 < 0. For symmetric, please
note that x < y implies x = y. So basically, it is enough to consider x = y. So let (x, y) e o. Then we
know x = y. But then y = x and hence (y, x) e o, by definition of o. It is not transitive: we have (1, 2)
e o and (2, 1) e o, since 1 = 2 and 2 = 1. To be transitive, o would need to contain (1, 1), which is not
possible, since not 1 = 1 not 1 < 1. Hence o can not be an equivalence relation.

b) This is not true. Define o = {(x, x) | x e N} {(1, 2), (2, 1), (2, 3), (3, 2)}. Then o is reflexive and
symmetric by definition; since we added (1, 2) and (2, 1) as well as (2, 3) and (3, 2). However, o is not
transitive, since we have (1, 2) e o and (2, 3) e o, but we do not have (1, 3) e o.






4

Question 3: (10 + 10 Marks)

1) Is the following function f : R R one-one, onto, bijective? Prove your claims.

{

e

[[[There is a typo here. It was supposed to say x e Z and x e Z, not N. Most people
understood Z anyway, so it was no problem.]]]

2) Let f : A B and g : B C be total functions. Define h : A C by h(x) = g(f(x)). Is the
following true? If f is onto and g is one-one, then h is one-one. If it is true, prove it. If it is
false, give a counterexample.


a) One-one. Let x = y be given. If both x, y e Z, then obviously x 1 = y 1. If x, y e Z, then obviously
x/2 = y/2. If x e Z and y e Z, then x 1 e Z and y/2 e N and hence f(x) = g(y). The case x e Z and y e
N is symmetrical. In all cases f(x) = f(y) and hence f is one-one. [[[Note that with N the above function
is not onto, as f(0) = f(-2) = -1.]]]

Onto: Let y be given. If y e Z then define x = y + 1 and f(x) = (y + 1) 1 = y. If y e Z, then define x =
2*y and we get f(x) = 2*y/2 = y. In both cases f(x) = y and hence f is onto.

Since f is one-one and onto, f is bijective. [[[So in the above case, f is not bijective.]]]


b) This is not true. For example, let A = {a
1
, a
2
, a
3
}, B = {b
1
, b
2
} and C = {c
1
, c
2
}. Define f(a
1
) = f(a
2
) = b
1

and f(a
3
) = b
2
. Define g(b
1
) = c
1
and g(b
2
) = c
2
. Then f is onto and g is one-one, by definition. However, a
1

= a
2
, but h(a
1
) = g(f(a
1
)) = g(b
1
) = c
1
and also h(a
2
) = g(f(a
2
)) = g(b
1
) = c
1
. Hence h is not one-one.





5

Question 4: (5 + 5 + 5 + 5 Marks)

a) Solve for x: | 4 |6 x|| = 5
b) Solve for x:


c) Simplify ||3 x| |x 3|| for 2 < x < 3
d) Let x, y e R. Prove:

a) Case 1: 4 |6 x| = 5 1 = |6 x|. But this is impossible, since |x| > 0. Hence there is no solution
in this case.

Case 2: 4 |6 x| = 5 9 = |6 x|. Case 2.1: 6 x = 9 x = 15. Case 2.2: 6 x = 9 x = 3.

So there are two solutions: x = 15 and x = 3.

b)



c) We have 3 x > 0 and x 3 < 0 for 2 < x < 3. Hence ||3 x| |x 3|| = |3 x + x 3| = |0| = 0.

d) Let x= a.b and y = c.d, where 0 s b, d < 1 and a, b e Z. There are two cases to consider here.

Case 1: b + d < 1. In this case obviously by definition of floor function. But
.

Case 2: 1 s b + d < 2. Let 1.e = b + d. Then obviously
by definition of the floor function.








6
Question 5: (10 + 10 Marks)

a) Express using summation and/or production symbols; do not compute.

1) 0 + 2 + 4 + [[[6 +]]] 8 + + 100 = [[[A typo. 6 + was missing.]]]

2) 0 + 2 + 6 + 14[[[12]]] + 24[[[20]]] + = [[[As a consequence, this was wrong, too]]]

3) (1 * 3 ) + ( 1 * 3 * 9) + (1 * 3 * 9 * 27) + =

4) 1 + 21 + 321 + 4321 + + 987654321 =

b) Prove or disprove the following. To disprove, please give a counterexample. Let n e N and let
furthermore x
i
e N for 1 s i s n. Then

.

a)
1)

[[[Solution for the correct version]]]



2)

[[[Solution for the correct version]]]



3)



4)




b) This is false. Just let n = 2, x
1
= 0 and x
2
= 1. Then

.
7
Question 6: (10 + 10 Marks)

a) Use the Gauss Jordan Algorithm to compute A
-1
for the matrix [


].

b) Let A and B be 2x2 matrices. Prove or disprove the following.
A * B = [


] if and only if at least one of A or B is equal to [


]


a)




|




So the inverse matrix is [


].

b) This is not true. For example, let A = [


] and B = [


]. Then both A and B are not equal to
[


], but A * B = [


] [


].

8


Extra sheet

You might also like