What is the difference between searching Google for the following:
Suppose I like mystery and comedy movies, but I don’t like Halloween. What do I search for?
Boolean logic involves the classification of items into sets using keywords like:
Boolean logic was developed by the 19th-century English mathematician George Boole.
Question: Suppose I want to learn about what George Boole himself wrote about logic. What do I search for?
Boolean logic most often involves classifying items in sets.
Question: Describe all numbers from 1 to 9 (including 1 and 10) that meet the condition:
even
divisible by 3
even OR divisible by 3.
even AND divisible by 3.
Boolean operators are directly related to the mathematical set operators:
Express the statements (a)-(d) above using this set of operators.
Questions: Describe the numbers from 1 to 20 that meet the condition:
(even) \(\cap\) (multiples of 5)
A = {2,4,5,6,8,10,12,14,15,16,18,20}
B = {2,4,6,8,12,14,16,18}
C = {5,10,15,20}
D = {10,20}
(even) \(\cup\) (multiples of 5)
A = {2,4,5,6,8,10,12,14,15,16,18,20}
B = {2,4,6,8,12,14,16,18}
C = {5,10,15,20}
D = {10,20}
(even) \(\cap\) (multiples of 5)\(^c\)
A = {2,4,5,6,8,10,12,14,15,16,18,20}
B = {2,4,6,8,12,14,16,18}
C = {5,10,15,20}
D = {10,20}
Clearing up ambiguity
The English phrase “Go to the store and buy me eggs and bagels or cereal” is ambiguous; this could mean either of the following.
A. Buy eggs and (bagels or cereal) - I want eggs, and I want either
bagels or cereal.
B. Buy (eggs and bagels) or cereal - I want eggs and bagels, or I want
cereal.
For this reason, using parentheses clarifies the intent. See examples below.
Written Homework:
Describe the numbers from 1 to 30 that meet the condition:
(Even) \(\cap\) (multiple of 5 \(\cup\) multiple of 7)
A = {10,14,20,28,30}
B = {10,14,20,21,28,30}
C = {7,10,14,20,21,28,30}
(Even \(\cap\) multiple of 5) \(\cup\) (multiple of 7)
A = {10,14,20,28,30}
B = {10,14,20,21,28,30}
C = {7,10,14,20,21,28,30}
\(~\)
\(~\)
\(~\)
A statement (or proposition) is a sentence that is either true or false.
Question: Which of the following are statements.
A conditional statement is a compound statement of the form:
In common language, we use conditional logic in statements like:
If it is raining, we’ll go to a movie.
If it is not raining, we’ll go to the lake.
The phrase “if P, then Q” is logically equivalent to the following statements:
Here are some more technical ways to express “if P, then Q.”
Practice: Translate “If it is raining, then there are clouds in the sky” into the above forms.
Conditional logic is commonly used in spreadsheet applications like Excel or Google Sheets.
Consider the expression.
=IF( A1<2000, A1+1, A1*2 )
This takes the value in cell A1, and then:
Question:
What does this cell output if A1=1000?
Question:
Consider the expression:
=IF(A1>5, 2*A1,3*A1)
This looks at the value in cell A1:
What does this cell output if A1=8?
\(~\)
\(~\)
\(~\)
Extra Credit Homework:
A. =IF(A1>30000, 0.15*A1, 0.20*A1)
B. =IF(A1<30000, 0.15*A1, 0.20*A1)
C. =IF(A1<30000, 0.20*A1, 0.15*A1)
Hint: There are two ways the tax credit is applied
Informally, we could write these as:
(A1 < 10000 and A2 = 0) or (A1 < 20000 and A2 > 0)
In Excel format, we’d write
=IF( OR(AND(A1<10000, A2=0),
AND(A1<20000, A2>0)),
“you qualify”,
“you don’t qualify”)
Type this formula in cell A3.
\(~\)
\(~\)
\(~\)
A quantified statement is a logical statement that includes a quantifier to indicate the scope of the statement over a set of elements. Examples of quantifiers are:
A universal quantifier states that an entire set of things share a characteristic. They are words that describe an entire set:
An existential quantifier states that a set contains at least one element. They are words that describe an on or more elements in a set:
Characterize each of the following as a universally quantified or an existentially quanitified statement:
What happens when you negate a universal quantifier?
Example: Suppose your friend tells you, “Everybody cheats on their taxes!”
What is the minimum amount of evidence you would need to prove your friend wrong?
What happens when you negate an existential quantifier?
Example: Suppose your friend says, “One of these six cartons of milk is leaking.”
What is the minimum amount of evidence you would need to prove your friend wrong?
Write the negation of these
statements:
Everyone failed the quiz today.
Someone in the car needs to use the restroom.
\(~\)
\(~\)
\(~\)
Written Homework:
Write the negation of the following statements:
“Somebody brought a flashlight.”
“There are no prime numbers that are even.”
“All Icelandic children learn English in school.”
\(~\)
\(~\)
\(~\)
Here are some more commonly used symbols for and, or, and not.
Translate each statement into symbolic notation. Let:
P = “I like Pepsi”, and
C = “I like Coke”.
I like Pepsi or I like Coke.
I like Pepsi and I like Coke.
I do not like Pepsi.
It is not the case that I like Pepsi or Coke.
I like Pepsi and I do not like Coke.
\(~\)
\(~\)
\(~\)
Written Homework:
C = “We have carrots.” and
S = “We will make soup”.
C = “I like carrots” and
Z = “I like zucchini”
\(~\)
\(~\)
Note that the meaning of the above statement is equivalent in English to say “I do not like carrots nor zucchini,” OR “I do not (like carrots or like zucchini).”
Because complex Boolean statements can get tricky to think about, truth tables are a useful tool for keep track of truth values that make the complex statement true and false.
The truth tables for the basic and, or, and not statements are shown below.
Example:
Create a truth table for the statement for \(A
\vee \mathord\sim B\).
Use it to determine, when is \(A \vee
\mathord\sim B\) false?
A. If A and B are both true
B. If A=true and B=false
C. IF A=false and B=true
D. If A and B are both false
\(~\)
\(~\)
\(~\)
\(~\)
Written Homework:
\(~\)
\(~\)
\(~\)
If A=T, B=T, C=F, what is the outcome of \(A \wedge (B \vee C)\) true?
A: True
B: False
If A=F, B=T, C=T, what is the outcome of \(A \wedge (B \vee C)\) true?
A: True
B: False
A conditional is a logical compound statement in which a statement p, called the antecedent, implies a statement q, called the consequent.
A conditional is written as \(p \to q\) and is translated as “if p, then q”.
Example: The English statement “If it is raining, then there are clouds in the sky” is a conditional statement. It makes sense because if the antecedent “it is raining” is true, then the consequent “there are clouds in the sky” must also be true.
Example: Construct a truth table for the statement:
\[ \mathord\sim p \to r\]
Consider again the conditional “If it is raining, then there are clouds in the sky.” It seems reasonable to assume that this is true.
The converse would be “If there are clouds in the sky, then it is raining.” This is not always true.
The inverse would be “If it is not raining, then there are not clouds in the sky.” Likewise, this is not always true.
The contrapositive would be “If there are no clouds in the sky, then it is not raining.” This statement is true and is equivalent to the original conditional.
Example:
Suppose this statement is true: “If I eat this giant cookie, then I will
feel sick.” Which of the following statements must also be true?
Written Homework:
Consider the statement “If you park here, then you will get a ticket.” What set of conditions would prove this statement false?
\(~\)
Task: Write the logic tables for the following and compare:
\(~\)
\(~\)
Example: Suppose you order a team jersey online on Tuesday and want to receive it by Friday so you can wear it to Saturday’s game.
The website says that if you pay for expedited shipping, you will receive the jersey by Friday.
In what situation is the website telling a lie?
Written Homework:
Under what conditions can you say that your friend was wrong?
A biconditional is a logical conditional statement in which the antecedent and consequent are interchangeable.
The biconditional is written \(p \leftrightarrow q\), read “p if and only if q.”
The biconditional is the same as \((p \to q)\wedge(q \to p)\).
Task: Find the truth table for the biconditional using this fact.
\(~\)
\(~\)
Written Homework:
I am exercising and I am not wearing my running shoes.
A = True
B = False
I am wearing my running shoes and I am not exercising.
A = True
B = False
I am not exercising and I am not wearing my running shoes.
A = True
B = False
Example: To serve as the President of the US, a person must have been born in the US, must be at least 35 years old, and must have lived in the US for at least 14 years. What minimum set of conditions would disqualify someone from serving as President?
\(~\)
\(~\)
Written Homework:
\(~\)
Argument types:
Arguments can be analyzed with an Euler diagram, also called a Venn diagram.
Use a Venn diagram, truth table, or common form of an argument to decide whether each argument is valid or invalid. Explain your reasoning.
All cats are mammals. A tiger is a cat. Therefore, a Tiger is a mammal.
No cows are purple. Fido is not a cow. Therefore, Fido is purple.
If a person is on this reality show, they must be self-absorbed. Laura is not self-absorbed. Therefore, Laura cannot be on this reality show.
If you are a triathlete, then you have outstanding endurance. LeBron James is not a triathlete. Therefore, LeBron does not have outstanding endurance.
Written Homework:
More complex arguments can also be analyzed with truth tables.
Is the following argument valid or invalid?
Premise: If you bought bread, then you went to the store.
Premise: You bought bread.
Conclusion: You went to the store.
A = Valid
B = Invalid
Premise: If I have a shovel, I can dig a hole.
Premise: I dug a hole.
Conclusion: Therefore, I had a shovel.
A = Valid
B = Invalid
Homework Questions:
Use truth tables (or other means) to evaluate whether the following is valid or invalid reasoning.
Premise: If I go to the mall, then I’ll buy new jeans.
Premise: If I buy new jeans, I’ll buy a shirt to go with it.
Conclusion: If I go to the mall, I’ll buy a shirt.
Premise: If I drop my phone into the swimming pool, my phone will
be ruined.
Premise: My phone isn’t ruined.
Conclusion: I didn’t drop my phone in the swimming pool.
Premise: If you pull that fire alarm, you will get in big
trouble.
Premise: You got in big trouble.
Conclusion: You must have pulled the fire alarm.
Premise: If I go to the party, I’ll be really tired
tomorrow.
Premise: If I go to the party, I’ll get to see friends.
Conclusion: If I don’t see friends, I won’t be tired tomorrow.
“Jane says that whales aren’t fish, but she’s only in the second grade, so she can’t be right.”
“Nobody has proven that photo isn’t of Bigfoot, so it must be Bigfoot.”
“A diet high in bacon can be healthy; Doctor Atkins said so.”
“Humans will travel faster than light: faster-than-light travel would be beneficial for space travel.”
“Either those lights in the sky were an airplane or aliens. There are no airplanes scheduled for tonight, so it must be aliens.”
“I shouldn’t have gotten a C in that class; I’m an A student!”
“Today I wore a red shirt, and my football team won! I need to wear a red shirt every time they play to make sure they keep winning.”
“Months with high ice cream sales also have a high rate of deaths by drowning. Therefore, ice cream must be causing people to drown.”
“Senator Jones has proposed reducing military funding by 10%. Apparently, he wants to leave us defenseless against attacks by terrorists.”
Written Work:
Identify each logical fallacy.
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
A. Circular
B. Correlation does not imply causation
C. Post hoc
D. Appeal to consequence
E. Straw man
In your group, select one of the following problems you want to work on together. Work together to find a solution (or solutions) to the given problem(s) and/or related questions you find interesting. Then, as a group, write a 1-2 page write-up presenting:
Make sure you edit your write-up to ensure it is readable with no grammar or spelling errors.
Each group will also make a short video presentation of their work, so keep in mind that your work will be made public for other students to view and study.
Make up your own examples of each of the nine types of logical fallacies explained in the previous sections. Then, for each example, explain why this is not true and how using such flawed logic could cause serious problems!
Make up 6 of your own examples of deductive arguments (e.g. “Every student brought a pencil or a pen. Marcie brought a pencil. Therefore, Marcie did not bring a pen.”), three that are valid, and three that are invalid.
Use an Euler diagram (Venn diagram), truth table, or common form of an argument to decide whether each argument is valid or invalid. Make sure each person in your group has evaluated each argument AND that you agree!
In this chapter, we have been studying the inclusive or (\(\lor\)), which allows both A and B to be true. The exclusive or, denoted \(\veebar\), does not allow both to be true; it translates to “either A or B, but not both.”
Write out the truth table for the exclusive or: \(\veebar\).
Write out the truth table for \((A \lor B) \land \mathord\sim(A \land B)\). What do you notice? Explain what you found.
Come up with up two more situations where the inclusive or would be used and two more situations where the exclusive or would be used.
Suppose Lee likes apples or bananas for a snack. Mary likes bananas or carrots. And Nancy likes apples or carrots. In what situations can you choose snack(s) that satisfy Lee, Mary, and Nancy?
Since \((A \lor B)\) makes Lee happy, \((B \lor C)\) makes Mary happy, and \((A \lor C)\) makes Nancy happy, we want to find \((A \lor B) \land (B \lor C) \land (A \lor C)\).
Pick a logic puzzle from the following website to solve:
https://logic.puzzlebaron.com/
Explain your logic and the steps that led you to solve the puzzle, and the solution. What did you learn (about logic, problem-solving, and/or about yourself!) in the process of solving this puzzle?