Week1_Day2Logic~Chp.2

Discrete Structure (COSC 208) Fahmina Nur Salma 8/25/2026 1 Topic for Today Chapter 2: 2.1 Propositions and Logical Operations 2.2 Conditional Statement Example Class work /Practice 8/25/2026 2 What is Logic? Logic is the study of reasoning —it provides rules and principles to determine whether statements, arguments, or conclusions are valid and true. Example: Umbrella Decision Statement 1 (Premise): If it is raining, then I will take an umbrella. Statement 2 (Premise): It is raining. Conclusion: Therefore, I will take an umbrella. In simple terms: Logic is a system for thinking clearly and making sure our reasoning is correct. 8/25/2026 3 How Logic works? Logic Uses Statements (Propositions) A propositionis a sentence that can be either True (T)or False (F). Example: “It is raining.” (could be T or F) 8/25/2026 4 Cont. Logic Uses Rules (Operators) We can combine statementsusing logical operators: NOT (¬P):Negation → “It is notraining.” AND (P ∧Q):Both must be true → “It is raining AND it is cold.” OR (P ∨Q):At least one true → “It is raining OR it is cold.” IF…THEN (P → Q):Conditional → “If it is raining, then I will take an umbrella.” 8/25/2026 5 Cont. Logic Checks Truth Values Logic works by testing all possible truth values of statements. This is usually done with a truth table. Example:If P = “It is raining,” and Q = “I will take an umbrella.” 8/25/2026 6 Cont. Logic Deduces Conclusions logic lets us derive new truths from given facts. Premise 1:If it rains, then I take an umbrella. Premise 2:It rains. Conclusion: I take an umbrella. 8/25/2026 7 What is the relation in Logic and discrete structures? Logic = the tool for precise reasoning. Discrete Structures = the framework where logic is applied to sets, functions, relations, graphs, and combinatorics (counting, arranging, and analyzing discrete structures). Essentially: Logic is the backbone of Discrete Structures. 8/25/2026 8 Symbols for logic Propositional Logic Deals with simple statements (propositions) that can be either true (T) or false (F). • Example: “It is raining” (True/False). Uses operators like AND (∧), OR (∨), NOT (¬), IF-THEN (→). Extends propositional logic by including quantifiers (like “for all” ∀ and “there exists” ∃). 8/25/2026 9 Cont. Example: “For all students x, x studies Discrete Math.” In logical expression: ∀x(Student(x) → Studies(x, Discrete Math)) Explanation: ∀x → “for all x” Student(x) → “x is a student” (optional if you want to specify only students) Studies(x, Discrete Math) → “x studies Discrete Math” → → “implies” 8/25/2026 10 Symbols for mathematical representation Find the answer and show it in the class AND / Conjunction--? OR/ Disjunction--? Not--? For all/ for every--? There exists/ for some--? Implies--? If– then--? True--? False--? Quantifiers--? 8/25/2026 11 Propositions A statement or proposition is a declarative sentence that is either true or false, but not both. Example: Which of the following are statements? (a) The earth is round. (b) 2 +3 =5 (c) Do you speak English? (d) 3 −x =5 (e) Take two aspirins. (f) The temperature on the surface of the planet Venus is 800◦F. (g) The sun will come out tomorrow. 8/25/2026 12 Solutions (a) and (b) are statements that happen to be true. (c) is a question, so it is not a statement. (d) is a declarative sentence, but not a statement, since it is true or false depending on the value of x. (e) is not a statement; it is a command. (f) is a declarative sentence whose truth or falsity we do not know at this time; however, we can in principle determine if it is true or false, so it is a statement. (g) is a statement since it is either true or false, but not both, although we would have to wait until tomorrow to find out if it is true or false. 8/25/2026 13 Class Work 1. Which of the following are statements? (a) Is 2 a positive number? (b) 𝑥 +x +1=0 (c) Study logic. (d) There will be snow in January. (e) If stock prices fall, then I will lose money 8/25/2026 14 Negation: Negation means saying that a statement is not true. In simple words: Negation = the opposite of a statement. Example: Give the negation of each of the following statements. (a) 2+7 ≤11 (b) 2 is an even integer and 8 is an odd integer. 8/25/2026 15 Logical Operations In Discrete Structures, logical operations are rules used to combine or modify statements (propositions) to form new statements, called compound statements. The main logical operations are: • Negation (¬ or ∼p):Reverses the truth value of a statement. • Conjunction (∧):"AND" operation; true only if both statements are true. • Disjunction (∨): "OR" operation; true if at least one statement is true. • Implication (→): "If...then..." statement; false only when the first part is true and the second is false. • Biconditional ( ): "If and only if"; true when both statements have the same truth value. 8/25/2026 16 Example 1. Give the negation of the following statements: (a) p:2+3 > 1 (b) q: It is cold. 2. the conjunction of p and q for each of the following. (a) p: It is snowing. q: I am cold. (b) p:2< 3 (c) p: It is snowing. 8/25/2026 q: −5 >−8 q:3< 5 17 Class Work 1. Write each of the following in terms of p, q, r, and logical connectives. (a) Today is Monday and the dish did not run away with the spoon. (b) Either the grass is wet or today is Monday. (c) Today is not Monday and the grass is dry. (d) The dish ran away with the spoon, but the grass is wet. 8/25/2026 18 Cont. ∼r ∧q Write an English sentence using the above that corresponds to each of the following. (a) (b) ∼(p ∨q) (c) ∼q ∨r (d) p ∨∼r 8/25/2026 19 Cont. 2. Use the following to determine the following questions using qunatifiers P(x): x is even; Q(x): x is a prime number; R(x, y): x + y is even. The variables x and y represent integers. i) Write an English sentence corresponding to each of the following. (a) ∀x P(x) (b) ∃x Q(x) ii) Write an English sentence corresponding to each of the following. (a) ∀x ∃y R(x, y) (b) ∃x ∀y R(x, y) 8/25/2026 20 Truth Table 8/25/2026 21 Cont. Find the truth value of the proposition . (a) ∼p∧∼q 8/25/2026 22 Terms A statement that is true for all possible values of its propositional variables is called a tautology. A statement that is always false is called a contradiction or an absurdity A statement that can be either true or false, depending on the truth values of its propositional variables, is called a contingency. 8/25/2026 23 Conditional Statement If p and q are statements, the compound statement “if p then q,” denoted p ⇒q, is called a conditional statement , or implication. The statement p is called the antecedent or hypothesis, and the statement q is called the consequent or conclusion. The connective if ... then is denoted by the symbol ⇒. 8/25/2026 24 Example Form the implication p ⇒q for each of the following. (a) p: I am hungry. q: I will eat. (b) p: It is snowing. q:3+5 =8 Solution: (a) If I am hungry, then I will eat. (b) If it is snowing, then 3 + 5 = 8. 8/25/2026 25 Converse and contrapositive In the English language, and in mathematics, each of the following expressions is an equivalent form of the conditional statement p ⇒q: p implies q; q, if p; p only if q; p is a sufficient condition for q; q is a necessary condition for p. If p ⇒q is an implication, then the converse of p ⇒q is the implication q ⇒p, and the contrapositive of p ⇒ q is the implication ∼q ⇒∼p. 8/25/2026 26 Example Give the converse and the contrapositive of the implication “If it is raining, then I get wet.” Solution: We have p: It is raining; and q: I get wet. The converse is q ⇒p: If I get wet, then it is raining. The contrapositive is ∼q ⇒∼p: If I do not get wet, then it is not raining. 8/25/2026 27 Extra notes Propositional Logic A formal system of logicthat works with propositions(statements that can be true or false). It uses logical connectives like ¬ (not), ∧(and), ∨(or), → (implies), and only if). • Example: • Proposition p: "It is raining." • Proposition q: "The ground is wet." • Formula: p→q= "If it is raining, then the ground is wet." So propositional logic is the whole system/rules for combining and analyzing such statements. 8/25/2026 (if 28 Cont. Premise A statement or assumptionthat serves as the starting pointin an argument. In logic, premises are given as inputsthat are assumed true, and from them we derive a conclusion. • Example: • Premise 1: "All humans are mortal." • Premise 2: "Socrates is a human." • Conclusion: "Socrates is mortal." Here, the premisesare the building blocks; the reasoning process uses logic (could be propositional or predicate logic) to derive the conclusion. 8/25/2026 29 Cont. Key Difference • Propositional logic= a system/rules of reasoning (like grammar of logic). • Premise= an individual assumption or statementwithin an argument (like an input to the system). 8/25/2026 30 Thank you • Q/A 8/25/2026