Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.

Slides:



Advertisements
Similar presentations
Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
Advertisements

Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.
Sets 1.
Sets 1.
Discrete Mathematics Math 6A Instructor: M. Welling.
Adapted from Discrete Math
Methods of Proof & Proof Strategies
Discrete Mathematics Goals of a Discrete Mathematics Learn how to think mathematically 1. Mathematical Reasoning Foundation for discussions of methods.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Discrete Mathematics and Its Applications
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
1 Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Review I Rosen , 3.1 Know your definitions!
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
DISCRETE COMPUTATIONAL STRUCTURES
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.
January 30, 2002Applied Discrete Mathematics Week 1: Logic and Sets 1 Let’s Talk About Logic Logic is a system based on propositions.Logic is a system.
CompSci 102 Discrete Math for Computer Science
Chapter 2 With Question/Answer Animations. Section 2.1.
Discrete Mathematics CS 2610 January 27, part 2.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
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.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Chapter 1 Logic and proofs
DISCRETE COMPUTATIONAL STRUCTURES CSE 2353 Fall 2010 Most slides modified from Discrete Mathematical Structures: Theory and Applications by D.S. Malik.
Discrete Mathematics Margaret H. Dunham
2. The Logic of Compound Statements Summary
Discrete Mathematical The Set Theory
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
CSE15 Discrete Mathematics 01/23/17
Discrete Mathematics Lecture 1 Logic of Compound Statements
CSNB 143 Discrete Mathematical Structures
Discrete Mathematics Logic of Compound Statements
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
6/20/2018 Arab Open University Faculty of Computer Studies M131 - Discrete Mathematics 6/20/2018.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Propositional Equivalences
CS100: Discrete structures
Information Technology Department
Propositional Logic Defining Propositional Logic
CHAPTER 1: LOGICS AND PROOF
Methods of Proof. Methods of Proof Definitions A theorem is a valid logical assertion which can be proved using Axioms: statements which are given.
A Brief Summary for Exam 1
Inference Rules: Tautologies
Discrete Mathematics CS 2610
Discrete Mathematics and Its Applications Kenneth H
Lecture 2: Propositional Equivalences
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Cs Discrete Mathematics
Foundations of Discrete Mathematics
Discrete Structures Prepositional Logic 2
The Foundations: Logic and Proofs
Presentation transcript:

Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements to demonstrate the truth of an assertion premises are assumed to be true conclusion, the last statement of the sequence, is taken to be true based on the truth of the others statements. An argument is valid if the conclusion follows logically from the truth of the premises. Logic is the foundation for expressing formal proofs in all branches of mathematics.

Propositional Logic A proposition is Propositional Logic is the logic of compound statements built from simpler statements using Logical Boolean connectives. The truth value of a proposition is true, denoted by T, if it is true, and false, denoted by F it is false A proposition is a declarative sentence that is either TRUE or FALSE (not both).

Logical Operators Exclusive Or – XOR Implication Compound propositions : built up from simpler propositions using logical operators Negation -- NOT Conjunction -- AND Disjunction –- OR Exclusive Or – XOR Implication

Implication Some terminology, for an implication p  q t Its converse is: q  p. Its inverse is: ¬ p  ¬ q. Its contrapositive is: ¬q  ¬ p t

Biconditional Biconditional operator (): Partly similar to the English usage of “If and only if. The biconditional p  q is true when q and p have the same truth values and false otherwise.

Operator Precedence By convention… Logical Operator Precedence  1  2  3  4  5

Logic and Bit Operations A bit is a binary digit: 0 or 1. Bits are usually used to represent truth values. By convention: 0 represents “false”; 1 represents “true”. Bit operations correspond to logical operators, replacing false by 0 and true by 1 A Bit String is an ordered sequence of bits.

Propositional Equivalences A tautology is a proposition that is always true. Ex.: p  Ø p A contradiction is a proposition that is always false. Ex.: p  Ø p A contingency is a proposition that is neither a tautology nor a contradiction. Ex.: p  ¬p F T p  Ø p Ø p p F T p  Ø p Ø p p F T p  Ø p Ø p p

Logical Equivalence If p and q are propositions, then p is logically equivalent to q if their truth tables are the same. “p is equivalent to q.” is denoted by p  q p, q are logically equivalent if their biconditional p  q is a tautology.

Logical Equivalences p  T  p Identity p  F  p Domination p  T  T p  F  F Idempotent p  p  p p  p  p Double negation (p)  p

Logical Equivalences Commutative: p  q  q  p p  q  q  p Associative: (p  q )  r  p  ( q  r ) (p  q )  r  p  ( q  r )

Logical Equivalences p  (q  r )  (p  q )  (p  r ) Distributive: p  (q  r )  (p  q )  (p  r ) p  (q  r )  (p  q )  (p  r ) De Morgan’s: (p  q )  p  q (De Morgan’s I) (p  q )  p  q (De Morgan’s II)

DeMorgan’s Identities DeMorgan’s can be extended for simplification of negations of complex expressions Conjunctional negation: (p1  p2  …  pn)  (p1  p2  …  pn) Disjunctional negation: (p1p2…pn)  (p1p2…pn)

