Assignment 1
Assignment 1
(Karachi Campus)
Department of Computer Engineering
ASSIGNMENT#01 – Fall 2019
a. State the converse, contrapositive, and inverse of the following conditional statements.
i. When I stay up late, it is necessary that I sleep until noon.
ii. A positive integer is a prime only if it has no divisors other than 1 and itself.
a. Express these system specifications using the propositions p “The user enters a valid
password,” q “Access is granted,” and r “The user has paid the subscription fee” and logical
connectives (including negations).
i. “Access is denied if the user has not paid the subscription fee.”
ii. “If the user has not entered a valid password but has paid the subscription fee, then
access is granted.”
b. Construct a combinatorial circuit using inverters, OR gates, and AND gates that produces
the output ((p ∧ ¬r) ∨ ¬q) ∨ (¬p ∨ (q ∧ r)) from input bits p, q, and r.
a. Use De Morgan’s laws to find the negation of each of the following statements.
i. Ibrahim will take a job in industry or go to graduate school.
ii. Sadia knows Java and calculus.
a. Use quantifiers and predicates with more than one variable to express these statements.
i. All students in this class have learned at least one programming language.
ii. There is a student in this class who can play hockey.
b. Let C(x, y) be the statement “Student x is enrolled in class y,” where the domain for x
consists of all students in your class and domain for y consists of all computer engineering
courses at your university. Express each of these quantifications in English.
i. ∀x∃yC(x, y)
ii. ∃y∀xC(x, y)
a. Express each of these statements using quantifiers. Then form the negation of the statement
so that no negation is to the left of a quantifier. Next, express the negation in simple
English.
i. No one has climbed every mountain in the Himalayas.
ii. There is a student in this class who has taken every mathematics course offered at
this school.
b. Translate these specifications into English where F(p) is “Printer p is out of service,” B(p)
is “Printer p is busy,” L(j) is “Print job j is lost,” and Q(j) is “Print job j is queued.”
i. ∃j (Q(j) ∧ L(j)) → ∃pF(p)
ii. (∀pB(p) ∧ ∀jQ(j)) → ∃jL(j)
**********************************