Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University.

Slides:



Advertisements
Similar presentations
Discrete Mathematics Lecture 1 Logic of Compound Statements
Advertisements

Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Chapter 1 The Logic of Compound Statements. Section 1.3 Valid & Invalid Arguments.
CS128 – Discrete Mathematics for Computer Science
Chapter 1 The Logic of Compound Statements. Section 1.2 – 1.3 (Modus Tollens) Conditional and Valid & Invalid Arguments.
Discrete Structures Chapter 1 Part A Fundamentals of Logic Nurul Amelina Nasharuddin Multimedia Department 1.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
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
Adapted from Discrete Math
Harper Langston New York University Summer 2015
1 Introduction to Abstract Mathematics The Logic of Compound Statements 2.1 and 2.2 Instructor: Hayk Melikya
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
Discrete Mathematics and Its Applications
COS 150 Discrete Structures Assoc. Prof. Svetla Boytcheva Fall semester 2014.
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.
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 6
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.
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.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Valid and Invalid Arguments
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
Chapter 1: The Foundations: Logic and Proofs
What is Reasoning  Logical reasoning is the process of drawing conclusions from premises using rules of inference.  These inference rules are results.
Week 1 - Wednesday.  Course overview  Propositional logic  Truth tables  AND, OR, NOT  Logical equivalence.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Symbolic Logic The Following slide were written using materials from the Book: The Following slide were written using materials from the Book: Discrete.
Copyright © Cengage Learning. All rights reserved.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
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.3 Implications. Vocabulary Words conditional operation ( ⇒ or →) conditional proposition conditional statement (implication statement) hypothesis.
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.
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.
Law of logic Lecture 4.
Chapter 1 Logic and proofs
Discrete Mathematics Lecture 2 Continuing Logic, Quantified Logic, Beginning Proofs Harper Langston New York University Summer 2016.
Harper Langston New York University Summer 2017
Discrete Mathematical
2. The Logic of Compound Statements Summary
Valid and Invalid Arguments
Propositional Logic.
Discrete Mathematics Lecture 1 Logic of Compound Statements
Discrete Mathematics 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
(CSC 102) Discrete Structures Lecture 2.
Copyright © Cengage Learning. All rights reserved.
Principles of Computing – UFCFA3-30-1
Proposition logic and argument CISC2100, Spring 2017 X.Zhang
CS100: Discrete structures
Information Technology Department
CS201: Data Structures and Discrete Mathematics I
Applied Discrete Mathematics Week 1: Logic
The Method of Deduction
Discrete Mathematics Logic.
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
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Presentation transcript:

Discrete Mathematics Lecture 1 Logic of Compound Statements Harper Langston New York University

Administration Class Web Site Mailing List Subscribe at Messages to: TA/Office Hours, etc

Logic of Statements Logical Form and Logical Equivalence Conditional Statements Valid and Invalid Arguments Digital Logic Circuits Number Systems & Circuits for Addition

Logical Form Initial terms in logic: sentence, true, false Statement (proposition) is a sentence that is true or false but not both Compound statement is a statement built out of simple statements using logical operations: negation, conjunction, disjunction

Logical Form Truth table Precedence of logical operations English words to logic: –It is not hot but it is sunny –It is neither hot nor sunny Statement form (propositional form) is an expression made up of statement variables and logical connectives (operators) Exclusive OR: XOR

Logical Form Truth table for (~p  q)  (q  ~r) Two statements are called logically equivalent if and only if (iff) they have identical truth tables Double negation Non-equivalence: ~(p  q) vs ~p  ~q De Morgan’s Laws: –The negation of and AND statement is logically equivalent to the OR statement in which component is negated –The negation of an OR statement is logically equivalent to the AND statement in which each component is negated

Logical Form Applying De-Morgan’s Laws: –Write negation for The bus was late or Tom’s watch was slow -1 < x <= 4 Tautology is a statement that is always true regardless of the truth values of the individual logical variables Contradiction is a statement that is always false regardless of the truth values of the individual logical variables

Logical Equivalence Commutative laws: p  q = q  p, p  q = q  p Associative laws: (p  q)  r = p  (q  r), (p  q)  r = p  (q  r) Distributive laws: p  (q  r) = (p  q)  (p  r) p  (q  r) = (p  q)  (p  r) Identity laws: p  t = p, p  c = p Negation laws: p  ~p = t, p  ~p = c Double negative law: ~(~p) = p Idempotent laws: p  p = p, p  p = p De Morgan’s laws: ~(p  q) = ~p  ~q, ~(p  q) = ~p  ~q Universal bound laws: p  t = t, p  c = c Absorption laws: p  (p  q) = p, p  (p  q) = p Negation of t and c: ~t = c, ~c = t

Conditional Statements If something, then something: p  q, p is called the hypothesis and q is called the conclusion The only combination of circumstances in which a conditional sentence is false is when the hypothesis is true and the conclusion is false A conditional statements is called vacuously true or true by default when its hypothesis is false Among , , ~ and  operations,  has the lowest priority

