CSRU 1400 Discrete Structure: Logic

Slides:



Advertisements
Similar presentations
CISC 1400: Logic Fall 2011, X. Zhang, Fordham Univ. 1.
Advertisements

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
From Chapter 4 Formal Specification using Z David Lightfoot
Copyright © Cengage Learning. All rights reserved.
Adapted from Discrete Math
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.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
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.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
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.
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.
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.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
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.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Chapter 1 Propositional Logic
Logic The study of correct reasoning.
Logic.
Discrete Mathematical
2. The Logic of Compound Statements Summary
Propositional Logic.
Advanced Algorithms Analysis and Design
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Lesson Objectives Aims Be able to define problems using Boolean logic
Lecture 1 – Formal Logic.
Discrete Mathematics Logic of Compound Statements
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
COMP 1380 Discrete Structures I Thompson Rivers University
August 31, 2005.
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
MATH 245 Spring 2009 This is mathematics for computer science
COT 3100, Spr Applications of Discrete Structures
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
CMSC Discrete Structures
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
CSCI 3310 Mathematical Foundation of Computer Science
Propositional Calculus: Boolean Algebra and Simplification
Information Technology Department
Applications of Propositional Logic
CS201: Data Structures and Discrete Mathematics I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CS 220: Discrete Structures and their Applications
A Brief Summary for Exam 1
Applied Discrete Mathematics Week 1: Logic
CSE 311 Foundations of Computing I
Discrete Mathematics and Its Applications Kenneth H
MAT 3100 Introduction to Proof
Cs Discrete Mathematics
Predicates and Quantifiers
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
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
Logical and Rule-Based Reasoning Part I
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

CSRU 1400 Discrete Structure: Logic Ellen Zhang website:http://storm.cis.fordham.edu/~zhang/CSRU1400_spring2008/index.html

What we learned so far ? Set: gives an unambiguous answer about membership Set enumeration Set relationship: subset, proper subset, equality Set operations: cardinality, power set, union, intersection, difference, Cartisian product Focus has been on arithmetic type of quesitons

Complement set Universal set, U depending on the problems we consider, every set is a subset of the universal set U-A called complement of A, denoted as A’. U=N (the set of natural numbers), A: the set of all even numbers U-A is the set of all odd numbers. U A U

Properties of set operations Last class, we discovered many properties: 1. 2. 3. 4 iff. …

Some more properties For any sets X, Y, Z: Are they true ? Why ? 1. 2. 3. 4. 5. 6. Are they true ? Why ?

Laws of set operations Commutative law: Associative law: Distributive law:

More laws Identity laws Complement law De Morgan’s law

Set Algebra It also provides systematic procedures for evaluating expressions, and performing calculations, involving these operations and relations From a set of laws about set operations, one can prove the rest of laws (property). We will study proving & reasoning after we are more equipped …

Logic a science that deals with the principles and criteria of validity of inference and demonstration : the science of the formal principles of reasoning a branch or variety of logic <modal logic> <Boolean logic>

Classical Logic Aristotle’s syllogism "a discourse in which, certain things having been supposed, something different from the things supposed results of necessity because these things are so." Major premise: All humans are mortal. Minor premise: Socrates is human. Conclusion: Socrates is mortal

Formal logic As discussed in the book, it means strings of symbols written down using a prescribed set of symbols. Well formed formulae, such as “2+3=5”, or “2+3=78” Not not “+=3=“ Note: this term is used for different meanings in different literature.

Circuit logic Digital electronics: whether it’s MP3 player, digital camera, stores data as digits (numbers), in particular binary numbers. We use base 10 numbers in daily life: where every digits can be 0,1,2, … 9. In computers, and digital electronics, binary numbers are used: where each digit is either 0 or 1. Circuit logic takes input of {0,1} and generates output of {0,1}

Circuit logic: OR gate Truth table of OR operation (gate) a b a+b 1

Why formal logic ? The attorney for the defense argues: If my client is guilty, then the knife was in the drawer. Either the knife was not in the drawer or Jason Pritchard saw the knife. If the knife was not there on October 10, it follows that Jason Pritchard did not see the knife. Furthermore, if the knife was there on October 10, then the knife was in the drawer and also the hammer was in the barn. But we all know that the hammer was not in the barn. Therefore, ladies and gentlemen of the jury, my client is innocent.

Our subject of today: propositional logic Def. a proposition is a statement which can be either true or false The cat sat on the mat. All dogs like bones. We use a symbol, i.e., a lower case letter to represent a proposition Let p stands for “the cat sat on the mat”..

Compound Proposition Connect simple propositions using “and”, “or”, “not”, “only if”, “if and only if”, etc. Either the cat sat on the mat or all dogs like bones. “The cat sat on the mat” or “all dogs like bones”. Two possible meanings for “or”: At least one of the statement must be true. One and only one of the statement is true.

Connective symbols Natural language can be ambiguous “inclusive or” or “exclusive or” Different phrases mean the same thing Introduce special symbols We use to represent inclusive or Use to represent and Use to represent “not” Use to represent “if…, then…” User to represent “if and only if”

