Math2081 2013B Midterm Sol BB

Embed Size (px)

Citation preview

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    1/8

    1

    MATH20812013 B

    -

    MATHEMATICS FORCOMPUTING

    -

    MID-SEMESTER TEST

    Exam Date: 24th July 2013

    Reading Time: 15.0015.10

    Writing Time: 15.1016.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 pagewhich 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 mightget 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 ANSWERIS:

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    2/8

    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() =?3. Let A N be a finite set. Can there exist an onto function f : A P(A)?

    a) The left side yields x (A \ B) \ C x (A \ B) and x C x A and x B and x C; all this

    by definition of \.

    Now let us consider the right half of the expression. Then x A \ (C (A B)) x A and x (C

    (A B)) [by definition of \] x A and x [by definition of complement] x A and x [by DeMorgans rules] x A and x C and x [DeMorgansrules] x A and x C and (x A or x B).

    Both sides contain x A and x C. Since we now x A, x A in the right hand side can not

    be true. But, since is true, we see that x 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 containsnumbers. So they can not be equal.

    2. No, P() = {}. Remember, P() contains all subsets of . The only subset of isitself.

    3. No, such a function can not exist. Let A be a finite set with |A| = k. Then |P(A)| = 2k, by a factin the lecture. We have that k < 2kfor all k N. So we have more outputs than inputs and

    hence an onto function can not exist.

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    3/8

    3

    Question 2: (10 + 10 Marks)

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

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

    a) This is not reflexive, as, for example, (0, 0) , 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) . Then we

    know x y. But then y x and hence (y, x) , by definition of. It is not transitive: we have (1, 2)

    and (2, 1) , since 1 2 and 2 1. To be transitive, would need to contain (1, 1), which is not

    possible, since not 1 1 not 1 < 1. Hence can not be an equivalence relation.

    b) This is not true. Define = {(x, x) | x N} {(1, 2), (2, 1), (2, 3), (3, 2)}. Then is reflexive andsymmetric by definition; since we added (1, 2) and (2, 1) as well as (2, 3) and (3, 2). However, is not

    transitive, since we have (1, 2) and (2, 3) , but we do not have (1, 3) .

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    4/8

    4

    Question 3: (10 + 10 Marks)

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

    { [[[There is a typo here. It was supposed to say x Z and x Z, not N. Most peopleunderstood 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 thefollowing 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 Z, then obviously x1 y1. If x, y Z, then obviously

    x/2 y/2. If x Z and y Z, then x1 Z and y/2 N and hence f(x) g(y). The case x Z and y

    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 Z then define x = y + 1 and f(x) = (y + 1)1 = y. If y 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 = {a1, a2, a3}, B = {b1, b2} and C = {c1, c2}. Define f(a1) = f(a2) = b1and f(a3) = b2. Define g(b1) = c1 and g(b2) = c2. Then f is onto and g is one-one, by definition. However, a1

    a2, but h(a1) = g(f(a1)) = g(b1) = c1 and also h(a2) = g(f(a2)) = g(b1) = c1. Hence h is not one-one.

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    5/8

    5

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

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

    c) Simplify ||3x||x3|| for 2 < x < 3d) Let x, y R. Prove: a) Case 1: 4|6x| = 5 1 = |6x|. But this is impossible, since |x| 0. Hence there is no solution

    in this case.

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

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

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

    d) Let x= a.b and y = c.d, where 0 b, d < 1 and a, b 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 b + d < 2. Let 1.e = b + d. Then obviously

    by definition of the floor function.

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    6/8

    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 N and letfurthermore xi N for 1 i 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, x1 = 0 and x2 = 1. Then

    .

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    7/8

    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 = .

  • 7/30/2019 Math2081 2013B Midterm Sol BB

    8/8

    8

    Extra sheet