Discrete Mathematics, KOM1062 Lecture #2

Discrete Mathematics, KOM1062 Lecture #2

9.03.2021 Discrete Mathematics, KOM1062 Lecture #2 Instructor: Dr. Yavuz Eren Lecture Book: “Discrete Mathematics, Seventh Edt., Kenneth H. Rosen, 2007, McGraw Books Discrete Mathematics and Applications, Susanna S. Epp, Brooks, 4th Edt., 2011”. Spring 2021 Discrete Mathematics, Lecture Notes #2 1 Propositional Equivalences • An important type of step used in a mathematical argument is the replacement of a statement with another statement with the same truth value • Because of this, methods that produce propositions with the same truth value as a given compound proposition are used extensively in the construction of mathematical arguments. Definition 1: A compound proposition that is always true, no matter what the truth values of the propositional variables that occur in it, is called a tautology. A compound proposition that is always false is called a contradiction. A compound proposition that is neither a tautology nor a contradiction is called a contingency. Ex. 1(25): We can construct examples of tautologies and contradictions using just one propositional variable. Consider the truth tables of p ∨¬p and p ∧¬p, shown in the Table. Because p ∨¬p is always true, it is a tautology. Because p ∧¬p is always false, it is a contradiction. Compound propositions that have the same truth values in all possible cases are called logically equivalent. Definition 2: The compound propositions p and q are called logically equivalent if p ↔ q is a tautology. The notation p ≡ q denotes that p and q are logically equivalent. Note that, The symbol⇔is sometimes used instead of ≡ to denote logical equivalence. Example for the Tautology and Contradiction Cases p ¬p p ∨¬p p ∧¬p TF T F FT T F Discrete Mathematics, Lecture Notes #2 2 1 9.03.2021 • One way to determine whether two compound propositions are equivalent is to use a truth table. In particular, the compound propositions p and q are equivalent if and only if the columns giving their truth values agree. Following example illustrates this method to establish an extremely important and useful logical equivalence, namely, that of ¬(p ∨ q) with ¬p ∧¬q. This logical equivalence is one of the two De Morgan laws, shown in the Table, named after the English mathematician Augustus De Morgan, of the mid-nineteenth century. De Morgan’s Laws. ¬(p ∧ q) ≡¬p ∨ ¬q ¬(p ∨ q) ≡¬p ∧¬q Ex. 2(26): Show that ¬(p ∨ q) and ¬p ∧¬q are logically equivalent. Solution: Truth Table p q p∨ q ¬(p∨ q) ¬p ¬q ¬p ∧¬q T TT F F F F T FT F F T F F TT F T F F F FF T T T T Discrete Mathematics, Lecture Notes #2 3 Ex. 3(26): Show that p → q and ¬p ∨ q are logically equivalent. Solution: Ex. 4(27): Show that p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent. This is the distributive law of disjunction over conjunction. Solution: Discrete Mathematics, Lecture Notes #2 4 2 9.03.2021 • Table 6 contains some important equivalences. In these equivalences, T denotes the compound proposition that is always true and F denotes the compound proposition that is always false. We also display some useful equivalences for compound propositions involving conditional statements and biconditional statements in Tables 7 and 8, respectively. Logical Equivalant Propositions p∧ T ≡p İdentity Laws p∨ F ≡p p ∨ T ≡T Domination Laws p ∧ F ≡F p ∨ p ≡p Idempotent Laws p ∧ p ≡p ¬ (¬p)≡p Double Negation Law p ∨ q ≡ q ∨ p Commutative Laws p ∧ q ≡ q ∧ p (p ∨ q)∨ r≡p∨ (q ∨ r) Associative Laws (p ∧ q) ∧ r≡p∧ (q ∧ r) p∨ (q ∧ r) ≡(p ∨ q ) ∧(p ∨ r) Distributive Laws p∧ (q ∨ r) ≡(p ∧ q ) ∨(p ∧ r) ¬(p ∧ q) ≡¬p ∨ ¬q De Morgan’s Laws ¬(p ∨ q) ≡¬p ∧¬q p∨ (p ∧ q) ≡p Absorption Law p∧ (p ∨ q) ≡p p ∨ ¬p=T Negation Law p ∧ ¬p=F Discrete Mathematics, Lecture Notes #2 5 • The associative law for disjunction shows that the expression p ∨ q ∨ r is well defined, in the sense that it does not matter whether we first take the disjunction of p with q and then the disjunction of p ∨ q with r, or if we first take the disjunction of q and r and then take the disjunction ofp with q ∨ r. Similarly, the expressionp ∧ q ∧ r is well defined. By extending this reasoning, it follows that p1 ∨ p2 ∨ · · · ∨ pn and p1 ∧ p2 ∧ · · · ∧ pn are well defined whenever p1, p2, . , pn are propositions. • Furthermore, note that De Morgan’s laws extend to ¬(p1 ∨ p2 ∨ · · · ∨ pn) ≡ (¬p1 ∧¬p2 ∧ ··· ∧ ¬pn) ¬(p1 ∧ p2 ∧ · · · ∧ pn) ≡ (¬p1 ∨¬p2 ∨ ··· ∨ ¬pn). Logical Equivalences of Some Conditional Logical Equivalences of Some Statements Biconditional Statements ¬ ¬ ¬ p → q ≡ p ∨ q≡ q → p p ↔ q ≡ (p → q ) ∧ (q → p) ¬ p ∨ q ≡ p → q p ↔ q ≡ ¬p ↔¬q ¬ ¬ p ∧ q ≡ (p → q) p ↔ q ≡ (p ∧ q ) ∨ (¬p ∧¬q) ¬ ¬ (p → q ) ≡ p ∧ q ¬(p ↔ q ) ≡ p ↔ ¬q (p → q ) ∧ (p → r) ≡ p → (p ∧ r) (p → r ) ∧ (q→ r) ≡ (p ∨ q )→ r (p → q ) ∨ (p → r) ≡ p → (q ∨ r) (p → r ) ∨ (q→ r) ≡ (p ∧ q )→ r Discrete Mathematics, Lecture Notes #2 6 3 9.03.2021 De Morgan’s Laws: The two logical equivalences known as De Morgan’s laws are particularly important. They tell us how to negate conjunctions and how to negate disjunctions. In particular, the equivalence ¬(p ∨ q) ≡ ¬p ∧¬q tells us that the negation of a disjunction is formed by taking the conjunction of the negations of the component propositions. Similarly, the equivalence ¬(p ∧ q) ≡ ¬p ∨¬q tells us that the negation of a conjunction is formed by taking the disjunction of the negations of the component propositions. Ex. 5(29): Use De Morgan’s laws to express the negations of “Miguel has a cellphone and he has a laptop computer” and “Heather will go to the concert or Steve will go to the concert.” Solution: Constructing New Logical Equivalences: The logical equivalences in Table 6, as well as any others that have been established, can be used to construct additional logical equivalences. The reason for this is that a proposition in a compound proposition can be replaced by a compound proposition that is logically equivalent to it without changing the truth value of the original compound proposition. Ex. 6(29): Show that ¬(p → q) and p ∧¬q are logically equivalent. Solution: Discrete Mathematics, Lecture Notes #2 7 Ex. 7(30):Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧¬q are logically equivalent by developing a series of logical equivalences. Solution: Ex. 8(30): Show that (p ∧ q) → (p ∨ q) is a tautology. Solution: Propositional Satisfiability: A compound proposition is satisfiable if there is an assignment of truth values to its variables that makes it true. When no such assignments exists, that is, when the compound proposition is false for all assignments of truth values to its variables, the compound proposition is unsatisfiable. Note that a compound proposition is unsatisfiable if and only if its negation is true for all assignments of truth values to the variables, that is, if and only if its negation is a tautology. Ex. 9(31): Determine whether each of the compound propositions (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p), (p ∨ q ∨ r) ∧ (¬p ∨¬q ∨¬r), and (p ∨¬q) ∧ (q ∨¬r) ∧ (r ∨¬p) ∧ (p ∨ q ∨ r) ∧ (¬p ∨¬q ∨¬r) is satisfiable. Solution: Discrete Mathematics, Lecture Notes #2 8 4 9.03.2021 Predicates and Quantifiers • We will see how predicate logic can be used to express the meaning of a wide range of statements in mathematics and computer science in ways that permit us to reason and explore relationships between objects. • To understand predicate logic, we first need to introduce the concept of a predicate. Afterward, we will introduce the notion of quantifiers, which enable us to reason with statements that assert that a certain property holds for all objects of a certain type and with statements that assert the existence of an object with a particular property. Predicates: Statements involving variables, such as “x > 3,” “x = y + 3,” “x + y = z,” “computer x is under attack by an intruder,” “computer x is functioning properly,” called as predicate statements. These statements are neither true nor false when the values of the variables are not specified.But they enable us to produce another statements. Ex. 1(37): Let P(x) denote the statement “x > 3.” What are the truth values of P(4) and P(2)? Solution: Discrete Mathematics, Lecture Notes #2 9 Ex. 3(38): Let Q(x, y) denote the statement “x = y + 3.” What are the truth values of the propositions Q(1, 2) and Q(3, 0)? Solution: Ex. 4(39): Let A(c, n) denote the statement “Computer c is connected to network n,” where c is a variable representing a computer and n is a variable representing a network. Suppose that the computer MATH1 is connected to network CAMPUS2, but not to network CAMPUS1. What are the values of A(MATH1, CAMPUS1) and A(MATH1, CAMPUS2)? Solution: Ex. 5(39): letR(x, y, z) denote the statement x + y = z. What are the truth values of the propositions R(1, 2, 3) and R(0, 0, 1)? Solution: Ex. 6(39): Consider the statement if x > 0 then x := x + 1. Solution: PRECONDITIONS AND POSTCONDITIONS: • Predicates are also used to establish the correctness of computer programs, that is, to show that computer programs always produce the desired output when given valid input. • The statements that describe valid input are known as preconditions and the conditions that the output should satisfy when the program has run are known as postconditions. Discrete Mathematics, Lecture Notes #2 10 5 9.03.2021 Ex.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    19 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us