Subha Sharma Pouedel 1001852428 D.Math cc103n

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 12

FACULTY OF BUSINESS & MANAGEMENT

FINAL EXAMINATION

Student ID (in Figures) : 1 0 0 1 8 5 2 4 2 8


Student ID (in Words) : One zero zero one eight five two four two
eight

Course Code & Name : CC103 Discrete Mathematics 1


Semester : September – December 2020
Lecturer : Mr. Yong San Loo
Duration : 3 Hours

INSTRUCTIONS TO CANDIDATES:
Answer ALL Questions (Total 100 marks)

This question paper consists of 3 pages, excluding the cover page. Candidates are
required to answer ALL questions and submit it in the CN dropbox.

Warning:
The University Examination Board of UCSI University regards cheating as a most serious
offence and will not hesitate to mete out the appropriate punitive actions according to the
severity of the offence committed, and in accordance with the clauses stipulated in the
Students’ Handbook, up to and including expulsion from UCSI University.
Answer ALL questions

Question 1
(a) Let p and q be the propositions defined as below.
p : It is below freezing.
q : It is snowing.

Express below propositions in term of p and q and logical connectives.


(i) It is below freezing and snowing.
Answer: - (p∧q)

(ii) It is below freezing but not snowing.


Answer: - (p ∧¬q)

(iii) It is not snowing or not below freezing.


Answer: - (¬q ∧ ¬p)

(b) Determine the nature of the following statements using a truth table:
(i) (p ∨ q) and ¬(¬p ∧ ¬q)
Answer:
(ii) p → (p ∨ q)
Answer:

(c) Write the converse and the contrapositive of the following implication:
“If it is sunny tomorrow, then I will go for a walk in the woods.”
(i) Converse
Answer: -If I go for a walk in the woods, then it is sunny tomorrow.
(ii) Contrapositive
Answer: -If I do not go for a walk in the woods, then it is not sunny tomorrow.
Question 2
(a) Translate each of these statements into logical expressions using predicates, quantifiers and
logical connectives.

Let P(x) be “x is polite”; let F(x) be “x is your friend”; and let the universe of discourse be all people.
(i) No one is polite.
(b) Answer: -

∀x (P(x) ^ Q(x))
(i) Everyone is your friend and is polite.
Answer: -
∀x (P(x) ^ ¬Q(x))
(ii) Not everybody is your friend or someone is not polite.
Answer: -
∀x(P(x)V Q(x))

(c) Show that the premises “If you send me a gift, then I will finish baking a chocolate cake,” “If
you do not send me a gift, then I will go to the shopping mall,” and “If I go to the shopping mall, then I
will eat durians” lead to the conclusion “If I do not finish baking a chocolate cake, then I will eat
durians.”
(d) Use a direct proof to show that the sum of two odd integers is even.
Answer: -

(e) Negate the following phrase: “Sam has a smart phone and he has a laptop.”
Answer: - Sam has a smartphone with his laptop.
(3 marks)
[Total: 25 Marks]
Question 3
(a) Given A = {x, y}, B = {1, 2}, and C = {a, b, c}. Find
(i) cardinality of set A.
Answer: Cardinality of set A=2

(ii) power set of B.


Answer: - {}{1}{2} {1,2}

(iii) Cartesian product of A x B x C.


Answer: -
(b) Let f and g be functions from {1,2,3,4} to {a,b,c,d} and from {a,b,c,d} to {1,2,3,4}, respectively,
such that f(1) = d, f(2) = c, f(3) = a, f(4) = b, and g(a) = 2, g(b) = 1, g(c) = 3, g(d) = 2.
Draw a bipartite (2-part) graph representation to depict the above functions and answer the
following questions.

(i) Is f one-to-one?
Answer:

(ii) Is g one-to-one?
Answer:
(iii) Is f onto?
Answer:

(iv) Is g onto?

Answer:

(c) Find these values.


(i) -0.33
(ii) 3/4 ∙ 16/3 (
(iii) 1/4 + 9/6 
(d) If f(x) = 2x2 + 1 and g(x) = 3x + 3 are functions from R to R, then find
(i) f○g
(ii) f+g
Answer
Question 4
(a) Describe an algorithm that takes a list of n integers as input and finds the location of the last
even integer in the list or returns 0 if there are no even integers in the list.
Answer:

(b) Use binary search algorithm to search 24 from the given list.
40, 22, 38, 24, 36, 26, 34, 28, 32, 30 (6 marks)

(c) Use bubble sort algorithm to sort the list below into an increasing order.
3, 2, 4, 1, 5

Given list
3, 2, 4, 1, 5
First (i) Insertion sort
Step1: Compare the second element (1) with first element (2) .2 is greater than 3. So, it is
in correct position.
Step2: Compare the third element (3) with second element (2). 2 is less than 4, so 2 is
before 1.
Step3: Compare the third element (3) with first element (4) 2 is less than 7, so 2 is
before 5
Step4: Compare the First element (1) with first element (2), 1 is less than 5, so 1 is
before 2.
Step5: Compare the fifth element (5) with first element (4).5 is greater than 4.
Compare

(d) Given the following matrices

E= 5 9 4 , F= -3
8
12

Find:
(i) Size of E
(ii) EF
(iii) ET
Ans
END OF QUESTION PAPER

You might also like