All of Andy's Assignment's shuffled Flashcards
Identify the correct steps involved while proving (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is true when p, q, and r have the same truth value and it is false otherwise
- Suppose p, q, and r are all true. Then, (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is true as each clause has an unnegated variable.
- Suppose p, q, and r are all true. Then, (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is false as each clause has an unnegated variable.
- Now, suppose one of the variables p, q, or r is true and the other two are false. Then, the clause that contains the negation of the true variable will be true.
- We get a similar conclusion when one of the variables is false and the other two are true.
- Hence, (p ∨ ¬q) ∧ (q ∨ ¬r) ∧ (r ∨ ¬p) is true when p, q, and r have the same truth value and it is false otherwise.
Is the conditional statement ¬(p → q)→ ¬q tautology?
p q p → q ¬(p → q) ¬q ¬(p → q) → ¬q
T F F
T F F T
F T F
F F F
p q p → q ¬(p → q) ¬q ¬(p → q) → ¬q
T T T F F T
T F F T T T
F T T F F T
F F T F T T
Let p, q, and r be the propositions
p: You have the flu.
q: You miss the final examination.
r: You pass the course.
Identify the English translation of the compound proposition (p → ¬r) ∨ (q → ¬r).
If you have the flu then you will not pass the course, or if you miss the final exam then you will not pass the course.
Four friends have been identified as suspects for unauthorized access into a computer system. They have made statements to the investigating authorities. Alice said, “Carlos did it.” John said, “I did not do it.” Carlos said, “Diana did it.” Diana said, “Carlos lied when he said that I did it.”
If the authorities know that exactly one of the four suspects is telling the truth, who did it & why?
John
John did it. There are four cases to consider:
If Alice is the sole truth-teller, then Carlos did it, but this means that John is telling the truth, a contradiction.
If John is the sole truth-teller, then Diana must be lying, so she did it, but then Carlos is telling the truth, a contradiction.
If Carlos is the sole truth-teller, then Diana did it, but that makes John truthful, again a contradiction.
So, the only possibility is that Diana is the sole truth-teller. This means that John is lying when he denied it, so he did it.
Four friends have been identified as suspects for unauthorized access into a computer system. They have made statements to the investigating authorities. Alice said, “Carlos did it.” John said, “I did not do it.” Carlos said, “Diana did it.” Diana said, “Carlos lied when he said that I did it.”
If the authorities know that exactly one is lying, who did it?
Carlos
Since Carlos and Diana are making contradictory statements, the liar must be one of them. Therefore, Alice is telling the truth, so Carlos did it. John and Diana are telling the truth as well here, and it is Carlos who is lying.
Use De Morgan’s laws to find the negation of the given statement.
Rita will not move to Oregon and will not move to Washington.
The De Morgan’s Law used is ¬(p ∨ q) ≡ ¬p Λ ¬q.
Determine whether the given compound propositions is satisfiable.
(p ∨ q ∨ ¬r) ∧ (p ∨ ¬q ∨ ¬s) ∧ (p ∨ ¬r ∨ ¬s) ∧ (¬p ∨ ¬q ∨ ¬s) ∧ (p ∨ q ∨ ¬s)
The compound proposition (p ∨ q ∨ ¬r) ∧ (p ∨ ¬q ∨ ¬s) ∧ (p ∨ ¬r ∨ ¬s) ∧ (¬p ∨ ¬q ∨ ¬s) ∧ (p ∨ q ∨ ¬s) is ______________
not satisfiable
Since p occurs in four of the five disjunctions, we can make p true, and then make q false. Thus, the given proposition is satisfiable
Consider the following propositions:
L: The file system is locked.
Q: New messages will be queued.
N: The system is functioning normally.
B: New messages will be sent to the message buffer.
The goal of this exercise is to determine whether the following system specifications are consistent:
- If the file system is not locked, then new messages will be queued.
- If the file system is not locked, then the system is functioning normally, and conversely.
- If new messages are not queued, then they will be sent to the message buffer.
- If the file system is not locked, then new messages will be sent to the message buffer.
- New messages will not be sent to the message buffer.
What are the symbolic representations of the given system specifications?
¬L → Q, ¬L ↔ N, ¬Q → B, ¬L → B, and ¬B, respectively.
The first specification is “If the file system is not locked, then new messages will be queued.” This is represented symbolically as ¬L → Q.
The second specification is “If the file system is not locked, then the system is functioning normally, and conversely.” This is represented symbolically as ¬L ↔ N.
The third specification is “If new messages are not queued, then they will be sent to the message buffer.” This is represented symbolically as ¬Q → B.
The fourth specification is “If the file system is not locked, then new messages will be sent to the message buffer.” This is represented symbolically as ¬L → B.
The fifth specification is “New messages will not be sent to the message buffer.” This is represented symbolically as ¬B.
Identify the propositions in the form “p if and only if q” in English.
If you watch television your mind will decay, and conversely. (Check all that apply.)
- Your mind will decay if and only if you watch television.
- Your mind will not decay if and only if you watch television.
- Your mind will decay if and only if you do not watch television.
- Your mind will not decay if and only if you do not watch television.
The statement “If you watch television your mind will decay, and conversely” is translated into the form “if p, then q” as “Your mind will decay if and only if you watch television,” and “Your mind will not decay if and only if you do not watch television.”
Complete the truth table given below for the given proposition.
p ⊕ (p ∨ q)
p q (p ∨ q) p ⊕ (p ∨ q) T T T F T F T F F T T T F F F F
Show that each of these conditional statements is a tautology by using truth tables.
Complete the truth table given below for the conditional statement [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r.
Is the given conditional statement is a tautology?
p q r p ∨ q p → r (p ∨ q) ∧ (p → r) q → r
T T T T T T T
T T F T F F F
T F T T T T T
T F F T F F T
F T T T T T T
F T F T T T F
F F T F T F T
F F F F T F T
(p ∨ q) ∧ (p → r) ∧ (q → r) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r
T T
F T
T T
F T
T T
F T
F T
F T
Let p, q, r be the propositions:
p: The user enters a valid password.
q: Access is granted.
r: The user has paid the subscription fee.
Express the following system specifications using the propositions p, q, and r and logical connectives (including negations).
Access is denied if the user has not paid the subscription fee.
¬r → ¬q
“The user has not paid the subscription fee” is the negation of r; this is the hypothesis. “Access is denied” is the negation of q; this is the conclusion. Therefore, the given system specification can be expressed as ¬r → ¬q.
Let p, q, r be the propositions:
p: The user enters a valid password.
q: Access is granted.
r: The user has paid the subscription fee.
Express the following system specifications using the propositions p, q, and r and logical connectives (including negations).
If the user has not entered a valid password but has paid the subscription fee, then access is granted.
(¬p ∧ r) → q
The hypothesis is a conjunction of “The user has not entered a valid password” (¬p) and “The user has paid the subscription fee” (r). The conclusion is “Access is granted” (q). Therefore, the given system specification can be expressed as (¬p ∧ r) → q.
Steps in the correct order to show that ¬p → (q → r) and q → (p ∨ r) are logically equivalent.
(Note: While proving, prove the equivalence from ¬p → (q → r) to q → (p ∨ r).)
First, consider ¬p → (q → r) ≡ p ∨ (q → r)
≡ p ∨ ¬q ∨ r ≡ ¬q ∨ p ∨ r ≡ q → (p ∨ r)
So, ¬p → (q → r) and q → (p ∨ r) are equivalent.
An explorer is captured by a group of cannibals. There are two types of cannibals—those who always tell the truth and those who always lie. The cannibals will barbecue the explorer unless he can determine whether a particular cannibal always lies or always tells the truth. He is allowed to ask the cannibal exactly one question.
Why does the question “Are you a liar?” not work?
Both types of cannibals will answer “no.”
If the explorer encounters a truth-teller, then he will honestly answer “no” to her question. If she encounters a liar, then the honest answer to her question is “yes,” so he will lie and answer “no.” Thus everybody will answer “no” to the question, and the explorer will have no way to determine which type of cannibal she is speaking to.
An explorer is captured by a group of cannibals. There are two types of cannibals—those who always tell the truth and those who always lie. The cannibals will barbecue the explorer unless he can determine whether a particular cannibal always lies or always tells the truth. He is allowed to ask the cannibal exactly one question.
Which of the following questions helps in determining whether the cannibal she is speaking to is a truth-teller or a liar?
- Is the colour of the sky blue?
- If I were to ask you if you always told the truth, would you say that you did?
- If I say that you are a liar, would I be correct?
- Do you always tell the truth?
There are several possible correct answers. One is the following question: “If I were to ask you if you always told the truth, would you say that you did?” Then if the cannibal is a truth teller, he will answer yes (truthfully), while if he is a liar, then, since in fact he would have said that he did tell the truth if questioned, he will now lie and answer no.
Complete the truth table given below for the statement (¬p ∧ (p → q)) → ¬q.
The given statement is a ___________________
contingency
p q ¬p p → q ¬p ∧ (p → q) ¬q
T T F T F F
T F F F F T
F T T T T F
F F T T T T
(¬p ∧ (p → q)) → ¬q T T F T
As a reward for saving his daughter from pirates, the King has given you the opportunity to win treasures hidden inside two of three trunks. The trunk that does not hold any treasure is empty. To win, you must select the correct trunks. The inscriptions on Trunks 1, 2, and 3 are “This trunk is empty,” “There is a treasure in Trunk 1,” and “There is a treasure in Trunk 2.” For each of the following statements, determine whether the Queen who never lies could state this, and if so, which two trunks contain the treasures.
The Queen can state, “Exactly two of the inscriptions are true.” T or F
If the Queen can state this, in which of the trunks are the treasures hidden?
True
Trunk 1 and Trunk 2
The Queen can say this, but one cannot determine the location of the treasures. If the inscription on Trunk 1 is false, then the treasures are in Trunks 1 and 2. If the inscription on Trunk 2 is false, then the treasures are in Trunks 2 and 3. The inscription on Trunk 3 cannot be false, since the inscriptions on Trunks 1 and 2 are contradictory.
Identify the correct steps involved in proving p ↔ q and (p ∧ q) ∨ (¬p ∧ ¬q) are logically equivalent
- If both p and q are false, then (p ∧ q) is false and (¬p ∧ ¬q) is true. This again implies that the second statement (p ∧ q) ∨ (¬p ∧ ¬q) is false.
- If p is true and q is false, then (p ∧ q) is false and (¬p ∧ ¬q) is true. This again implies that the second statement (p ∧ q) ∨ (¬p ∧ ¬q) is false.
- Thus, p ↔ q and (p ∧ q) ∨ (¬p ∧ ¬q) have same truth value; hence, they are logically equivalent.
Write the given sentence in the “if p, then q” form.
You will reach the summit unless you begin your climb too late.
- If you do not begin your climb too late, then you will reach the summit.
- “q unless ¬p” is equivalent to “If p, then q.”
Let R(x) is “x is a rabbit” and H(x) is “x hops,” and the domain consists of all animals.
Translate the statement ∃x(R(x) → H(x)) into English
- There exists an animal such that if it is a rabbit then it hops.
- Every animal that is a rabbit also hops.
- Every rabbit hops.
The existential quantifier states that the conditional statement applies to at least one animal. Thus, “There exists an animal such that if it is a rabbit, then it hops.”
Identify the mistake, if there is one, in the following argument.
Let S(x, y) be “x is shorter than y.” Given the premise ∃sS(s, Max), it follows that S(Max, Max). Then, by existential generalization, it follows that ∃xS(x, x), so that someone is shorter than himself.
The argument is incorrect. We know that some s exists that makes S(s, Max) true, but we cannot conclude that Max is one such s.
We know that some s exists that makes S(s, Max) true, but we cannot conclude that Max is one such s. Therefore, this first step is invalid.
Use the rules of inference to show that if ∀ x (P(x) ∨ Q(x)) and ∀ x ((¬P(x) ∧ Q(x)) → R(x)) are true, then ∀ x(¬R(x) → P(x)) is also true, where the domains of all quantifiers are the same.
- We will show that if the premises are true, then (¬R(a) → P(a)) for every a.
- Suppose ¬R(a) is true for some a.
- For such an a, universal modus tollens applied to the second premise gives us ¬(¬P(a)˄Q(a)).
We want to show that the conditional statement ¬R(a) → P(a) is true for all a in the domain; the desired conclusion then follows by universal generalization. Thus we want to show that if ¬R(a) is true for a particular a, then P(a) is also true. For such an a, universal modus tollens applied to the second premise gives us ¬(¬P(a) ∧ Q(a)). By rules from propositional logic, this gives us P(a) ∨ ¬Q(a). By universal instantiation from the first premise, we have P(a) ∨ Q(a). Now by resolution, we can conclude P(a) ∨ P(a), which is logically equivalent to P(a), as desired.
Let P(x, y) be the statement “Student x has taken class y,” where the domain for x consists of all students in your class and for y consists of all computer science courses at your school.
Match the following quantifications (in the left column) with their corresponding expressions (in the right column).
∃y∀xP(x, y) ∀x∀yP(x, y) ∃x∃yP(x, y) ∃x∀yP(x, y) ∀y∃xP(x, y) ∀x∃yP(x, y)
There is a student in your class who has taken every computer science course.
Some student in your class has taken some computer science course.
Every student in your class has taken at least one computer science course.
Every student in your class has taken every computer science course.
Every computer science course has been taken by at least one student in your class.
There is a computer science course that every student in your class has taken.
The expression for the quantification ∃x∃yP(x, y) is “Some student in your class has taken some computer science course.”
The expression for the quantification ∃x∀yP(x, y) is “There is a student in your class who has taken every computer science course.”
The expression for the quantification ∀x∃yP(x, y) is “Every student in your class has taken at least one computer science course.”
The expression for the quantification ∃y∀xP(x, y) is “There is a computer science course that every student in your class has taken.”
The expression for the quantification ∀y∃xP(x, y) is “Every computer science course has been taken by at least one student in your class.”
The expression for the quantification ∀x∀yP(x, y) is “Every student in your class has taken every computer science course.”
Translate each of these nested quantifications into an English statement that expresses a mathematical fact. The domain in each case consists of all real numbers.
∀x∀y(((x ≥ 0) ∧ (y < 0)) → (x – y > 0))
For every nonnegative number, one can find a negative number so that the first number minus the second is positive.
One can find a nonnegative number so that for any positive number chosen, the first number minus the second is positive.
An English statement for the given quantifier is “A nonnegative number minus a negative number is positive.”
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.
F(x) be the expression “x can swim,” and G(x) be “x can catch fish,” and the domain of discourse is pigs. The statement is “There exists a pig that can swim and catch fish.”
The expression for the statement is ∃ x (F(x) ∧ G(x)), and its negation is ∀ x¬(F(x) ∧ G(x)) and the sentence is “No pig can both swim and catch fish.”
Let F(x) be “x can swim” and let G(x) be “x can catch fish,” where the domain of discourse is pigs. Then our original statement is ∃x (F(x) ∧ G(x)). Its negation is ∀x¬(F(x) ∧ G(x)), which could also be written ∀x (¬F(x) ∨ ¬G(x)) by De Morgan’s law. In English this is “No pig can both swim and catch fish,” or “Every pig either is unable to swim or is unable to catch fish.”
Let F(x, y) be the statement “x can fool y,” where the domain consists of all people in the world. Use quantifiers to express each of these statements.
Nancy can fool exactly two people.
∃ y1 ∃ y2(F(Nancy, y1) ∧ F(Nancy, y2) ∧ y1 ≠ y2 ∧ ∀ y(F(Nancy, y) → (y = y1 ∨ y = y2)))
The statement “Nancy can fool exactly two people.” can be expressed as ∃y1∃y2(F(Nancy, y1) ∧ F(Nancy, y2) ∧ y1 ≠ y2 ∧ ∀y(F(Nancy, y) → (y = y1 ∨ y = y2))).
Let the domain of discourse be the set of all students in your class. If L(x, y) means x has learned programming language y, express the statement "All students in this class have learned at least one programming language" using quantifiers.
∀x∃y L(x, y) The statement "All students in this class have learned at least one programming language" can be expressed using quantifiers as ∀x∃y L(x, y)
Let the statements “If I play hockey, then I am sore the next day,” “I use the whirlpool if I am sore,” and “I did not use the whirlpool” be the given premises.
Identify the rule of inference that is used to arrive at the conclusion that I am not sore.
modus tollens
If modus tollens is used from the back, the given conclusion is arrived.
Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an expression involving logical connectives).
¬ ∀ x ∃ yP(x, y)
∃ x ∀ y ¬P(x, y)
We need to use the transformations of De Morgan’s Laws for Quantifiers. In other words, we push all the negation symbols inside the quantifiers, changing the sense of the quantifiers as we do so, because of the equivalences of De Morgan’s Laws for Quantifiers. In addition, we need to use De Morgan’s laws to change the negation of a conjunction to the disjunction of the negations and to change the negation of a disjunction to the conjunction of the negations. We also use the fact that ¬(¬p) ≡ p. Using these method, we can rewrite the given expression as ∃x∀y ¬P(x, y).
Rewrite each of these statements so that negations appear only within predicates (that is, so that no negation is outside a quantifier or an expression involving logical connectives).
¬ ∃ y(Q(y) ∧ ∀ x¬R(x, y))
∀ y(¬Q(y) ∨ ∃ xR(x, y))
We need to use the transformations of De Morgan’s Laws for Quantifiers. In other words, we push all the negation symbols inside the quantifiers, changing the sense of the quantifiers as we do so, because of the equivalences of De Morgan’s Laws for Quantifiers. In addition, we need to use De Morgan’s laws to change the negation of a conjunction to the disjunction of the negations and to change the negation of a disjunction to the conjunction of the negations. We also use the fact that ¬(¬p) ≡ p. Using these method, we can rewrite the given expression as ∀y(¬Q(y) ∨ ∃xR(x, y)).
Translate these system specifications into English, where the predicate S(x, y) is “x is in state y” and where the domain for x and y consists of all systems and all possible states, respectively.
∀x(S(x, malfunctioning) ∨ S(x, diagnostic))
Every system is either malfunctioning or in a diagnostic state.
The expression ∀x(S(x, malfunctioning) ∨ S(x, diagnostic)) denotes that all systems are malfunctioning or all systems are in a diagnostic state, which can be simply stated as “Every system is either malfunctioning or in a diagnostic state.”