0% found this document useful (0 votes)
27 views

DM Midterm Assessment Coursework (2019)

This document consists of a midterm assessment for a course in discrete mathematics. It contains 5 questions assessing students' knowledge of set theory, functions, propositional logic, predicate logic, and Boolean algebra. Students are instructed to answer all 5 questions, which are worth a total of 100 marks. The paper tests a range of skills including using Venn diagrams, algebraic manipulation of sets, analyzing functions for properties like injectivity and surjectivity, constructing truth tables, applying rules of inference to symbolic logic statements, and minimizing Boolean expressions.

Uploaded by

PAING LIN HTIKE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

DM Midterm Assessment Coursework (2019)

This document consists of a midterm assessment for a course in discrete mathematics. It contains 5 questions assessing students' knowledge of set theory, functions, propositional logic, predicate logic, and Boolean algebra. Students are instructed to answer all 5 questions, which are worth a total of 100 marks. The paper tests a range of skills including using Venn diagrams, algebraic manipulation of sets, analyzing functions for properties like injectivity and surjectivity, constructing truth tables, applying rules of inference to symbolic logic statements, and minimizing Boolean expressions.

Uploaded by

PAING LIN HTIKE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Midterm Assessment Coursework

UNIVERSITY OF LONDON

BSc, CertHE and Diploma Examination

COMPUTER SCIENCE

Discrete Mathematics

This paper consists of five questions. You should answer all five questions.

Full marks will be awarded for complete answers to a total of Five questions.
The marks for each part of a question are indicated at the end of the part in [.]
brackets.

There are 100 marks available on this paper.

© University of London 2019

Discrete Mathematics PAGE 1 of 7


Question 1 Set Theory

(a) i. Describe the following set using the listing method:

A = {x : x ∈ Z and x2 < 100}

[2]

ii. Rewrite the following set using the set builder method:

B = {2, 5, 8, 11, 14, 17, 20}

[2]

(b) Given two sets A and B, Use the membership table to show that (A−B)∪
(B − A) = (A ∪ B) − (A ∩ B) [6]

(c) Let ? be a new operator on sets is defined as follows: Given two sets A
and B, A ? B = A ∩ B.

i. Draw a Venn Diagram for A ? B [2]

ii. By using the laws of the algebra of sets show that the following is true:

• (A ? A) ? (B ? B) = A ∪ B [2]
• (A ? B) ? (A ? B) = A ∩ B [2]

(d) Given three sets A, B and C, use the laws of the algebra on sets to show
that (A ∪ B ∪ C) ∩ (A ∪ B ∪ C) ∩ (A ∪ C) = ∅ [4]

Discrete Mathematics PAGE 2 of 7


Question 2 Functions

(a) Let f (x) = x mod 3, where f (x) is the remainder when x is divided by 3,
and f : N → {0, 1, 2}.

i. Find f (7) and f (12). [1]


ii. What is the set of pre-images of 2? [1]
iii. Say whether or not f (x) is injective( one-to-one), justifying your an-
swer. [2]
iv. Say whether or not f (x) is surjective(onto), justifying your answer. [2]

x
(b) Let B = {x : x ∈ R and x 6= 1} and g : B → B is defined by g(x) = x−1
.

i. Show that the function g is a bijection. [3]


ii. Find g −1 . [2]

