Math2081 2012A Midterm Sol BB

Embed Size (px)

Citation preview

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    1/8

    1

    MATH2081

    -

    MATHEMATICS FORCOMPUTING

    -

    MID-SEMESTER TEST

    Exam Date: 28th March 2012

    Reading Time: 9.309.40

    Writing Time: 9.4010.40

    Examination Room: 1.2.26

    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.

    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 2012A Midterm Sol BB

    2/8

    2

    Question 1: (10 + 10 Marks)

    a) Answer the following questions and explain your answer.i. Is the empty set a set?

    ii. Is there a difference between and {}? If so, what is it? If not, why not?iii. Let A = {x N | x is even}. Is A P(N)? (P(N) is the powerset of N.)iv. Let A N be an infinite set and B N be an infinite set. Will A \ B always be finite?

    b) Is the following equation true for all sets A, B and C? C \ (A B) = (C \ A) (C \ B). If it istrue, prove it, if it is not true, give a counter example.

    a) i) Of course. We defined it that way. ii) Yes. The first set is just the empty set. The second set is a

    set, that contains the empty set. So in particular, the second set is not empty and hence the two are

    different. iii) Yes. The powerset of N contains all subsets of N. The even numbers are a subset of N

    and hence element of the powerset. iv) No. Let A be all even numbers and B be all odd numbers. ThenA\ B = A and hence A is infinite.

    b) This is true: x C \ (A B) x C and x (A B) [Def \] x C and x [Def.complement] x C and x [DeMorgan] x C and x and x [Def ] x C \ A and x C \ B [Def. \] x (C \ A) (C \ B) [Def. ]

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    3/8

    3

    Question 2: (10 + 10 Marks)

    a) Let A = {a, b, c} and let = {(a, a), (a, b), (b, b), (b, a), (c, c)}. Is reflexive, symmetric,transitive? Is an equivalence relation? Prove your claims.

    b) Give an example of a relation over N x N that is reflexive and transitive, but notsymmetric. Prove your claims.

    a) This is reflexive, since we have (x, x) for all x A. It is symmetric, since we have (a, b) and(b, a) in . Furthermore, is transitive. The only pairs to check are (a, a), (a, b) (a, b) and (b, a),(a, a) (b, a) and (b, b), (b, a) (b a), but in all cases we have the corresponding pairs in . So is an equivalence relation.

    b) For example, define = {(x, x) | x N} {(0, 1), (1, 2), (0, 2)}. Then is reflexive, by the first

    part of the definition. The second part preserves transitivity: (0, 1) and (1, 2) are in and so is (0,2); other pairs check out similarly. But is not symmetric: for example, we have (0, 1) in , but (1 0)is not. So has the required properties.

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    4/8

    4

    Question 3: (10 + 10 Marks)

    a) Let a R and let f : N N be defined by:

    Is f one-one, onto, bijective? Prove your claims.

    b) Show the following. Let : A B be bijective and g : B C be bijective. Define h : A C byh(x) = f(g(x)). Show that h is bijective.

    a) This is not one-one. For example, f(2) = 4 = (7 + 1)/2 = f(7). It is onto. Let y be given. If y = 0,then f(0) = 2 * 0 = 0 , since 0 is even. If y > 0, then let x = 2y1 and x is odd. Then f(x) = f(2y

    1) = (2y1 + 1)/2 = 2y/2 = y. Since f is not one-one, f is not bijective.

    b) One-one: Let x y. Then f(x) f(y), since f is one-one. But then g(f(x)) g(f(y)), since g is one-one. So h(x) h(y) and h is one-one. Onto: let y C be given. Then there exists z B such thatg(z) = y, since g is onto. Furthermore, there exists x A such that f(x) = z. So h(x) = g(f(x)) = g(z)= y. Hence h is onto. Since h is onto and one-one, it is bijective.

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    5/8

    5

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

    a) Solve for x: 8x-3 + 4 = 20.b) Solve for x: ||x5|7| = 2c) Compute log16 64 = ?d) Compute (log2 7)4 = ?

    a) 8x-3 + 4 = 20 8x-3 = 16 log8(x-3) = log8(16) x3 = 4/3 x = 4 1/3.

    b) Case 1: |x5|7 = 2 |x5| = 9. Case 1.1: x5 = 9 x = 14. Case 1.2: x5 =9 x =4. Case2: |x5|7 =2 |x5| = 5. Case 2.1: x5 = 5 x = 10. Case 2.2: x5 =5 x = 0. So there arefour solutions: x {4, 0, 10, 14}.

    c) log16 (64) = log16 (4 * 16) = log16 (4) + log16 (16) = + 1 = 1.5

    d) Compute (log2 7)4 = ?

    Hence (log2 7)4 =2

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    6/8

    6

    Question 5: (10 + 10 Marks)

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

    1) 4 + 8 + 12 + ... + 444 =2) 1 * 3 * 6 * 10 * ... * 55 =3) 2 + 4 + 8 + ... + 256 =4) 98 + 76 + 54 + 32 =

    b) You have a race with your little brother. You give him a head start of 20m. His speed is 3/7th of

    your speed. After what distance have you caught up with him?

    a)1) 2) 3) 4) ( )

    b) This is 20 + 3/7*20 + (3/7)2*20 + (3/7)3*20 +

    = 20 * (1 + 3/7 + (3/7)2 + (3/7)3+ )

    =

    = 20 * (1/(1-3/7)) = 20 * 7/4 = 35.

    So you catch you little brother after 35m.

  • 7/30/2019 Math2081 2012A 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) Do 2x2 matrices A and B exist, such that , but ? Ifyes, give an example. If not, explain why.

    a) (Row 1Row 2) (Row 22 * Row 1) { |

    } (Row 2 /10) = { | } (Row 1 + 2 * Row 2).

    So the inverse matrix is

    [

    ].

    b) A and B as specified do exist. For example, let and . Both are obviouslynot equal to . But multiplying them yields:

  • 7/30/2019 Math2081 2012A Midterm Sol BB

    8/8

    8

    Extra sheet