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

Similar documents
DISCRETE MATH: LECTURE 3

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Math 3000 Section 003 Intro to Abstract Math Homework 2

Binary Adders: Half Adders and Full Adders

Logic in Computer Science: Logic Gates

Handout #1: Mathematical Reasoning

Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

6.080/6.089 GITCS Feb 12, Lecture 3

Beyond Propositional Logic Lukasiewicz s System

BOOLEAN ALGEBRA & LOGIC GATES

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Logic in general. Inference rules and theorem proving

Vocabulary. Term Page Definition Clarifying Example. biconditional statement. conclusion. conditional statement. conjecture.

Chapter 1. Use the following to answer questions 1-5: In the questions below determine whether the proposition is TRUE or FALSE

Gates, Circuits, and Boolean Algebra

Basic Logic Gates Richard E. Haskell

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

3. Mathematical Induction

Hypothetical Syllogisms 1

1.2 Forms and Validity

The Mathematics of GIS. Wolfgang Kainz

Reasoning and Proof Review Questions

Mathematical Induction

INTRODUCTORY SET THEORY

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

DEDUCTIVE & INDUCTIVE REASONING

Understanding Logic Design

PHILOSOPHY 101: CRITICAL THINKING

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Boolean Algebra Part 1

Lecture 8: Synchronous Digital Systems

p: I am elected q: I will lower the taxes

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Switching Algebra and Logic Gates

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

CS510 Software Engineering

Answer Key for California State Standards: Algebra I

COMBINATIONAL CIRCUITS

A Few Basics of Probability

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Boolean Design of Patterns

Computer Science 281 Binary and Hexadecimal Review

Lecture #21 April 2, 2004 Relays and Adder/Subtractors

Examination paper for MA0301 Elementær diskret matematikk

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Lecture 9 Maher on Inductive Probability

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

8 Primes and Modular Arithmetic

Lecture 2. Binary and Hexadecimal Numbers

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

The string of digits in the binary number system represents the quantity

CSI 333 Lecture 1 Number Systems

Show all work for credit. Attach paper as needed to keep work neat & organized.

Chapter 1: Digital Systems and Binary Numbers

Two's Complement Adder/Subtractor Lab L03

Lecture 1: Course overview, circuits, and formulas

Counters and Decoders

Midterm Practice Problems

So let us begin our quest to find the holy grail of real analysis.

CHAPTER 7 GENERAL PROOF SYSTEMS

Basic Proof Techniques

Predicate Logic. For example, consider the following argument:

Lecture 16 : Relations and Functions DRAFT

Conjunction is true when both parts of the statement are true. (p is true, q is true. p^q is true)

3.Basic Gate Combinations

Mathematics Review for MS Finance Students

Circuits and Boolean Expressions

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Math Circle Beginners Group October 18, 2015

Binary Numbers. Binary Octal Hexadecimal

Cartesian Products and Relations

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Continued Fractions and the Euclidean Algorithm

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

BINARY CODED DECIMAL: B.C.D.

Solutions for Practice problems on proofs

Properties of Real Numbers

Bits Superposition Quantum Parallelism

Introduction to Logic: Argumentation and Interpretation. Vysoká škola mezinárodních a veřejných vztahů PhDr. Peter Jan Kosmály, Ph.D

Systems I: Computer Organization and Architecture

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Mathematical Induction. Lecture 10-11

Transcription:

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

Administration Class Web Site http://cs.nyu.edu/courses/summer05/g22.2340-001/ Mailing List Subscribe at http://cs.nyu.edu/mailman/listinfo/g22_2340_001_su05 Messages to: G22_2340_001_su05@cs.nyu.edu 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

Digital Logic Circuits A recognizer is a circuit that outputs 1 for exactly one particular combination of input signals and outputs 0 s for all other combinations Multiple-input AND and OR gates Finding a circuit that corresponds to a given input/output table: Construct equivalent boolean expression using disjunctive normal form: for all outputs of 1 construct a conjunctive form based on the truth table row. All conjunctive forms are united using disjunction Construct a digital logic circuit equivalent to the boolean expression

Digital Logic Circuits Design a circuit for the following output: (0, 0, 1, 1, 0, 0, 1, 0) Two digital logic circuits are equivalent iff their input/output tables are identical Simplification of circuits Scheffer stroke (NAND) Peirce arrow (NOR)

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

Digital Circuits for Addition Half Adder addition of two bits Full Adder addition of two bits and a carry Parallel Adder addition of multi-bit numbers

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