0% found this document useful (0 votes)
2K views5 pages

2023 Oct CSC510 Test 1 Answer Scheme

The document contains a test for a discrete structures course. It includes 10 multiple choice questions testing concepts of propositional logic, predicate logic, and logical equivalences. It also includes 4 longer form questions involving propositional logic, predicate logic, and determining logical equivalences.

Uploaded by

Azmina Najwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views5 pages

2023 Oct CSC510 Test 1 Answer Scheme

The document contains a test for a discrete structures course. It includes 10 multiple choice questions testing concepts of propositional logic, predicate logic, and logical equivalences. It also includes 4 longer form questions involving propositional logic, predicate logic, and determining logical equivalences.

Uploaded by

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

Universiti Teknologi MARA

Faculty of Computer and Mathematical Sciences Date: 24th Nov 2023


CSC510 – Discrete Structure
Test 1

Name: UiTM No.:


Group: ………………..

ANSWER ALL QUESTIONS

PART A (20 marks)

1. Which of the following sentences is proposition?

A. Answer all questions


B. 2a + 2b = c
C. 1-300-88-2525
D. (7 x 3) – 1 = 15
Answer: D

2. Choose the correct logic for the statement: “If P, then Q unless R”

A. (P ∧ Q) → ¬ R
B. (P ∧ ¬ R) → Q
C. (P → Q) ∧ R
D. P → (Q ∧ R)
Answer: B

3. ¬ (P v Q) ∧ (P ∧ Q) is a

A. Tautology
B. Contradiction
C. Contingency
D. None of the above
Answer: B

4. Which of the following propositions is tautology?

A. P v (Q → P)
B. P v (P → Q)
C. (P v Q) → Q
D. Both A & C
Answer: B

5. Find the inverse for statement “The gate will be opened only if water level increases.”

A. “If the gate will be opened then water level increases.”


B. “If the gate will not be opened then water level will not increase”.
C. “If water level increases then the gate will be opened.”
D. “If water level not increase then the gate will not be opened.”
Answer: B
6. If we have 5 proposition variables, how many rows do we need to construct a truth table?

A. 4
B. 8
C. 16
D. 32
Answer: D

7. Find the negation for this proposition p ∧ (r 🡪 s)

A. ¬p ∧ (r 🡪 s)
B. ¬p ∨ (r 🡪 s)
C. ¬ p ∨ (r ∧ ¬ s)
D. ¬ p ∨ (r ∨ s)
ANSWER : C

8. Find the contrapositive for the following statement:


‘I get membership benefit only if I have a MyCERT account’

A. If I don’t have MyCERT account, then I don’t get membership benefit


B. If I have MyCERT account, then I get membership benefit
C. If I don’t have MyCERT account, then I get membership benefit
D. If I get membership benefit, then I have a MyCERT account
Answer: A

9. Let P(x) be the statement “x < 100” What is the truth value of the quantification ∀xP(x), having
domains as real numbers.

A. True
B. False
C. True and False
D. None of the above
Answer: B

10. The statement, “Every musician plays instruments” where M(x) is “x is a musician” and S(x) is
“x plays instruments” and the domain consists of all people.

A. ∃x(M(x) ∧ S(x))
B. ∀x(M(x) ∧ S(x))
C. ∃x(M(x) → S(x))
D. ∀x(M(x) → S(x))
Answer: D
PART B (30 Marks)

Question 1 (8 Marks)

Convert (p → q) ˄ (q v ¬r) into Conjunctive Normal Form using truth table.

Based on the truth table below, choose the TRUE output:

1m ½m ½m ½m 1m

P Q R ¬R (P → Q) (Q v ¬R) (P → Q) ˄ (Q v ¬R)

1 1 1 0 1 1 1

1 1 0 1 1 1 1

1 0 1 0 0 0 0√

1 0 0 1 0 1 0√

0 1 1 0 1 1 1

0 1 0 1 1 1 1

0 0 1 0 1 0 0√

0 0 0 1 1 1 1

Corresponding input from truth table:

(p ˄ ¬q ˄ r) v (p ˄ ¬q ˄ ¬r) v (¬p ˄ ¬q ˄ r) 1.5m

Complement : (¬p v q v ¬r) ˄ (¬p v q v r) ˄ (p v q v ¬r)

CNF : (¬p v q v ¬r) ˄ (¬p v q v r) ˄ (p v q v ¬r) 3m

Question 2 (8 marks)

Consider a school where students are either in the Math Club, the Computer Club, or neither. Let the
domain of discourse be the set of all students in the school. Use the following predicates:

M (x): x is in the Math Club


S(x ): x is in the Computer Club
L(x ): x loves algebra
H (x ): x hates experiments

Represent the following statements using predicate logic:


a) Every student in the Math Club loves algebra.
∀ x (M (x)→ L(x )) 2m
b) Some students are in both the Math Club and the Computer Club.
∃ x (M (x )∧ S (x)) 2m

c) No student in the Computer Club hates experiments.


∀ x (S (x)→ ¬ H (x )) 2m

d) Some students in Computer Club don’t love algebra.


∃ x (S ( x ) ∧ L ( x ) ) 2m

Question 3 (10 marks)

a) Express the following arguments by using propositions given.


If it is sunny today, then we play football or badminton. If the football field is occupied, we
don’t play football. It is sunny today, and the football field is occupied. Therefore “we play
badminton or volleyball”.

P: It is sunny today.
Q: We play football.
R: We play badminton.
S: The football field is occupied.
T: We play volleyball.

Premise 1: P → (Q ∨ R) 1m
Premise 2: S → ¬ Q 1m
Premise 3: P ∧ S 1m
Conclusion: R ∨ T 1m

b) Using the appropriate rules of inference, determine the validity of conclusion.

1) P → (Q ∨ R) Premise 1
2) P∧ S Premise 3
3) P simplification 2 1m
4) Q ∨ R MP 1), 3) 1m
5) S → ¬ Q Premise 2
6) S simplification 2 1m
7) ¬ Q MP 5), 6) 1m
8) R DS 4), 7) 1m
9) R ∨ T Addition 8) 1m

Question 4 (4 marks)

Determine whether (p → r) ∨ (q → r) ≡ (p ∧ q)→ r using series of logical rules.


From LHS, (p → r) ∨ (q → r)= (¬p ∨ r)∨ (¬q ∨ r) useful 1m
= ¬p ∨ ¬q ∨ r ∨ r commutative
= ¬p ∨ ¬q ∨ r idempotent 1m
= ¬( p ∧ q) ∨ r De Morgan 1m
= (p ∧ q) 🡪 r useful 1m

You might also like