Discrete Structures Ch 1
Express these system specifications using the propositions a, c, and s, where a denotes "the browser is set to accept cookies," c denotes "the cookie is stored by the browser," and s denotes "the server sends the cookie." If the server sends the cookie and the browser is set to accept cookies, then the browser will store the cookie. But if the browser is not set to accept cookies, then the browser will not store the cookie.
((a ∧ s) → c) ∧ (¬a → ¬c) Reason: The English sentence is the conjunction of two sentences. The antecedent of the first sentence is that the server sends the cookie and that the browser is set to accept cookies. This is correctly expressed by (a ∧ s). The consequence is that the cookie is stored, expressed by c. The second sentence states that if the browser is not set to accept cookies, then the cookie is not stored. This is correctly expressed by ¬a → ¬c.
Determine the output of the combinatorial circuit shown.
(p ∧ q) ∨ (¬p ∧ r) ∨ (¬q ∧ r) Reason: The OR gate takes three input signals. One input signal comes from an AND gate that takes both p and q as input. Another input comes from an AND gate that takes as input both p passed through an inverter and r. The third input is an AND gate that takes as input both q passed through an inverter and r.
Which of the following compound propositions are satisfiable?
(¬p ∧ q ∧ ¬r) ∧ (p ∨ q) ∧ (¬p ∨ ¬q) (¬p ∨ ¬q ∨ ¬r) ∧ (p ∨ q) ∧ (¬p ∨ ¬q) (p ∧ q) → (p ∨ q)
Taking into account rules of precedence, which of the following parenthesized expressions is equivalent to ¬p ∧ r → q ∧ s?
(¬p ∧ r) → (q ∧ s) Reason: The operator ¬ has the highest precedence, next ∧ and after that →. You might find the following mnemonic useful for remembering the precedence order: "Never Copy Ideas" = Negation, Conjunction, Implication.
Which of the following is a correct representation of the specification "If every user in the department is logged-in, then there must be at least two servers running" in predicate logic. Let the domain of variable x be all users and the domain of variables y and z be all pieces of computing machinery at the university. Use D(x) for "x is a user in the department," L(x) for "x is logged-in," S(y) for "y is a server," and R(y) for "y is running."
(∀x (D(x) → L(x))) → (∃y∃z (S(y) ∧ S(z) ∧ (y≠z) ∧ R(y) ∧ R(z)))
Match the compound proposition on the left with the equivalent compound proposition on the right.
* (p ∧ ¬q) ∧ r matches ¬(¬p ∨ q) ∧ r * ¬(p ∨ q) ∨ r matches r ∨ (¬p ∧ ¬q) * ¬p ∨ (q ∨ r) matches ¬((p ∧ ¬q) ∧ ¬r) * p ∧ (¬q ∨ r) matches (p ∧ r) ∨ (p ∧ ¬q)
Match the sentence on the left with its negation on the right.
* Bill's laptop has less than 8 GB of RAM, and Omar's laptop has less than 16 GB of RAM matches Bill's laptop has at least 8 GB of RAM, or Omar's laptop has at least 16 GB of RAM. * Bill's laptop has at least 8 GB of RAM, and Omar's laptop has less than 16 GB of RAM matches Bill's laptop has less than 8 GB of RAM, or Omar's laptop has at least 16 GB of RAM. *Bill's laptop has less than 8 GB of RAM, and Omar's laptop has at least 16 GB of RAM matches Bill's laptop has at least 8 GB of RAM, or Omar's laptop has less than 16 GB of RAM. * Bill's laptop has at least 8 GB of RAM, and Omar's laptop has at least 16 GB of RAM matches Bill's laptop has less than 8 GB of RAM, or Omar's laptop has less than 16 GB of RAM.
There is an island in which certain inhabitants called "knights" always tell the truth, and others called "knaves" always lie. We assume that all of the inhabitants are either knights or knaves. Match the statements on the left with the types on the right.
A says "At least one of us is a knave." A is a knight and B is a knave. A says "If I am a knight, then so is B." A is a knight and B is a knight. B says "If A is a knight then I am a knave." A is a knave and B is a knight. A says "I am a knave, but B isn't." A is a knave and B is a knave. A says "Either I am a knave or else two plus two equals five." B says nothing. There is no valid assignment of types as the statements are contradictory.
Assume that P(x) is the statement "x ≤ x3." For which of these domains is ∀x P(x) true?
All positive integers -1, 0, and 1
Consider the following vocabulary: L(x) denoting "x is in the library," D(x) "x is written in Danish," T(x) "x is written in Tamil," and N(x) is "x is a novel." Assume the domain of all variables is all books. Match the English sentence on the left with the correct logical expression on the right.
All the books in the library are written in Danish or Tamil Matches ∀x (L(x) →(D(x) ∨ T(x))) There are some books in the library written in Danish or Tamil Matches ∃x ((L(x) ∧ (D(x) ∨ T(x))) Every book written in Danish or Tamil is in the library Matches ∀x ((D(x) ∨ T(x)) → L(x)) All books in the library written in Danish are novels Matches ∀x ((L(x) ∧ D(x)) → N(x)) Every book in the library that is not a novel is written in Tamil Matches ∀x ((L(x) ∧ ¬N(x)) → T(x)) The library has all books not written in Tamil or Danish Matches ∀x (¬(D(x) ∨ T(x)) → L(x))
Which of these is a proposition?
Aristotle was born in northern Greece.
Which of the following are correct ways of determining if two compound propositions p and q are equivalent.
Construct a truth table for (p → q) ∧ (q → p). If the proposition is tautology, then p and q are equivalent. Construct a truth table for p ↔ q. If it is a tautology, then p and q are equivalent. Construct a truth table for both of the compound propositions p and q. If the two are true in the same rows, then p ≡ q.
On a game show, you must pick one of two doors. You know that behind each door there is either a new car or a goat. There may be a car behind both doors, a goat behind both doors, or a car behind one door and a goat behind the other. The sign on door I says "IN THIS ROOM, THERE IS A CAR, AND IN THE OTHER ROOM THERE IS A GOAT." The sign on door II says "IN ONE ROOM THERE IS A CAR, AND IN THE OTHER THERE IS A GOAT." One of the signs is true and the other is false. Which door should you pick, assuming that you would rather have the car than the goat? (Based on a puzzle by Raymond Smullyan)
Door II
Let p be "Ghada's cell phone has less than 16 GB memory" and q be "Ghada's laptop has more than 8 GB of memory." Then the sentence "Ghada's cell phone has less than 16 GB memory or her laptop has more than 8 GB memory" is represented as p ∨ q. Which of the following is the correct English translation using De Morgan's laws of ¬(p ∨ q)?
Ghada's cell phone does not have less than 16 GB of memory, and her laptop does not have more than 8 GB of memory. Ghada's cell phone has 16 GB or more of memory, and her laptop has 8 GB of memory or less.
Match the English sentence on the left with the corresponding compound proposition on the right. The propositions used are u: "The animal is a unicorn," m: "The animal is a mammal," h: "The animal has horns," and i: "The animal is immortal."
If the animal is a unicorn and has horns, then it is a mammal and is immortal. matches Choice, (u∧h) → (m∧ i) (u ∧ h) → (m ∧ i) Having horns, being a mammal, and being immortal is necessary and sufficient for the animal being a unicorn. matches Choice, u↔ (m∧ i∧h) u ↔ (m ∧ i ∧ h) The animal is either a unicorn and has horns, or it is immortal and a mammal. matches Choice, (u∧ h) ∨ (i ∧m) (u ∧ h) ∨ (i ∧ m) The animal is a unicorn if it has horns, is immortal, and is a mammal. matches Choice, (h∧i ∧m) →u (h ∧ i ∧ m) → u
Let P(x, y) denote the statement "x is taller than y." Suppose Bob is 5 feet 7 inches tall, Jill is 5 feet 3 inches tall, Azzam is 5 feet 11 inches tall, and Keya is 6 feet tall. Which of the following statements are true?
P(Azzam, Bob) P(Keya, Azzam) P(Azzam, Jill)
For which predicates P is the statement ∀x P(x) true, where the domain is the positive integers?
P(x) is the statement "x2 ≥ x." P(x) is the statement "x > 0."
Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book."
Passing the exam implies that the student has read the book = p -> p the student passed the exam or the student has read the book = p v q having read the book implies that the student will pass the exam = q -> p The student has not read the book and has not passed the exam = ¬q ∧ ¬p
Which of the following English sentences represents p ∧ q where p is "The cat is on the mat" and q is "The dog is outside"?
The cat is on the mat, but the dog is outside. The cat is on the mat, and the dog is outside.
In which of these rows of the truth table is the compound proposition (p ∧ r) → ¬(q ∨ p) true?
The row where p, q, and r are all false. The row where both p and q are true, but r is false.
Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book."
The student passes the exam when the student has read the book. q → p A necessary condition for the student passing the exam is that the student has read the book. p → q If the student does not pass the exam, then the student has not read the book. None of the available propositions The student does not pass the exam and the student has read the book. ¬p ∧ q
Which of the following English sentences represents the meaning of p → q where p is "The toy is lightweight" and q is "The toy floats"?
The toy floats unless it is not lightweight. If the toy is lightweight, it floats. The toy floating follows from it being lightweight. The toy floats whenever it is lightweight. The toy floats when it is lightweight. A sufficient condition for the toy floating is that it is lightweight.
The sentence "Zaid does not have a newborn baby" is the ______ of the statement "Zaid has a newborn baby."
negation
Match each proposition on the left with the word describing it on the right.
p ↔ ¬p contradiction ¬p → ¬p tautology p → ¬p contingency
Which of the following sentences in propositional logic are contradictions?
¬(p → p) ¬p ∧ p
Which of the following sentences in propositional logic are tautologies?
¬p ∨ p p → p
Express in propositional logic "The strike will last less than 100 days only if either the negotiation succeeds and the president of the firm does not resign, or the governor calls out the national guard." The propositions used are s: "The strike lasts 100 days or more," n: "The negotiation succeeds," r: "The president of the firm resigns," and g: "The governor calls out the national guard."
¬s → ((n ∧ ¬r) ∨ g) Reason: The antecedent of the sentence is that the strike will last less than 100 days. Since the meaning of s is "The strike lasts 100 days or more," ¬s correctly expresses the antecedent. The consequence "the negotiation succeeds and the president of the firm does not resign, or the governor calls out the national guard" is expressed by the conjunction of n and ¬r disjoined with g.
Match the sentence on the left with the equivalent statement on the right.
¬∃x P(x) Matches ∀x ¬P(x) ¬∀x P(x) Matches ∃x ¬P(x) ¬∀x ¬P(x) Matches ∃x P(x) ¬∃x ¬P(x) Matches ∀x P(x)
Consider the following Lewis Carroll argument: "Every eagle can fly." "Some pigs cannot fly." "Some pigs are not eagles."Which of the following is the correct representation in predicate logic? You can assume that the domain for the predicates consists of all creatures.
∀x (eagle(x) → flies(x)) ∃x (pig(x) ∧ ¬flies(x)) ∃x (pig(x) ∧ ¬eagle(x))
Which of the following is the correct translation of the sentence "All the animals in the zoo are from South America"? You can assume that the domain of all variables is all physical objects in the world. Use A(x) for "x is an animal," Z(x) for "x is in the zoo," and S(x) for "x is from South America."
∀x (¬A(x) ∨ ¬Z(x) ∨ S(x)) ∀x ((A(x) ∧ Z(x)) → S(x))
Match each quantified statement having the domain consisting of the integers from 3 to 5 on the left with its corresponding propositional logic expression on the right.
∃x (x > 4) matches (3 > 4) ∨ (4 > 4) ∨ (5 > 4) ∃x (4 > x) (4 > 3) ∨ (4 > 4) ∨ (4 > 5) ∀x (x > 4) (3 > 4) ∧ (4 > 4) ∧ (5 > 4) ∀x (4 > x) (4 > 3) ∧ (4 > 4) ∧ (4 > 5)
In which of the following expressions is the variable x free?
∃y P(y) ∧ Q(x) ∀y (P(x) ∧ Q(y))