Logical Equivalences p  p  T p  (p  q )  p p  (p  q )  p Absorption: p  (p  q )  p p  (p  q )  p Negation: p  p  F p  p  T A useful LE involving : p  q  p  q

Fallacies  It is Sunday afternoon Mistakes in proof by applying contingencies instead of tautologies are fallacies. Affirming the conclusion (Common Mistake) If it is Sunday afternoon, then I go to the movies I go to the movies  It is Sunday afternoon It’s Saturday Night!!

Fallacies  The animal is not a bird Denying the hypothesis If an animal flies then the animal is a bird The animal does not fly  The animal is not a bird It’s a penguin!!

Predicate Logic A predicate P, or propositional function, is a function that maps objects in the universe of discourse to propositions Predicates can be quantified using the universal quantifier (“for all”)  or the existential quantifier (“there exists”)  Quantified predicates can be negated as follows x P(x)  x P(x) x P(x)  x P(x) Quantified variables are called “bound” Variables that are not quantified are called “free”

Inference Rules for Quantified Statements Universal Instantiation (for an arbitrary object c from UoD) x P(x)  P(c) Universal Generalization (for any arbitrary element c from UoD) P(c)___  x P(x) x P(x)  P(c) Existential Instantiation (for some specific object c from UoD) P(c)__  x P(x) Existential Generalization (for some object c from UoD)

Proofs A theorem is a statement that can be proved to be true. A proof is a sequence of statements that form an argument.

Vacuous & Trivial Proofs p  q is  vacuously true  if p is false In this case, p  q is a vacuous proof p  q   is trivially true if q is true In this case, we have a trivial proof

Proofs Indirect Proof: To prove p  q, we prove its contrapositive,  q   p Indirect Proof: To prove p, we assume  p and derive a contradiction. Based on the tautology (  p  F )  p “if the negation of p implies a contradiction then p must be true” (aka: Reductio ad Absurdum)

More Proofs Equivalence: To prove p  q, we prove p  q and q  p Cases: To prove p1 v p2 v … v pn  q, we prove (p1  q)  (p2  q)  …  (pn  q) Quantifiers: x P(x) : provide a proof, or counterexample. x P(x): Existence Constructive Proof: Find an a in the UoD such that P(a) holds. Existence Non-Constructive Proof: Prove that x P(x) is true without finding an a in the UoD such that P(a) holds

Sets A set is an unordered collection of objects. The empty set, or the set containing no elements.  = {} Note:   {} Singleton is a set S that contains exactly one element Universal Set is the set containing all the objects under consideration. { x | P (x) }: x such that P(x) where x belongs to a universal set U x  S means “x is an element of set S.” x  S means “x is not an element of set S

Sets Subset: A  B means “A is a subset of B” x ((x  A)  (x  B)) A subset A of B is said to be a proper subset if A is not equal to B. Denoted A  B. x ((x  A)  (x  B))  x ((x  B)  (x  A)) A = B iff, x ((x  A)  (x  B)). The cardinality of a set is the number of distinct elements in the set. |S | denotes the cardinality of S. A set S is said to be finite if its cardinality is a nonnegative integer. Otherwise, S is said to be infinite.

Sets The power set of S is the set of all subsets of S. P(S) = { x | x  S } Fact: if S is finite, |P(S)| = 2|S|.

n-Tuples An ordered n-tuple, n  Z+, is an ordered list (a1, a2, …, an). Order and length matters: (1, 2)  (2, 1)  (2, 1, 1).

Operators The Cartesian Product of two sets A and B is: A x B = { (a, b) | a  A  b  B} The union of two sets A and B is: A  B = { x | x  A v x  B } |AB| = |A| + |B| - |A  B| The intersection of two sets A and B is: A  B = { x | x  A  x  B} The complement of a set A is: A = { x | x  A} The set difference, A - B, is: A - B = { x | x  A  x  B }

Symmetric Difference The symmetric difference, A  B, is: A  B = { x | (x  A  x  B) v (x  B  x  A)} (i.e., x is in one or the other, but not in both)

Set Identities Identity: A   = A , A  U = A Domination: A  U = U , A   =  Idempotent: A  A = A = A  A Double complement: Commutative: A  B = B  A , A  B = B  A Associative: A  (B  C) = (A  B)  C , A  (B  C) = (A  B)  C A = ) (

Set Identities Absorption: A  (A  B) = A A  (A  B) = A Complement: A  A¯ = U , A  A¯ =  Distributive: A  (B  C) = (A  B)  (A  C) , A  (B  C) = (A  B)  (A  C)

De Morgan’s Rules De Morgan’s I DeMorgan’s II (A U B) = A  B (A  B) = A U B

Proving Set Identities How would we prove set identities of the form S1 = S2 where the S1 and S2 are sets? Prove S1  S2 and S2  S1 separately. Use previously proven set identities. Use logical equivalences to prove equivalent set definitions. Use a membership table. 1 : means x is in the Set 0 : means x is not in the Set

Sets as Bit-Strings For a finite universal set U = {a1, a2, …,an} Assign an arbitrary order to the elements of U. Represent a subset A of U as a string of n bits, B = b1b2…bn Example: U = {a1, a2, …, a5}, A = {a1, a3, a4 } B = 10110