Test 1 Mac2021 - test PDF

Title Test 1 Mac2021 - test
Author Yuuki asuna
Course Computer Science
Institution Universiti Teknologi MARA
Pages 3
File Size 162.3 KB
File Type PDF
Total Downloads 479
Total Views 933

Summary

Universiti Teknologi MARAFaculty of Computer and Mathematical Sciences Date: May 2021CSC510 – Discrete Structure Test 1 (50 marks) Name: UiTM No.:QUESTION 1 (15 marks) a) Write the negation of these propositions i. It is raining today ii. Ali comes early but forget to bring his umbrella iii. If it r...


Description

Universiti Teknologi MARA

Date: May 2021

Faculty of Computer and Mathematical Sciences CSC510 – Discrete Structure Test 1 (50 marks) Name:

UiTM No.:

QUESTION 1 (15 marks) a)

Write the negation of these propositions i. It is raining today ii. Ali comes early but forget to bring his umbrella iii. If it rains then he will catch a cold fever (3 marks)

b) Write the following statement in the form of inverse, contrapositive and negation “If it rains then he will catch a cold fever” i. converse : ii. inverse: iii. Contrapositive: (6 marks) c) The symbols p, q, and r define the following propositions. p: It rains q: You catch a cold fever r: You miss the exam

Represent each of the statements below using the defined symbols and logical connectives. i.

(p → ¬ r) v (q → ¬ r)

ii.

(p ∧ q) v (¬ q ∧ r). (6 marks)

QUESTION 2 (12 marks) a)

Show that (p ∨ q) ∨ p and ¬(¬q ∧ ¬p) are logically equivalent by using series of logical equivalence (3 marks)

b)

Determine whether (¬ p  (p → q)) → ¬ q is a tautology. (4 marks)

c)

With the aid of a truth table, convert the expression (¬p → q) ∧ (¬q ∨ r) into Disjunction Normal Form (DNF) (5 marks)

QUESTION 3 (predicate) (10 marks) a)

Express the following statement using predicates and quantifiers.

(2 marks)

“Everybody must take a discrete structure course or be a computer science student.”

b)

Let 𝑃(𝑥)be the statement “𝑥 spends more than four hours every weekday in the lab,” where the domain for 𝑥 consists of all researchers. Express the following quantifications in English. (2 marks) ∀𝑥 ¬𝑃(𝑥)

c)

Translate the following statements into logical expressions using predicates, quantifiers, and logical connectives. Predicates: 𝐶(𝑥): 𝑥 is a CSC510 student. 𝐿(𝑥): 𝑥 loves programming. Universe of discourse for the variable 𝑥 is all students. i) Every student loves programming.

(2 marks)

ii) Every CSC 510 student loves programming.

(2 marks)

iii) Some CSC 510 students love programming.

(2 marks)

QUESTION 4 (ROI) (13 marks) a)

Nina was about to leave for home at 5pm and she discovered that she lost her car keys. The following statements are true. If her car keys were on the computer table, then she saw it before meeting. She was holding the car keys in the meeting room or she was holding the car keys in the office. If she was holding the car keys in the meeting room, then the car keys were on the meeting desk. She did not see the car keys before meeting. If she was holding the car keys in the office, then the car keys were on the computer table. Where are the car keys? Solve the problem using propositional logic. Use the following representation to answer your question. p: q: r: s: t:

car keys were on the computer table She saw it before meeting She was holding the car keys in the meeting room She was holding the car keys in the office The car keys were on the meeting desk (8 marks)

b)

Consider the following theorem: If 3n + 2 is odd then n is odd. Give a proof by contradiction. (5 marks)...


Similar Free PDFs