This document contains the questions from an exam for an Introduction to Computer Science class. There are 5 questions on the exam covering topics like truth tables, logical equivalences, quantifiers, compound propositions, and a logic puzzle. Students are instructed to show their work and answer all questions within the 75 minute time limit.
This document contains the questions from an exam for an Introduction to Computer Science class. There are 5 questions on the exam covering topics like truth tables, logical equivalences, quantifiers, compound propositions, and a logic puzzle. Students are instructed to show their work and answer all questions within the 75 minute time limit.
This document contains the questions from an exam for an Introduction to Computer Science class. There are 5 questions on the exam covering topics like truth tables, logical equivalences, quantifiers, compound propositions, and a logic puzzle. Students are instructed to show their work and answer all questions within the 75 minute time limit.
This document contains the questions from an exam for an Introduction to Computer Science class. There are 5 questions on the exam covering topics like truth tables, logical equivalences, quantifiers, compound propositions, and a logic puzzle. Students are instructed to show their work and answer all questions within the 75 minute time limit.
Time; 75 minutes Instructor: Dr. Habib Bin Muzaffar
Answer all questions. Show all required work.
1. (6 marks) Find the truth table of 𝑝⨁(𝑞 → 𝑟).
2. (6 marks) Show that (¬𝑝 ∧ (𝑝 ∨ 𝑞)) → 𝑞 is a tautology
using known equivalences.
3. (9 marks) Write down the truth value of each of the following
statements (no explanation needed) if the domain for each variable consists of the set of all integers. Also, find the negation of each statement. Your final answer cannot contain the symbol . (a) ∀𝑥 ∃𝑦 (𝑦 = 𝑥 + 1) (b) ∃𝑦 ∀𝑥 (𝑦 = 𝑥 + 1) (c) ∀𝑥 (𝑥 2 ≥ 𝑥)
4. (4 marks) Find a compound proposition S which has the truth
table below:
p q S T T F T F T F T F F F F
5. (5 marks) There are two kinds of inhabitants on an island:
Knights who always tell the truth, knaves who always lie. You encounter three inhabitants X, V, and K of the island. X says “V is a knight”. V says “K is a knave”. K says “X is a knave or I am a knave”. Determine the types of X, V, and K. Justify your answer.