SlideServe
Menu
Préférences
© SlideServe · v2026

Logical Conjunction and Implication in Discrete Structures

sonia-roy avatar
14 diapositives · 253 Views · Nov 13, 2014

Understand logical conjunction (AND) and implication (IF-Then) with examples and truth tables in a discrete structures class. Learn to translate English into logical expressions and solve quiz questions. Take your learning further by finishing online exercises.

Logical Conjunction and Implication in Discrete Structures - slide 1
01 / 14Logical Conjunction and Implication in Discrete Structures
1 / 17

Télécharger la présentation

Logical Conjunction and Implication in Discrete Structures
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. A sample class of Discrete Structures (Logical conjunction and logical implication) Gongjun Yan Computer Science Department, Old Dominion University, Norfolk, VA

  2. Review • Proposition • Declarative • Either true or false but not both • Examples • Which of the following are propositions? • Today is Friday. • 1 + 1 = 3 • What time is it? • Close the window. Value = True Value = False

  3. More Questions • What are the values of propositions below? • If Tiger Woods is studying discrete structures, then he will not play golf. • If a fly has no wings, it can be called a walk. • If olive oil comes from olives, then baby oil comes from babies. • How the if statement works in the below code? • dScore = 93; • if ( (dScore <= 100) && (dScore > 90) ) • { • print "You got an A." • }

  4. Today’s Content • Logical Conjunction (AND), logical implication (IF-Then) • The truth table of AND and IF-THEN

  5. Logical conjunction: AND • Is an operation on two propositions • Produces a value of trueif and only if both of its propositions are true • Is written as p AND q, p ∧ q, p & q, or p.q • We often use p q

  6. Truth Table • Indicate the value of the logical expressions. • The # of rows = 2 to the power of (# of operators) • The Truth table of p ∧ q if both p and q are true, then p ∧ q is true

  7. Example • Translate the underlined expression into the conjunction p ∧ q • dScore = 93;if ( (dScore <= 100) && (dScore > 90) ){ print(“you got an A.”);} • Answer: • Let p = (dScore <= 100), • q = (dScore > 90) . • We write p q

  8. Example 2 • dScore = 93;what is the value of the expression(dScore <= 100) && (dScore > 90) ? • Answer: • Let p = (dScore <= 100); • q = (dScore > 90). • The expression can be translated to p q • p=true; • q=true. • By truth table, • the answer is true.

  9. Logical implication: IMPLIES • Is a proposition “if p, then q”. • Produces all true values except when p is true and q is false. • Is written as p IMPLIES q , p → q, p ⇒ q • We often use p q • The Truth table of p → q All true except when p is true and q is false.

  10. Example 3 • 3.1 Translate English into logical implication p→q: If olive oil comes from olives, then baby oil comes from babies. • Answer: Let p = “Olive oil comes from olives.” • q = “Baby oil comes from babies.” • We write: p q.

  11. Example 3 • 3.2 What is the value of the statement: If olive oil comes from olives, then baby oil comes from babies. • Answer: • Let p = “Olive oil comes from olives.” q = “Baby oil comes from babies.” • We write: p→q; • p=true; • q=false. • By truth table, • the answer is false.

  12. Quiz • What are the values of propositions? • 1. Tom Cruise is an actor and he is handsome. p = “Tom Cruise is an actor.” q= “Tom Cruise is handsome.” • Answer: We write p ∧ q. • In my wife’s opinion, p=true, q=true. • By truth table, the answer is true. • 2. If Tiger Woods is studying discrete structures, then he will not play golf.p=“Tiger Woods is studying discrete structures.”q=“Tiger will not play golf.” • Answer: We write p → q. • In my mind, p=false, q=false. • By truth table, the answer is true.

  13. Summary • Two definitions: • logical conjunction p ∧ q • Logical implication p → q • Truth table of p ∧ q, p → q • Any questions?

  14. Information • Course home page link • http://www.cs.odu.edu/~ygongjun/courses/cs381fall09/instructions/ • Homework: finish the online exercises: • Translation between p ∧ q, p→q and EnglishLink: course-home-page/if_then.html • Turth TablesLink: course-home-page/if_then.html • Office hours: Monday 10:00-12:00am Wednesday 10:00-12:00am