Discrete Mathematics Lecture 03 - Fall 2024 PDF
Document Details
Uploaded by Deleted User
Daffodil International University
2024
Mohammad Azam Khan, PhD
Tags
Summary
This document is a lecture on discrete mathematics, focusing on compound propositions and logical operations. It provides definitions, examples, and truth tables for conjunction, disjunction, negation, and conditional statements. The lecture is part of a Fall 2024 course at Daffodil International University.
Full Transcript
Daffodil International University (DIU) Department of Software Engineering (SWE) Discrete Mathematics Fall 2024 Instructor: Mohammad Azam Khan, PhD Department of Software Engineering – Discrete Mathematics Lecture 03 Compound proposi...
Daffodil International University (DIU) Department of Software Engineering (SWE) Discrete Mathematics Fall 2024 Instructor: Mohammad Azam Khan, PhD Department of Software Engineering – Discrete Mathematics Lecture 03 Compound proposition, logical operators Department of Software Engineering – Discrete Mathematics 2 Compound Propositions v Consists of two or more propositions separated by logical connectors. v In other words, two or more propositions combined using logical connectives to form a compound proposition. v Logical operators/connectives Ø Used to form new propositions from two or more existing propositions. Department of Software Engineering – Discrete Mathematics 3 Logical Operators/Connectives Ø Forms new propositions from two or more existing propositions. Ø Precedence levels: ¬, ∧, ∨, →, and ↔. Symbol Connective Name Remarks ¬ Not Negation * Applied on single proposition * ~ sign is also used for negation ∧ And Conjunction Both statement must be true ∨ Or Disjunction At least one statement must be true ⟶ Implies or Conditional statement Implication if... then ⟷ If and only if Biconditional statement Bi-implications Department of Software Engineering – Discrete Mathematics 4 Negation Ø Opposite of the given statement Ø Constructs a new proposition from a single existing proposition Ø Truth table p ¬p T F F T Ø Example p: Azam is a doctor. ¬p: Azam is not a doctor. (It is not the case that Azam is a doctor.) Department of Software Engineering – Discrete Mathematics 5 Conjunction: Definition and Truth Table Ø Let p and q be propositions. The conjunction of p and q, denoted by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is true when both p and q are true and is false otherwise. Ø The Truth Table for the conjunction of two propositions p q p∧q T T T T F F F T F F F F Department of Software Engineering – Discrete Mathematics 6 Conjunction: Example Ø p: “Rebecca’s PC has more that 16 GB free hard disk space.” Ø q: “The processor in Rebecca’s PC runs faster than 1 GHz.” Ø p ∧ q (the conjunction) “Rebecca’s PC has more than 16 GB free hard disk space, and its processor runs faster than 1 GHz.” Ø The conjunction to be true, both condition given must be true, otherwise false! Department of Software Engineering – Discrete Mathematics 7 Conjunction: Example … Ø p: “Rebecca’s PC has more than 16 GB free hard disk space.” Ø q: “The processor in Rebecca’s PC runs faster than 1 GHz.” p q p∧q Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs T free hard disk space. at the speed of 1.6 GHz. Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs F free hard disk space. at the speed of 1 GHz. Rebecca’s PC has 8 GB free The processor in Rebecca’s PC at F hard disk space. the speed of 2.2 GHz. Rebecca’s PC has 4 GB free The processor in Rebecca’s PC runs F hard disk space. at the speed of 600 MHz. Department of Software Engineering – Discrete Mathematics 8 Disjunction: Definition and Truth Table Ø Let p and q be propositions. The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise. Ø The Truth Table for the disjunction of two propositions p q p∨q T T T T F T F T T F F F Department of Software Engineering – Discrete Mathematics 9 Disjunction: Example Ø p: “Rebecca’s PC has more that 16 GB free hard disk space.” Ø q: “The processor in Rebecca’s PC runs faster than 1 GHz.” Ø p ∨ q (the disjunction) “Rebecca’s PC has more than 16 GB free hard disk space, or its processor runs faster than 1 GHz or both conditions above are true.” Ø The disjunction to be true, at least one condition given must be true, otherwise false! Ø Above situation/example also known as “Inclusive or.” Department of Software Engineering – Discrete Mathematics 10 Disjunction: Example … Ø p: “Rebecca’s PC has more than 16 GB free hard disk space.” Ø q: “The processor in Rebecca’s PC runs faster than 1 GHz.” p q p∨q Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs T free hard disk space. at the speed of 1.6 GHz. Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs T free hard disk space. at the speed of 1 GHz. Rebecca’s PC has 8 GB free The processor in Rebecca’s PC at T hard disk space. the speed of 2.2 GHz. Rebecca’s PC has 4 GB free The processor in Rebecca’s PC runs F hard disk space. at the speed of 600 MHz. Department of Software Engineering – Discrete Mathematics 11 Disjunction: Exclusive Or Ø Let p and q be propositions. The exclusive or of p and q, denoted by p ⊕ q, is the proposition that is true when exactly one of p and q is true and is false otherwise. Ø p: “Rebecca is studying.”, q: “She is sleeping.” Ø p ⊕ q (the disjunction, exclusive or) “Either Rebecca is studying, or she is sleeping. It is not possible that both the statements are true.” This situation is known as exclusive or (disjunction). Ø Truth table for exclusive or: p q p⊕q T T F T F T F T T F F F Department of Software Engineering – Discrete Mathematics 12 Disjunction: Example (Exclusive or) Ø p: “Rebecca’s PC has more than 16 GB free hard disk space.” Ø q: “The processor in Rebecca’s PC runs faster than 1 GHz.” p q p⊕q Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs F free hard disk space. at the speed of 1.6 GHz. Rebecca’s PC has 32 GB The processor in Rebecca’s PC runs T free hard disk space. at the speed of 1 GHz. Rebecca’s PC has 8 GB free The processor in Rebecca’s PC at T hard disk space. the speed of 2.2 GHz. Rebecca’s PC has 4 GB free The processor in Rebecca’s PC runs F hard disk space. at the speed of 600 MHz. Department of Software Engineering – Discrete Mathematics 13 Conditional Statement Ø Let p and q be propositions. The conditional statement p → q is the proposition “if p, then q.” Ø The conditional statement p → q is false when p is true and q is false, and true otherwise. Ø In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Ø Example: If you get overall 80% marks on this course, then you will receive an A+. Ø Truth table p q p→q The statement p → q is true T T T when both p and q are true T F F F T T and when p is false (no matter F F T what truth value q has). Department of Software Engineering – Discrete Mathematics 14 Conditional Statement: Example Ø p → q: If you get overall 80% marks on this course, then you will receive an A+. p q p→q You got overall 90% marks You received an A+ T You got overall 80% marks You received an A F Cheating! You got overall 79% marks You received an A+ T You got overall 75% marks You received a A T The statement p → q is true when both p and q are true and when p is false (no matter what truth value q has). Department of Software Engineering – Discrete Mathematics 15 The statement p → q is called a conditional statement because p → q asserts that q on the condition that p holds. A conditional statement is also called an implication. The truth table for the conditional statement p → q is shown in Table 5. Note t statement p → q is true when both p and q are true and when p is false (no matter wha value q has). Variety of terminology for p → q Because conditional statements play such an essential role in mathematical reaso variety of terminology is used to express p → q. You will encounter most if not all following ways to express this conditional statement: “if p, then q” “p implies q” “if p, q” “p only if q” “p is sufficient for q” “a sufficient condition for q is p” “q if p” “q whenever p” “q when p” “q is necessary for p” “a necessary condition for p is q” “q follows from p” “q unless ¬p” A useful way to understand the truth value of a conditional statement is to think obligation or a contract. For example, the pledge many politicians make when running fo is Department of Software Engineering – Discrete Mathematics 16 “If I am elected, then I will lower taxes.” BICONDITIONALS We now introduce another way to c that two propositions have the same truth value. Biconditional Statement DEFINITION 6 Let p and q be propositions. The biconditional statemen Ø Let p and q be propositions. The biconditional and only ⟷q statement pstatement if q.” The biconditional p ↔ q is true is the proposition “p if and only ifand values, q.”is false otherwise. Biconditional statements ar Ø The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Ø Example: The truth table for p ↔ q is shown in Table 6. Note that the the q: p: You can take the flight, conditional You buy astatements ticket. p → q and q → p are true and is p ↔ q: You can take the theflight words “if and if and onlyonly if youif”buy to aexpress ticket. this logical connective by combining the symbols → and ←. There are some othe Ø Truth table p q p↔q “p is necessary and sufficient for q” T T T “if p then q, and conversely” T F F “p iff q.” F T F F F T The last way of expressing the biconditional statement p ↔ “if and only if.” Note that p ↔ q has exactly the same truth Department of Software Engineering – Discrete Mathematics 17 TABLE 6 The Truth Table for the Biconditional p ↔ q. Homework Ø Construct the truth table of the compound proposition (p ∨ ¬q) → (p ∧ q). Department of Software Engineering – Discrete Mathematics 18 Thank You! Q&A Department of Software Engineering – Discrete Mathematics 19