(c) Let f : R →]1, +∞[ with f (x) = 2x + 1.

i. Find the inverse function f −1 . [2]


ii. Plot the curves of both function, f and f −1 in the same graph. [2]
iii. What can you say about these two curves? [1]

(d) Let A and B be two finite sets with |A| = |B| and f be a function from A
to B. show that if f is an injective (one-to-one) function then it is also a
surjective function. [4]

Discrete Mathematics PAGE 3 of 7


Question 3 Propositional Logic

(a) Let n ∈ {1, 2, 3, 4, 5, 6, 7, 8, 9} and let p and q be two propositions concern-


ing the integer n.

p : n is even and q:n≥5

Draw up the appropriate truth table and find the truth set for each of the
propositions p ⊕ ¬q and ¬(p → q). [6]

(b) Let p and q be two propositions defined as follows: p means ’The home
football team wins’ whereas q means ’it’s raining’

i. Express each of the four following compound propositions symbolically


by using p, q and appropriate logical symbols.

‘The home football team wins whenever it’s raining’


‘neither the home football team wins nor it’s raining’
‘ Either the home football wins or it’s raining, but not both’
‘The home football team wins only if it’s raining’

[4]
ii. What are the contrapositive, the converse and the inverse of the impli-
cation
‘The home football team wins only if it’s raining’ [2]

(c) Consider the following four propositions:


s means ’”Samir comes to the party”
c means ’”Callum comes to the party”
r means ’”Ruby comes to the party”
j means ’”Jay comes to the party”.
Express each of the three following compound propositions symbolically
by using s, c, r, j and appropriate logical symbols.

i. ”If Samir comes to the party and Callum does not come to the party,
then Jay will come to the party .
ii. ”If Jay comes to the party, then, if Callum doesnt come then both Samir
and Ruby come.
[4]

Discrete Mathematics PAGE 4 of 7


(d) A tautology is a proposition that is always true. Let p, q and r be three
propositions, show that (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r) is a tautology. [4]

Discrete Mathematics PAGE 5 of 7


Question 4 Predicate logic
(a) Let A be the set of Discrete Mathematics students, B the set of students
of Boolean Algebra and S the set of all students. Use rules of inference
with quantifiers to formalise the three following statements:

P : If someone is a student of Discrete Mathematics, then, they must


study Boolean Algebra”.

Q : If there exists at least one student of Discrete Mathematics, then, all


students of Boolean Algebra study Discrete Mathematics.

R : If all students of Boolean Algebra study Discrete Mathematics then


nobody studies Discrete Mathematics”. [6]
(b) Prove that the following hypotheses: H1, H2, H3 and H4 implies the propo-
sition: T , where :

H1: P ∧Q,
H2: P → Q ∧ S,
H3: R→S,
H4: T ∧P →R
[9]
(c) The following proposition R is wrong :

R : if ∃xP (x) ∧ ∃xQ(x) is true then ∃x(P (x) ∧ Q(x)) is true

The following proof of R, using inference rules with quantifiers is supposed


to prove the proposition R, but it is also wrong.
Identify the erroneous step or steps in this reasoning and explain why it is
wrong :
H: ∃xP (x) ∧ ∃xQ(x) ,
Step1 : By Simplification from H, we get: ∃xP (x)
Step2 : By Existential instantiation from Step1, we get: P (c)
Step3 : By Simplification from H, we get : ∃xQ(x)
Step4 : By Existential instantiation from Step3, we get : Q(c)
Step5 : By Conjunction from Step3 and Step4, we get : P (c) ∧ Q(c)
Step6 : By Existential generalization from Step5, we get : ∃x(P (x)∧Q(x)) [5]

Discrete Mathematics PAGE 6 of 7


Question 5 Boolean Algebra

(a) Which theorems, explained in the lecture, represents each one of the the
following Boolean statements :
P : (a + b) + c = a + (b + c)
Q: a+a=a
R : a + ab = a [6]

(b) Build the truth table of the Boolean function F (x, y, z) that equals 1 if and
only if x.y.z = 0 [2]

(c) Use the previous truth table to find the sum-of-products expansions of the
Boolean function F (x, y, z). [2]

(d) i. Give two reasons why circuit minimisation is beneficial in circuit design. [2]
ii. To produce a sum-of-product algebraic simplification , we usually use
theorems (laws). Give three examples of theorems we can use. [3]
iii. Fill in the following K-map for the Boolean function

F (x, y, z) = x.y.z + x.y.z + x.y.z + x.y.z + x.y.z + x.y.z

y.z y.z y.z y.z


x
x
[2]
iv. Use the previous K-map and find a minimisation, as the sum of three
terms, of the expression F (x, y, z) = x.y.z + x.y.z + x.y.z + x.y.z +
x.y.z + x.y.z [3]

END OF PAPER

Discrete Mathematics PAGE 7 of 7

You might also like