Logic CSLU 1100.003 Fall 2007 Cameron McInally [email protected] Fordham University Logic A statement can be either True or False. Logic • Who is telling the truth and who is lying? – Person A: “We are both lying”. – Person B: “Person A is lying”. • Who is telling the truth and who is lying? – Person A: “At least one of us is lying”. – Person B: “Person A and C are lying”. – Person C: “Only one of the other two are lying”. Logic • Some statements are obviously True: o “All men are mortal”. o “Socrates is a man”. • Some statements are obviously False: o “All men are Socrates”. Logic • Some statements, we cannot tell if it is True or False. o “Peter Piper picked a peck of pickled peppers”. But, we do know that it must one of the two. Logic • Some statements are too hard to determine the correct answer… – “Seinfeld is the best show ever”. So, We don’t care about these. Logic • Mathematicians like to use symbols to represent things. • For example, o p Ξ Peace o q Ξ Quiet • So, o p and q Ξ Peace and Quiet Logic • So, if we wanted “Peace and Quiet”… o We could say we want “p and q” which is easier and quicker to write. Logic • We can associate either a True or False value with a symbol. – What is the value of q, if q = Quiet? • It is Quiet? – This implies that q = True. • It is not Quiet? – This implies the q = False. Logic • There are also the operations And and Or… – And (Λ) • p and q = p Λ q – Or (V) • p or q = p V q. • These operations allow us to combine more than one statement. Logic • First, lets look at And (Λ) – So, for p Λ q, we can have • • • • p Ξ True Λ q Ξ True p Ξ True Λ q Ξ False p Ξ False Λ q Ξ True p Ξ False Λ q Ξ False Logic • Next, lets look at Or (V) – So, for p V q, we can have • • • • p Ξ True V q Ξ True p Ξ True V q Ξ False p Ξ False V q Ξ True p Ξ False V q Ξ False Make sure that you see both And and Or can have the same combinations of True and False. Logic • The combinations of True and False values, for a set of statements, can be represented as a Truth Table: p pΛqΛr – For example, q r Combination #1 True True True Combination #2 True True False Combination #3 True False True Combination #4 True False False Combination #5 False True True Combination #6 False True False Combination #7 False False True Combination #8 False False False Logic • Who is telling the truth and who is lying? – Person A: “We are both lying?” – Person B: “Person A is lying?” a True True False False b True False True False Logic • What does this Truth Table imply… – Person A: “We are both lying?” – Person B: “Person A is lying?” Person A Person B True True False False True False True False Statement Statement a is b is False False False False False True True True ← Logic • Who is telling the truth and who is lying? – Person A: “At least one of us is lying”. – Person B: “Person A and Person C are lying”. – Person C: “Only one of the other two are lying”. You try it!!! Logic • What did you come up with? a b c p q r True True True False False False True True False True False False True False True True False True True False False False False False False True True True False True False True False True False True False False True True False False False False False True True False ← Logic • Logical Connectives – We need a way to combine logical statements, e.g. • “I am going to the movies”. • “I am going to the mall”. – Both of these are correct. But, what if we want to do both, one or the other, or neither? What if we want to say that one will cause the other? How do we represent this? Logic • How do we say… – “I am not going to the movies”. – “I am going to the movies” and “I am going to the mall”. – “I am going to the movies” or “I am going to the mall”. – If “I am going to the movies”, then “I am going to the mall”. Logic • The connective Not (¬) – Not reverses the meaning of a statement. p ¬p True False False True Logic • The connective And • Works the same as in the English language. p True True False False q True False True False pΛq True False False False Logic • The connective Or • Does NOT work the same as in the English Language. p True True False False q True False True False pVq True True True False Logic • The connective Implies (→) • If the first statement happens, the second statement will follow. p True True False False q True False True False p→q True False True True Logic • Lets make a Truth Table for… ¬ (p Λ q) → (p V q) p q (p Λ q) ¬(p Λ q) (p V q) ¬ (p Λ q) → (p V q) True True True False True False False True True True True True False False True False False False True True True False True False Logic • Tautologies – This happens when every combination of values in a Truth Table leads to a True result. • Contradiction – This happens when every combination of values in a Truth Table leads to a False result. Logic • Hints: – Break each column of you table into dealing with only one logical connective at a time… this will reduce logic errors – Use the parentheses as your guide for how to break the statement down. – Do not try to perform any transformations on the logic statement outside of those that have been taught. Logic • People and problems often use the phrase “show two statements are equivalent” • All this means is that when you complete the truth table for both of them then the have the same values all the way down the column in the truth table. Logic • Practice ( p a) Logic • Practice ( p (r a )) Logic • Practice (a b) [b (c a)] Logic • A few more practice problems: – Truth Table Practice • http://storm.cis.fordham.edu/~kinley/classes/summer0 6/cseu1100/flash/ch1/sec1_3/truthtables/tt_control.ht ml – Equivalences Practice • http://storm.cis.fordham.edu/~kinley/classes/summer0 6/cseu1100/flash/ch1/sec1_3/equivalence/tteq_contro l.html Logic Homework (Always Due in One Week) • Read Section 3.1 to 3.6 • Complete Section 3.8 pages 49-50: 1a, 1b(i-v), 1c(i,ii)
© Copyright 2026 Paperzz