Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.

Slides:



Advertisements
Similar presentations
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Advertisements

John Rosson Thursday February 15, 2007 Survey of Mathematical Ideas Math 100 Chapter 3, Logic.
Chapter 1 The Logic of Compound Statements. Section 1.3 Valid & Invalid Arguments.
CS128 – Discrete Mathematics for Computer Science
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Introduction to Logic Logical Form: general rules
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Week 1 - Friday.  What did we talk about last time?  Tautologies  Contradictions  Laws of Boolean algebra  Implications  Inverses  Converses 
Logic Truth Tables, Propositions, Implications. Statements Logic is the tool for reasoning about the truth or falsity of statements. –Propositional logic.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Propositional Logic.
1.1 Sets and Logic Set – a collection of objects. Set brackets {} are used to enclose the elements of a set. Example: {1, 2, 5, 9} Elements – objects inside.
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
Chapter 3 Section 4 – Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
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.
The Foundations: Logic and Proofs
Discrete Maths 2. Propositional Logic Objective
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
Chapter 1: The Foundations: Logic and Proofs
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Review I Rosen , 3.1 Know your definitions!
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
(CSC 102) Lecture 3 Discrete Structures. Previous Lecture Summary Logical Equivalences. De Morgan’s laws. Tautologies and Contradictions. Laws of Logic.
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
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.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Reading: Chapter 4 (44-59) from the text book
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
Chapter 8 – Symbolic Logic Professor D’Ascoli. Symbolic Logic Because the appraisal of arguments is made difficult by the peculiarities of natural language,
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
LOGIC.
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
What is Reasoning  Logical reasoning is the process of drawing conclusions from premises using rules of inference.  These inference rules are results.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Module Code MA0003NI: Computing mathematics Lecture for Week Autumn.
Chapter 1 Logic and proofs
2. The Logic of Compound Statements Summary
Discrete Mathematics Lecture 1 Logic of Compound Statements
Discrete Mathematics Logic of Compound Statements
(CSC 102) Discrete Structures Lecture 2.
The Foundations: Logic and Proofs
Information Technology Department
CS201: Data Structures and Discrete Mathematics I
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Discrete Structures Prepositional Logic 2
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

Week 1 - Wednesday

 Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence

 You come to a fork in the road  Two men stand beneath a sign that reads:  Ask for the way, but waste not your breath  One road is freedom, the other is death  Just one of the pair will lead you aright  For one is a Knave, the other a Knight  What single yes or no question can you ask to determine which fork to take?

 What’s an expression that logically equivalent to ~(p  q) ?  What about logically equivalent to ~(p  q) ?  De Morgan’s Laws state:  ~(p  q)  ~p  ~q  ~(p  q)  ~p  ~q  Essentially, the negation flips an AND to an OR and vice versa

 You can construct all possible outputs using combinations of AND, OR, and NOT  But, sometimes it’s useful to introduce notation for common operations  This truth table is for p  q pq p  qp  q TTT TFF FTT FFT

 We use  to represent an if-then statement  Let p be “The moon is made of green cheese”  Let q be “The earth is made of rye bread”  Thus, p  q is how a logician would write:  If the moon is made of green cheese, then the earth is made of rye bread  Here, p is called the hypothesis and q is called the conclusion  What other combination of p and q is logically equivalent to p  q ?

 p  q is true when:  p is true and q is true  p is false  Why?  For the whole implication to be true, the conclusion must always be true when the hypothesis is true  If the hypothesis is false, it doesn’t matter what the conclusion is  “If I punch the tooth fairy in the face, I will be Emperor of the World”  What’s the negation of an implication?

 Given a conditional statement p  q, its contrapositive is ~q  ~p  Conditional: “If a murderer cuts off my head, then I will be dead.”  Contrapositive: “If I am not dead, then a murderer did not cut off my head.”  What’s the relationship between a conditional and its contrapositive?

 Given a conditional statement p  q:  Its converse is q  p  Its inverse is ~p  ~q  Consider the statement:  “If angry ham sandwiches explode, George Clooney will become immortal.”  What is its converse?  What is its inverse?  How are they related?

 Sometimes people say “if and only if”, as in:  “A number is prime if and only if it is divisible only by itself and 1.”  This can be written p iff q or p  q  This is called the biconditional and has this truth table:  What is the biconditional logically equivalent to? pq p  qp  q TTT TFF FTF FFT

 A tautology is something that is true no matter what  Examples: TT  p  ~p p  pp  p  The final column in a truth table for a tautology is all true values  The book sometimes writes a statement which is a tautology as a t

 A contradiction is something that is false no matter what  Examples: FF  p  ~p  ~(p  p)  The final column in a truth table for a contradiction is all false values  The book sometimes writes a statement which is a contradiction as a c

