Discrete Final Exam I Group January Solutions

download Discrete Final Exam I Group January Solutions

of 8

Transcript of Discrete Final Exam I Group January Solutions

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    1/8

    UNIVERSITY FOR INFORMATION SCIENCE AND TECHNOLOGY

    Ohrid University, Macedonia

    Discrete mathematics

    - Final exam27.01.2012

    I group

    1. Let , , , 1,2,3, , , , 2,3, , ,A a b c B a b c C a b c . Find all sets (if any) M , such that:) A M M B ,

    )A M M C ,

    ) C M M A .

    (10)

    Solution:

    a)

    , , ,1 , , , ,2 , , , ,3 ,

    , , ,1,2 , , , ,1,3 , , , ,2,3

    M a b c M a b c M a b c

    M a b c M a b c M a b c

    b) , , , 2 , , , ,3M a b c M a b c

    c) Since C M M A , then this statement should be true C A . But C A , thereforesuch set M doesnt exist.

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    2/8

    2. Which of the following compound propositions are tautologies or contradiction:a) p p q q b) p q p r p q r

    i) by finding their truth table, ii) using the logical laws.

    (15)Solution:

    a) i)p q p q p q p q q p p q q

    T T F F T F T

    T F F T T T T

    F T T F T F F

    F F T T F F F

    From the truth table above this proposition p p q q is not tautology and not

    contradiction.

    ii)

    p p q q p p q q p p q q

    p p q p q p p q p q

    T q p q T p q p q

    b) i)

    p q r p q q r p r p q r p r p q r

    p q

    p r p q r

    T T T T T T T T T

    T T F T F F F T T

    T F T F F T F F T

    T F F F F F F T TF T T T T T T T T

    F T F T F T T T T

    F F T T F T T T T

    F F F F F T T T T

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    3/8

    From the truth table above this proposition p q p r p q r is

    tautology.

    ii)

    p q p r p q r p q p r p q r

    p q p r p q r p q p r p q r

    p q p r p q r

    p q p r p q r

    p q p p r p q r

    p q T r p q r

    p q r p q r p q r p q r p r

    p q r p q r p

    r p q r p q T

    p q r p q p r p q q r p q

    p r p q q r p q T T T

    3. Let 2,4,6,8,10A . Find the truth sets of the following propositional functions) : 2 7p x x x on A

    b) : 2q x x x b onA

    c) : 2,4,6 2,8l x x x on A

    (10)

    Solution:

    a) pT ,b)

    2

    qT

    c) 2,8,10qT

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    4/8

    4. a) Prove that 4 2 549 5 3 53 2n n .b) Prove by induction that: 2 2 2 2 11 2 3 ... 1 2 1 ,

    6n n n n n .

    (15)

    Solution:

    a)Since

    2

    3

    4

    (5 5

    2 2 mod49

    2 9 mod 49

    2 8 mod 49

    2 16 mod49

    2 32 mod 49 2 32 mod 49n n n

    and

    2

    3

    (4

    4 4 2 4 2

    3 3 mod49

    3 9 mod 49

    3 27 mod49

    3 32 mod49

    3 32 mod 49 3 3 3 9 32 mod 49

    n

    n n n n n

    Is true that

    4 2 55 3 53 2 5 9 32 53 32 mod 49

    45 32 53 32 mod49

    45 53 32 mod 49 98 32 mod 49

    0 mod49

    n n n n

    n n

    n n

    Therefore 4 2 549 5 3 53 2n n .

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    5/8

    b)1) 1n , 2

    11 1, 1 1 1 2 1 1 1

    6L R , so proposition is true for n=1,

    2)

    Let assume that the proposition is true for n=k, therefore

    2 2 2 21

    1 2 3 ... 1 2 16

    k k k k ,

    3) Let n=k+1,

    2 2 22 2 2 2 2 2 2 2

    22

    2

    11 2 3 ... 1 1 2 3 ... 1 1 2 1 1

    6

    1 2 6 61 2 1 6 11 2 1 6 1

    6 6 6

    31 2 2

    1 2 7 6 1 2 3 22

    6 6 6

    11 2 2 1 1

    6

    k k k k k k k k

    k k k k k k k k k k k k

    k k kk k k k k k

    k k k

    Since the proposition is true for n=k+1, then the proposition is true for all positive integers.

    5. A class has 10 male students and 10 female students. Find the number of ways the class canelect:

    (a) two class representatives;

    (b) 3 class representatives, one male and two females;

    (c) a class president and vice president.

    (10)

    Solutions:

    (a)

    2020! 20 19 18!20,2 190

    2 2! 20 2 ! 2!18!n C

    ways.

    b)

    10 10 10! 10 9 8!10 10 450

    1 2 2! 10 2 ! 2!8!n

    ways.

    (c)

    20! 20!20,2 20 19 380

    20 2 ! 18!n P

    ways.

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    6/8

    6. Find the number of ways 6 large books, 5 medium-size books, and 3 small books can beplaced on a shelf where:

    (a) there are no restrictions;

    (b) all books of the same size are together;

    (b) the large books are together.

    (10)

    Solutions:

    (a) 14 14!n P ways.

    b)

    number of ways placing

    5 medium - size books

    number of ways placing 3 small books =

    number of number of ways placing

    ways placing the 6 large books

    books in groups by their size

    3! 6 5 3 3! 6!5!3! waysn P P P

    .

    (c)

    number of number of ways placing

    ways placing the 6 large books

    books considering

    large books as a block

    9! 6 9! 6! waysn P

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    7/8

    7. For the following recurrence relation1 2

    5 6n n n

    a a a and initial conditions 0 10, 1a a ,

    find:

    (i)general solution; (ii) unique solution with the given initial conditions:(15)

    Solution:

    (i)The general soluition is obtained by first finding its characteristic polynomial x and itsroots and .

    Since, 1 2 1 25 6 5 6 0n n n n n na a a a a a , its characteristic polynomial is:

    2 5 6x x x with roots:

    2

    1 2 1 2

    5 5 4 6 5 7 5 7 5 7, 6, 1

    2 2 2 2x x x

    Since the roots are distinct, the general solution is:

    1 26 1nn

    na C C , 0n

    (ii) For the given initial conditions0 1

    0, 1a a , the unique solution follows:

    00

    1 2 1 2

    11

    1 2 1 2

    1 2

    1 2

    1 1 2 1

    0 6 1 0

    1 6 1 1 6

    0

    6 1

    1 17 1 ,

    7 7

    C C C C

    C C C C

    C C

    C C

    C C C C

    Therefore, 11 1 1

    6 1 6 17 7 7

    n nn n

    na

    , 0n .

  • 8/2/2019 Discrete Final Exam I Group January Solutions

    8/8

    8. (a) Solve the following equation for the real numbers, x and y. 2 3 2x y x y i i .

    (b)Evaluate

    30 25

    55

    22 41 1

    1 2 2

    i iii i

    .

    (15)

    Solution:

    (a)Since 2 3 2x y x y i i and from the equality of two complex numbers is true that:2 2 / 3

    3 1

    x y

    x y

    6 3 6

    3 1

    x y

    x y

    7 7

    2 2

    x

    y x

    1

    2 1 2 0

    x

    y

    (b) Since

    15 1530 2 15 152 2 15 4 3 3 15 3 15 151 1 1 2 1 2 1 2 2 2 2 2i i i i i i i i i

    11 1122 2 11 112 2 11 4 2 3 11 3 111 1 1 2 1 2 1 2 2 2 2i i i i i i i i i

    12 1225 2 12 122 2 12 4 3 121 1 1 1 2 1 1 2 1 1 2 1 2 1 2 1i i i i i i i i i i i i i

    22 224 2 2 22 2 2 4 4 6 2 62 2 2 2 2 1 2 1 2 2 1 2 1 2 2 2 2i i i i i i i i

    Then

    30 25 1215 4 455 4 13 3 3 6 6

    22 4 11 6

    4 6 6

    1 1 2 12 2 22 1 2 1

    2 21 2 2

    2 2 2 16 64 64 64 81

    i i i ii i i i i i

    i i i ii i

    i i i i i i i