MATH 170 Project Section 2.1: #29,31,45,46 Section 3.3. #26 Laws in logic are very similar to normal algebra laws and can consequently be thought of in the same way. In order to understand various problems in logic and their similarity to algebra, different problem sets will be attempted while explanations for how those questions have to be dealt with will be given. The first questions #29 and #31 ask for the use of De Morgan’s laws, consequently we have to have a closer look at those. Refering to the definition of De Morgan’s laws in “Discrete Mathematics with Applications” by Susanna S. Epp, we apply those laws as follows: (1) ∼(p ∧ q) ≡ ∼p ∨ ∼q (2) ∼(p ∨ q) ≡ ∼p ∧ ∼q As mentioned before, laws of logic are very similar to normal algebra laws. The statements above are very similar to the laws of elementary algebra concerning operators, normal multiplication and multiplication of brackets. Looking at those statements above reminds of the multiplication by (-1). The two laws by De Morgan state that the negation of a bracket changes the operators of the parantheses within the bracket as well as the connection of those, in this case two, parantheses as stated above. Bearing this in mind, questions #29 and #31 can be attempted. “Use De Morgan’s laws to write negations for the statements in [#29&#31].” #29 “This computer program has a logical error in the first ten lines or it is being run with an incomplete data set.” In order to negate this statement, the parentheses included have to be defined. The English sentence above consists of two parts and can be divided into two parentheses. Consequently, parentheses p and q can be defined as follows: (1) p= has a logical error in the first ten lines (2) q= is being run with an incomplete data set Referring to logic operations, the parenthesis of the initial sentence are separated by an “or”, which represents a disjunction. This disjunction of this sentence can be represented as “p ∨ q”. Looking at the two laws of De Morgan, this disjunction can be negated by using law (2): ∼(p ∨ q) ≡ ∼p ∧ ∼q In order to translate this logic statement back into an English sentence, the parentheses p and q have to be negated. This can be achieved by just adding a “not” to both p and q: (1) ∼p= does not have a logical error in the first ten lines (2) ∼q=is not being run with an incomplete data set Those two parentheses will be connected by “∧”, a conjunction which is referred to as an “and” in the English language. The negation of the initial question statement is: “This computer program does not have a logical error in the first ten lines and is not run with an incomplete data set.” #31 “The train is late or my watch is fast.” To get the negation of this statement, the same procedure will be followed as in #29. Thus, the parentheses p and q have to be defined by looking at the initial English sentence: (1) p= the train is late (2) q= my watch is fast The logic operator between p and q is an “or”, hence the sentence can be represented as “p ∨ q”. Using De Morgan’s law (2): ∼(p ∨ q) ≡ ∼p ∧ ∼q The negations of the initial parentheses: (1) ∼p= the train is not late (2) ∼q= my watch is not fast The negations are now connected by a conjunction, consequently the negated statement is: “The train isn’t late and my watch isn’t fast.” Logical statements are not always as simple as the ones dealt with above. Question #45 deals with more complex statements and whether those statements are logically equivalent or not. Logical equivalence means that two or more statements imply the same initial statement, consequently include the same parentheses. As parentheses can be represented in various ways, logical equivalence can be proven by creating a truth table for the parentheses of the statements involved. A truth table represents the actual value of a statement, which means either true or false. In order to prove logical equivalence, the columns of the statements have to have the same truth values for each row. #45 ”Determine whether the statements in a and b are logically equivalent.” A) “Bob is a double math and computer science major and Ann is a math major but Ann is not a double math and computer science major.” B) “It is not the case that both Bob and Ann are double math and computer science majors, but it is the case that Ann is a math major and Bob is a double math and computer science major.” Looking at the sentences, three parentheses come to mind: (1) p= Bob is a double major (2) p= Ann is a math major (3) r= Ann is a double major Consindering those three variables, the statements can be expressed as follows: A) P ∧ Q ∧ ∼R B) ∼ (P ∧ R) ∧ Q ∧ P Now a truth table has to be created to compare the truth values for both statements above. P Q R ∼P ∼R ∼P ∨ ∼R T T T T F F F F T T F F T T F F T F T F T F T F F F F F T T T T F T F T F T F T F T F T T T T T (∼P ∨ ∼R) ∧ Q∧R F F F F T F F F P∧Q∧ ∼R F T F F F F F F As the last two columns are completely equal the initial two statements are not logically equal. 46. a) Find simpler statement forms that are logically equivalent to p ⊕ p and [p ⊕p]⊕p. p p⊕p T F F F p⊕p ≡ c When all the values of a truth table are false, it is call a contradiction, which is notarized as “c”. p p⊕p T F F F (p⊕p)⊕p ≡ p (p⊕p) ⊕p T F b) Is (p⊕q)⊕r ≡p⊕(q⊕r)? Justify your answer. p T T T T q T T F F r T F T F p⊕q F F T T (p⊕q) ⊕r T F F T q⊕r F T T F p⊕ (q⊕r) T F F T F T F T F F F F (p⊕q)⊕r ≡ p⊕(q⊕r) T F T F T T F F F T T F F T T F F T T F c) Is (p⊕q)^r ≡ (p^r)⊕(q^r)? Justify your answer. p q T T T T T F T F F T F T F F F F (p⊕q)^r ≡/≡ (p^r)⊕(q^r) r T F T F T F T F p⊕q F F T T T T F F (p⊕q)^r F F T T F F F F p^r T F T F F F F F q^r T F F F T F F F (p^r)⊕(q^r) F F T F T F F F 3.3 Discrete Mathematics with Applications Fourth Edition, Susanna S. Epp Referring to the Tarksi world, above. For each, (a) determine whether the statement is true or false and justify your answer, (b) write a negation for the statement. 26. ∀ circles x and ∀ triangles y, x is above y. For all circles x and all triangles y, x is above y. a) Given x = Given y = a d and f and i b or c d and f and i False, circles b and c are not above triangle d. b) Ǝ circles x or Ǝ triangles y, x is not above y. There exists circles x or triangles y where x is not above y. Check that x is above y Yes No