NameLawDual Commutative p  q  q  pp  q  q  pp  q  q  pp  q  q  p Associative (p  q)  r  p  (q  r)(p  q)  r  p  (q  r) Distributive p  (q  r)  (p  q)  (p  r)p  (q  r)  (p  q)  (p  r) Identity p  t  pp  c  p Negation p  ~p  tp  ~p  c Double Negative ~(~p)  p Idempotent p  p  pp  p  pp  p  pp  p  p Universal Bound p  t  tp  t  tp  c  c De Morgan’s ~(p  q)  ~p  ~q~(p  q)  ~p  ~q Absorption p  (p  q)  pp  (p  q)  p Negations of t and c ~t  c~t  c~c  t~c  t

 An argument is a list of statements (called premises) followed by a single statement (called a conclusion)  Whenever all of the premises are true, the conclusion must also be true, in order to make the argument valid

 Are the following arguments valid?  p  q  ~r(premise)  q  p  r(premise)   p  q(conclusion)  p  (q  r)(premise)  ~r(premise)   p  q(conclusion)

 Modus ponens is a valid argument of the following form: p  qp  q pp  q q  Modus tollens is a contrapositive reworking of the argument, which is also valid: p  qp  q ~q~q  ~p ~p  Give verbal examples of each  We call these short valid arguments rules of inference

 The following are also valid rules of inference: pp  p q p q qq  p q p q  English example: “If pigs can fly, then pigs can fly or swans can breakdance.”

 The following are also valid rules of inference:  p  q  p p  q q  English example: “If the beat is out of control and the bassline just won’t stop, then the beat is out of control.”

 The following is also a valid rule of inference: pp qq   p  q  English example: “If the beat is out of control and the bassline just won’t stop, then the beat is out of control and the bassline just won’t stop.”

 The following are also valid rules of inference:  p  q ~q~q  p p ~p~p  q q  English example: “If you’re playing it cool or I’m maxing and relaxing, and you’re not playing it cool, then I’m maxing and relaxing.”

 The following is also a valid rule of inference:  p  q q  rq  r   p  r  English example: “If you call my mom ugly I will call my brother, and if I call my brother he will beat you up, then if you call my mom ugly my brother will beat you up.”

 The following is also a valid rule of inference:  p  q  p  r q  rq  r  r r  English example: “If am fat or sassy, and being fat implies that I will give you trouble, and being sassy implies that I will give you trouble, then I will give you trouble.”

 The following is also a valid rule of inference:  ~p  c  p p  English example: “If my water is at absolute zero then the universe does not exist, thus my water must not be at absolute zero.”

 A fallacy is an argument that is not valid  It could mean that the conclusion is not true in only a single case in the truth table  But, if the conclusion is ever false whenever all the premises are true, the argument is a fallacy  Most arguments presented by politicians are fallacies for one reason or another

 Converse error  If Joe sings a sad song, then Joe will make it better.  Joes makes it better.  Conclusion: Joe sings a sad song. FALLACY  Inverse error  If you eat too much, you will get sick.  You are not eating too much.  Conclusion: You will not get sick. FALLACY

 Digital logic circuits are the foundation of all computer hardware  Circuits are built out of components called gates  A gate has one or more inputs and an output  Gates model Boolean operations  Usually, in digital logic, we use a 1 for true and a 0 for false

 The following gates have the same function as the logical operators with the same names:  NOT gate:  AND gate:  OR gate:

 Draw the digital logic circuit corresponding to: (p  ~q)  ~(p  r)  What’s the corresponding truth table?

 Predicate logic  Universal quantifier  Existential quantifier

 Read Chapter 3