Negation It will not rain tomorrow. Let p stands for “it will rain tomorrow”. It’s not the true that it will rain tomorrow, It’s false that it will rain tomorrow. p T F

Disjunction Connective Either the cat sat on the mat or all dogs like bones. “The cat sat on the mat” (c) or “all dogs like bones” (d), denoted as Two possible meanings: inclusive or, exclusive or c d T F

Conjunction Connective Peter is tall and thin. “Peter is tall” (t) and “Peter is thin” (h) can be written as This statement is true if both t is true and h is true; otherwise it’s false. t h T F

Conditional Connective: implication If you don’t finish your peas, you cannot have dessert. If “you don’t finish your peas”, then “you cannot have dessert”. i.e., if p is true, then q must be true. We use to denote this compound statement. p q T F p only if q. i.e., p can be true only if q is true.

Other ways to express p implies q. p, therefore q. q follows p. “You don’t finish your peas” implies “you cannot have dessert”. p, therefore q. You don’t finish your peas, therefore you cannot have dessert. q follows p. “You cannot have dessert” follows from “you don’t finish your peas”. p if only q. It’s ok that you don’t finish you peas, if only you don’t have dessert.

The list goes on… If not q then not p if you have dessert, then you must have finish peas. If you want to have dessert, then you must have finish the peas. You can have dessert only if you finish your peas. Finish your peas is a necessary condition to have dessert.

Biconditional connective Take intersection operation as example: For any object x, if and only if and There are two parts to this statement: If , then , and If and , then So we write it as

Truth table for biconditional p q T F

Examples of compound propositions The hero is American and the movie is good. Although the villain is French, the movie is good. If the movie is good, then either the hero is American or the heroine is British. The hero is not American, but the villain is French. A British heroine is a necessary condition for the movie to be good.

Necessary condition A British heroine is a necessary condition for the movie to be good. b: “The heroine is a British”. m: “The movie is good” b has to be true for m to be true. If m is true, then b is true So the propositional form is Under what condition this statement is true/false ?

Necessary condition A British heroine is a necessary condition for the movie to be good. What does propositional form mean ? If the heroine is a British, then the movie is good. m has to be true if b to be true. Under what condition is true, false ?

Sufficient Condition, Necessary Condition Conditional connective: m is sufficient condition for b, meaning Whenever movie is good, the heroine is British. That is, it is impossible for the movie to be good, if the heroine is not British. Whenever the heroine is not British, the movie is not good. b is a necessary condition of m: b has to be true for m to be true Whenever b is false, m is false too. Whenever m is true, b is too

An Example World series Suppose a set of seven baseball games the team that wins four games wins the series. Suppose the Dodgers are playing the Angels in the World Series in the 5th game the Dodgers have won three games so far the Angels have won one game so far

For the Dodgers (Winning the 5th game) ____ (Winning the series) Winning the 5th game is a ______ condition for winning the series. If the Dodgers win the 5th game, they will win the world series. If the Dodgers didn’t win the series, then they didn’t win the 5th game.

For the Dodgers Winning the series is a _____ condition for winning the 5th game. Winning the series has to be true if winning the 5th game is true. It’s impossible that the Dodgers win the 5th game, but doesn’t win the series.

For the Angels (the Angels win the 5th game) ___ (the Angels win the world series) Winning the 5th game is a _____ condition of winning the series Winning the series is a ______ condition of winning the series

Biconditional connective p if and only if q, Equivalent to , and p is sufficient and necessary condition of q An example:

Some exercises Purchasing a lottery ticket is a ______ condition for winning the lottery. An equivalent way to express this ? You have to take the final exam in order to pass the CSRU1400 course. Taking the final exam is a ______ condition of passing CSRU1400. Passing CSRU1400 is a _______ condition of taking the CSRU1400 exam.

True or false ? 1. 2. 3.

Truth tables We have defined the connectives using truth tables Specifies the output for all possible combinations of the propositions’ value Like function tables t h T F

Combine multiple operations together A propositional form with multiple connectives p q T F

Another example Truth table: # of rows depends on # of simple propositions in the form Each simple proposition takes value from set {T,F} With n simple propositions, there are 2n different combinations of the variable values

An example For a form with 3 simple propositions p q r

Some exercises Draw truth tables for the following propositions: 1. 2. 3. 4.

Smullyan’s Island Puzzle You meet two inhabitants of Smullyan’s Island (where each one is either a liar or a truth-teller). A says, “Either B is lying or I am” B says, “A is lying” Who is telling the truth ?

Smullyan’s Island Puzzle You meet one inhabitant of Smullyan’s Island (where each inhabitant is either a liar or a truth-teller). He says, “I am lying.” Is he a truth-teller ?

Smullyan’s Island Puzzle You meet three inhabitants of Smullyan’s Island (where each one is either a liar or a truth-teller). A says, “Exactly one of us is telling the truth”. B says, “We are all lying.” C says, “The other two are lying.” Now who is a liar and who is a truth-teller ?

Summary Define connectives using truth table Write English sentences in propositional form And, but, although If …, then … p is sufficient condition of q p is necessary condition of q Write truth table for any propositional form Application: logic puzzle

Next class Laws of logic operations Tautology, equivalent proposition, and contradiction Review of homework 1