Conditional Statements Write truth table for: p  q  ~p Show that (p  q)  r = (p  r)  (q  r) Representation of  : p  q = ~p  q Re-write using if-else: Either you get in class on time, or you risk missing some material Negation of  : ~(p  q) = p  ~q Write negation for: If it is raining, then I cannot go to the beach

Conditional Statements Contrapositive p  q is another conditional statement ~q  ~p A conditional statement is equivalent to its contrapositive The converse of p  q is q  p The inverse of p  q is ~p  ~q Conditional statement and its converse are not equivalent Conditional statement and its inverse are not equivalent

Conditional Statements The converse and the inverse of a conditional statement are equivalent to each other p only if q means ~q  ~p, or p  q Biconditional of p and q means “p if and only if q” and is denoted as p  q r is a sufficient condition for s means “if r then s” r is a necessary condition for s means “if not r then not s”

Exercises Write contrapositive, converse and inverse statements for: –If P is a square, then P is a rectangle –If today is Thanksgiving, then tomorrow is Friday –If c is rational, then the decimal expansion of r is repeating –If n is prime, then n is odd or n is 2 –If x is nonnegative, then x is positive or x is 0 –If Tom is Ann’s father, then Jim is her uncle and Sue is her aunt –If n is divisible by 6, then n is divisible by 2 and n is divisible by 3

Arguments An argument is a sequence of statements. All statements except the final one are called premises (or assumptions or hypotheses). The final statement is called the conclusion. An argument is considered valid if from the truth of all premises, the conclusion must also be true. The conclusion is said to be inferred or deduced from the truth of the premises

Arguments Test to determine the validity of the argument: –Identify the premises and conclusion of the argument –Construct the truth table for all premises and the conclusion –Find critical rows in which all the premises are true –If the conclusion is true in all critical rows then the argument is valid, otherwise it is invalid Example of valid argument form: –Premises: p  (q  r) and ~r, conclusion: p  q Example of invalid argument form: –Premises: p  q  ~r and q  p  r, conclusion: p  r

Valid Argument-Forms Modus ponens (method of affirming): –Premises: p  q and p, conclusion: q Modus tollens (method of denying): –Premises: p  q and ~q, conclusion: ~p Disjunctive addition: –Premises: p, conclusion: p | q –Premises: q, conclusion: p | q Conjunctive simplification: –Premises: p & q, conclusion: p, q

Valid Argument-Forms Disjunctive Syllogism: –Premises: p | q and ~q, conclusion: p –Premises: p | q and ~p, conclusion: q Hypothetical Syllogism –Premises: p  q and q  r, conclusion: p  r Dilemma: proof by division into cases: –Premises: p | q and p  r and q  r, conclusion: r

Complex Deduction Premises: –If my glasses are on the kitchen table, then I saw them at breakfast –I was reading the newspaper in the living room or I was reading the newspaper in the kitchen –If I was reading the newspaper in the living room, then my glasses are on the coffee table –I did not see my glasses at breakfast –If I was reading my book in bed, then my glasses are on the bed table –If I was reading the newspaper in the kitchen, then my glasses are on the kitchen table Where are the glasses?

Fallacies A fallacy is an error in reasoning that results in an invalid argument Three common fallacies: –Vague or ambiguous premises –Begging the question (assuming what is to be proved) –Jumping to conclusions without adequate grounds Converse Error: –Premises: p  q and q, conclusion: p Inverse Error: –Premises: p  q and ~p, conclusion: ~q

Fallacies It is possible for a valid argument to have false conclusion and for an invalid argument to have a true conclusion: –Premises: if John Lennon was a rock star, then John Lennon had red hair, John Lennon was a rock star; Conclusion: John Lennon had red hair –Premises: If New York is a big city, then New York has tall buildings, New York has tall buildings; Conclusion: New York is a big city

Contradiction Contradiction rule: if one can show that the supposition that a statement p is false leads to a contradiction, then p is true. Knight is a person who always says truth, knave is a person who always lies: –A says: B is a knight –B says: A and I are of opposite types What are A and B?

Digital Logic Circuits Digital Logic Circuit is a basic electronic component of a digital system Values of digital signals are 0 or 1 (bits) Black Box is specified by the signal input/output table Three gates: NOT-gate, AND-gate, OR-gate Combinational circuit is a combination of logical gates Combinational circuit always correspond to some boolean expression, such that input/output table of a table and a truth table of the expression are identical

Number Systems Decimal number system Binary number system Conversion between decimal and binary numbers Binary addition and subtraction

Negative Numbers Two’s complement of a positive integer a relative to a fixed bit length n is the binary representation of 2^n – a To find an 8-bit complement: –Write 8-bit binary representation of the number –Flip all bits (one’s complement) –Add 1 to the obtained binary Addition of negative numbers

Hexadecimal Numbers Hexadecimal notation is a number system with base 16 Digits of hexadecimal number system Conversion between hexadecimal and binary and hexadecimal and decimal systems