9/21/2015 1 A sample class of Discrete Structures Gongjun Yan Computer Science Department, Old Dominion University, Norfolk, VA (Logical conjunction and.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

Introduction to Logic Sections 1.1, 1.2, 1.3 of Rosen Spring 2012 CSCE 235 Introduction to Discrete Structures URL: cse.unl.edu/~choueiry/S All questions:
Copyright © Peter Cappello Propositional Logic. Copyright © Peter Cappello Sentence Restrictions Building more precise tools from less precise tools Precise.
Af2 Introduction. What’s the course about? Discrete Mathematics The mathematics that underpins computer science and other sciences as well.
04 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
CSE 311 Foundations of Computing I Spring 2013 Lecture 1 Propositional Logic.
2.2 Conditional Statements. Goals Identify statements which are conditional Identify the antecedent and consequent of a conditional statement Negate conditional.
QUESTION 1 What day is it today? A) I’m Tuesday. B) I have Tuesday. C) Tuesday. D) It’s Tuesday.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 1 Propositional Logic.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
1 Section 1.1 Logic. 2 Proposition Statement that is either true or false –can’t be both –in English, must contain a form of “to be” Examples: –Cate Sheller.
Propositional Logic.
CSE115/ENGR160 Discrete Mathematics 01/17/12 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
CSCI2110 – Discrete Mathematics Tutorial 8 Propositional Logic Wong Chung Hoi (Hollis)
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
Propositions and Truth Tables
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Chapter 8 Logic DP Studies. Content A Propositions B Compound propositions C Truth tables and logical equivalence D Implication and equivalence E Converse,
CSE 311 Foundations of Computing I Autumn 2012 Lecture 1 Propositional Logic 1.
Discrete Mathematics and Its Applications
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
Foundations of Computing I CSE 311 Fall CSE 311: Foundations of Computing I Fall 2014 Lecture 1: Propositional Logic.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Introduction to Abstract Mathematics The Logic and Language of Proofs Instructor: Hayk Melikya Proposition: Informal introduction to.
2-3 Conditional Statements You used logic and Venn diagrams to determine truth values of negations, conjunctions, and disjunctions. Analyze statements.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
Lesson 2-3 Conditional Statements. 5-Minute Check on Lesson 2-2 Transparency 2-3 Use the following statements to write a compound statement for each conjunction.
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
Conditional Statements
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Thinking Mathematically
12/6/ A sample class of Discrete Structures Gongjun Yan Computer Science Department, Old Dominion University, Norfolk, VA (Logical conjunction and.
Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a.
1/10/ Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta Office: CSEB 3043 Phone:
Chapter 1: The Foundations: Logic and Proofs
Discrete Structures – CNS 2300
Logic The Lost Art of Argument. Logic - Review Proposition – A statement that is either true or false (but not both) Conjunction – And Disjunction – Or.
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
Discrete Mathematics Lecture # 4. Conditional Statements or Implication  If p and q are statement variables, the conditional of q by p is “If p then.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
CS-7081 Application - 1. CS-7082 Example - 2 CS-7083 Simplifying a Statement – 3.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Chapter 1 – Part 3 ELEMENTARY LOGIC
Truth Tables for Negation, Conjunction, and Disjunction
Truth Tables and Equivalent Statements
Section 7.1 Logical Operators
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Logic.
The Boolean Connectives
Discrete Math (2) Haiming Chen Associate Professor, PhD
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
CSE 321 Discrete Structures
MAT 3100 Introduction to Proof
Discrete Mathematics Lecture 2: Propositional Logic
Truth Tables for the Conditional and Biconditional
Topics discussed in this section:
Statements and Logical Connectives
2-2 Logic Part 2 Truth Tables.
8A, 8B Propositions Unit 7: Logic and Sets 8A, 8B 6/1/ :59 AM.
Presentation transcript:

9/21/ A sample class of Discrete Structures Gongjun Yan Computer Science Department, Old Dominion University, Norfolk, VA (Logical conjunction and logical implication)

9/21/ Review Proposition Proposition Declarative statement (no question, no imperative statement) Declarative statement (no question, no imperative statement) Either true or false but not both Either true or false but not both Examples Examples Which of the following are propositions? Which of the following are propositions? Today is Friday. Today is Friday. Everyone is happy. Everyone is happy. What time is it? What time is it? Game Time! Game Time! Game Time! Game Time!True! False!

9/21/ More Questions What are the values of propositions below? What are the values of propositions below? If a fly has no wings, it is called a walk. If a fly has no wings, it is called a walk. If olive oil comes from olives, then baby oil comes from babies. If olive oil comes from olives, then baby oil comes from babies. How does the if statement work in the java code below? How does the if statement work in the java code below? dScore = 93; dScore = 93; if ( (dScore 90) ) if ( (dScore 90) ) { print "You got an A." print "You got an A." }

9/21/ Today’s Content Logical conjunction (AND) Logical conjunction (AND) Logical implication (IF-Then) Logical implication (IF-Then) The truth table of AND and IF-THEN The truth table of AND and IF-THEN

9/21/ Logical conjunction: AND Is an operation on two propositions Is an operation on two propositions Produces a value of true if and only if both of its propositions are true Produces a value of true if and only if both of its propositions are true Keywords: &&, and, &. Keywords: &&, and, &. We often use p q We often use p q

9/21/ Truth Table Indicate the value of the logical expressions. Indicate the value of the logical expressions. The Truth table of p ∧ q The Truth table of p ∧ q if both p and q are true, then p ∧ q is true

9/21/ Example 1 Translate the underlined expression into logical expression. Translate the underlined expression into logical expression. dScore = 93; if ( (dScore 90) ) { print(“you got an A.”); } dScore = 93; if ( (dScore 90) ) { print(“you got an A.”); } Let p = (dScore <= 100); Let p = (dScore <= 100); q = (dScore > 90). q = (dScore > 90). p q p q

9/21/ Logical implication: IMPLIES Is a proposition “if p, then q”. Is a proposition “if p, then q”. Produces all true values except when p is true and q is false. Produces all true values except when p is true and q is false. Keywords: if-then, if, then, whenever, only if, etc. Keywords: if-then, if, then, whenever, only if, etc. We often use p q We often use p q The Truth table of p → q The Truth table of p → q All true except when p is true and q is false.

9/21/ Example Translate English into logical implication p → q: 2.1 Translate English into logical implication p → q: If olive oil comes from olives, then baby oil comes from babies. If olive oil comes from olives, then baby oil comes from babies. Answer: Let p = “Olive oil comes from olives.” Answer: Let p = “Olive oil comes from olives.” q = “Baby oil comes from babies.” q = “Baby oil comes from babies.” We write: p q. We write: p q.

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

9/21/ Quiz What are the values of propositions? What are the values of propositions? 1. Tom Cruise is an actor and he is handsome. 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. Answer: We write p ∧ q. p=true. p=true. In my wife’s opinion, q=true. In my wife’s opinion, q=true. By truth table, the answer is 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 Woods will not play golf.” 2. If Tiger Woods is studying discrete structures, then he will not play golf. p = “Tiger Woods is studying discrete structures.” q = “Tiger Woods will not play golf.” Answer: We write p → q. Answer: We write p → q. In my mind, p=false; In my mind, p=false; q=false. q=false. By truth table, the answer is true. By truth table, the answer is true.

9/21/ Summary Two definitions: Two definitions: logical conjunction p ∧ q logical conjunction p ∧ q Logical implication p → q Logical implication p → q Truth table of p ∧ q, p → q Truth table of p ∧ q, p → q Any questions? Any questions?

9/21/ More Information Course home page link Course home page link 381fall09/instructions/ 381fall09/instructions/ 381fall09/instructions/ 381fall09/instructions/ Homework: reading and playing! Homework: reading and playing! Translation between p ∧ q, p → q and English Link: course-home-page/if_then.html Translation between p ∧ q, p → q and English Link: course-home-page/if_then.htmlcourse-home-page/if_then.html Truth Tables Link: course-home-page/truth_table.html Truth Tables Link: course-home-page/truth_table.htmlcourse-home-page/truth_table.html Office hours: Monday 10:00-12:00am Wednesday 10:00-12:00am Office hours: Monday 10:00-12:00am Wednesday 10:00-12:00am