Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:

Slides:



Advertisements
Similar presentations
Set Operations. When sets are equal A equals B iff for all x, x is in A iff x is in B or … and this is what we do to prove sets equal.
Advertisements

TRUTH TABLES Section 1.3.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
IB Math Studies – Topic 3. IB Course Guide Description.
Discrete Mathematics Lecture 4 Harper Langston New York University.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
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.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
Logic Truth Tables, Propositions, Implications. Statements Logic is the tool for reasoning about the truth or falsity of statements. –Propositional logic.
IB Math Studies – Topic 3. IB Course Guide Description.
Truth Tables for Negation, Conjunction, and Disjunction.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Intro to Discrete Structures
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.
Discrete Maths 2. Propositional Logic Objective
MATH 102 Contemporary Math S. Rook
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Chapter 7 Review Important Terms, Symbols, Concepts 7.1. Logic A proposition is a statement (not a question.
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
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.
CS201: Data Structures and Discrete Mathematics I
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.
Discrete Mathematics R. Johnsonbaugh
Chapter 7 Logic, Sets, and Counting
CompSci 102 Discrete Math for Computer Science
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.
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
6.1 Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the.
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.
Basic Principles (continuation) 1. A Quantitative Measure of Information As we already have realized, when a statistical experiment has n eqiuprobable.
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 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Chapter 2 With Question/Answer Animations. Section 2.1.
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Discrete Mathematics Set.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Mathematics for Computing Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Reasoning and Proof Chapter Use Inductive Reasoning Conjecture- an unproven statement based on an observation Inductive reasoning- finding a pattern.
Logic and Truth Tables Winter 2012 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
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.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Chapter 1 Logic and proofs
BOOLEAN INFORMATION RETRIEVAL 1Adrienn Skrop. Boolean Information Retrieval  The Boolean model of IR (BIR) is a classical IR model and, at the same time,
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
DISCRETE MATHEMATICS CHAPTER I.
CS 2210:0001 Discrete Structures Sets and Functions
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
Set Operations Section 2.2.
Information Technology Department
Discrete Mathematics R. Johnsonbaugh
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Presentation transcript:

Course Outline Book: Discrete Mathematics by K. P. Bogart Topics: Sets and statements Symbolic Logic Relations functions Mathematical Induction Counting Techniques Recurrence relations Trees Graphs Grades: First: 25% Second 25% Final 50% *Note: The outline is subject to change

Discrete Mathematics Is the one we use to analyze discrete processes that are carried out in a step-by-step fashion.

Algorithm A list of step by step instructions for carrying out a process

Chapter 1 Sets and Statements

Statements A declarative sentence can be true, false or ambiguous A statement is an unambiguous declarative sentence that is either true or false

Example 5 plus 7 is 12 5 plus 7 is 5 5 plus 7 is large Did you have coffee this morning?

Sets Set: an unambiguous description of a collection of objects EX: Set of outcomes for flipping a coin S={H,T} However, the list of outcomes might be: HTTTHHH…….

Sets Members of a set are called elements aA “a is an element of A” “a is a member of A” aA “a is not an element of A” EX: Set of +ve integers S={x |x>0} 3 S -5  S

Sets Universe of a statement is the set whose elements are discussed by the statement EX: x multiplied by x is +ve The universe could be: Set of +ve integers Set of –ve integers Set of all integers Flipping a coin -Universe: {H,T}

Sets Note: P, q, r, s are used to represent statements X, y, z, w are used to represent variables

Compound Statements Simple statements are represented by symbols EX: P: x is a positive integer Compound statements are represented by symbols+ logical connectives Logical Connectives: Conjunction AND. Symbol ^ Inclusive disjunction OR Symbol v Exclusive disjunction OR Symbol (+) Negation Symbol ¬ Implication Symbol 

Compound Statements Example: -I will take calculas1 and I will take physics class. Represented as: p ^ q I will have coffee or I will have tea Represented as: p v q Ali is at school or Ali is at home Represented as: p (+) q p: x is greater than 2 ¬p: x is not greater than 2 -George is at school and either Sue is at store or Sue is at home. P ^( q (+) r ) *Note the use of parentheses ( see example 4 page 7).

Truth sets The set of all values of x that make a symbolic statement p(x) true is called the truth set of the proposition p. (the set of all values in the universe that makes p true). The symbolic statements p(x) & q(x) are equivalent if they have the same truth sets.

Truth sets EX: Universe: The result of flipping 2 coins P: the result has one head q: the result has one tail P and q are equivalent since they have the same truth sets.

Fundamental Principle of Set Equality To show that the sets T and S are equal, we may show that each element in T is an element in S and vice versa. EX: Universe: 300 coin flips P: the result has 2 H’s q: the result has 298 T’s Show that p and q are equivalent.

Finite and infinite sets - Examples: A = {1, 2, 3, 4} B = {x | x is an integer, 1 < x < 4} D = {dog, cat, horse} Infinite sets Z = {integers} = {…, -3, -2, -1, 0, 1, 2, 3,…} Natural numbers N = {0, 1, 2, 3, …} S={x| x is a real number and 1 < x < 4} = [0, 4]

Section 1.2: Sets

Venn diagrams A Venn diagram provides a graphic view of sets and their operations: union, intersection, difference and complements can be identified

Set operations Given two sets X and Y the following are operations that can be performed on them: Union Intersection Complement Difference

Union The union of X and Y is defined as the set A  B = { x | x  A or x  B}

Intersection The intersection of X and Y is defined as the set: X  Y = { x | x  X and x  Y} Two sets X and Y are disjoint if X  Y =  X Y xy X Y X  Y = 

Complement The complement of a set Y contained in a universal set U is the set Yc = U – Y Y Yc U

Difference The difference of two sets X – Y = { x | x  X and x  Y} The difference is also called the relative complement of Y in X X Y X-y

Properties of set operations Theorem : Let U be a universal set, and A, B and C subsets of U. The following properties hold: a) Associativity: (A  B)  C = A  (B  C) (A  B)  C = A  (B C) b) Commutativity: A  B = B  A A  B = B  A

Properties of set operations (2) c) Distributive laws: A(BC) = (A  B) (A  C) A(BC) = (A  B) (A  C) d) Identity laws: AU=A A = A e) Complement laws: AAc = U AAc = 

Properties of set operations (3) f) Idempotent laws: AA = A AA = A g) Bound laws: AU = U A =  h) Absorption laws: A(AB) = A A(AB) = A

Properties of set operations (4) i) Involution law: (Ac)c = A j) 0/1 laws: c = U Uc =  k) De Morgan’s laws for sets: (AB)c = AcBc (AB)c = AcBc

Demorgan’s Laws for sets ~(A  B) = (~A)  (~B) -Proof: To be discussed in class ~(A  B) = (~A)  (~B) -Proof: exercise

Theorem Let p and q be statements and let P and Q be their truth sets, then: - P  Q is the truth set of p^q (proof discussed in class) P  Q is the truth set of pvq ~P is the truth set of ¬p

Example: Venn Diagrams Show that P (Q  R) = (P Q)  (P  R) Using Venn diagrams - See example 9 page 18

Subsets It is a relation between sets ( not operation) A set S is a subset of set T if each element in S is also an element in T. Examples: A = {3, 9}, B = {5, 9, 1, 3}, is A  B ? A = {3, 3, 3, 9}, B = {5, 9, 1, 3}, A = {1, 2, 3}, B = {2, 3, 4}, is A  B ? Equality: X = Y if X  Y and Y  X

Subsets using Venn diagrams The ellipse is a subset of the circle

Theorem Let R and S be two sets then: - R and S are subsets of R  S R  S is a subset of both R and S R  S = S if and only if R  S R  S=R if and only if R  S

Example Prove that R  (S T)  S  (R T)

The Empty Set The empty set  has no elements. Also called null set or void set. EX: P is the truth set of p: x>0 Q is the truth set of q: x<0 The truth set of p^q = P Q=  P and Q are disjoint sets

Section 1.3 Determining the Truth of Symbolic Statements

Truth tables Truth tables are used to determine truth or falsity of compound statements

Truth table of conjunction p ^ q is true only when both p and q are true. p q p ^ q T F

Truth table of disjunction p  q is false only when both p and q are false p q p v q T F

Exclusive disjunction p (+) q is true only when p is true and q is false, or p is false and q is true. Example: p = "John is programmer, q = “John is a lawyer" p (+) q = "Either John is a programmer or John is a lawyer" p q p (+) q T F

Negation Negation of p: in symbols ¬p ¬ p is false when p is true, ¬ p is true when p is false Example: p = "John is a programmer" ¬ p = "It is not true that John is a programmer" p ¬ p T F

Truth tables Examples: Truth table for : ¬pvq (pvq) ^ ¬(p^q)

Definition 2 statements are equivalent if their truth tables have the same final column

Exercise Use the truth tables to find out whether the following statements are equivalent: (p^q) v (p^r) P^(qvr)

Section 1.4 The Conditional Connectives

Conditional propositions and logical equivalence A conditional proposition is of the form “If p then q” In symbols: p  q Example: p = " John is a programmer" q = " Mary is a lawyer " p  q = “If John is a programmer then Mary is a lawyer"

Truth table of p  q p  q is true when both p and q are true or when p is false

P q is equivalent to ¬pvq Recall: 2 statements are equivalent if their truth tables have the same final column Exercise: Show that p q and ¬p v q are equivalent. Note: it is important to represent the implication() and the exclusive OR(+) using other connectives (^,V, ¬), why??

Example Rewrite without arrows: ¬r ( s v (r ^ t))

Example Consider flipping a coin 3 times p is the statement “ the first flip comes up heads” q is the statement “there are at least 2 heads” Find the truth sets of p, q, pq Answer: {TTT,TTH,THT,THH,HHH,HHT,HTH}

Section 1.5 Boolean Algebra: When we apply known laws about set operations to derive other ones algebraically, we say we are doing Boolean Algebra.

Example: ( not required) Use Boolean algebra to prove the unique inverse property. if x P=  and x  P = U then x= ~P x = x  U (identity law) = x (P  ~P) (inverse law) = (x P) (x  ~P) (distributive law) =   (x  ~P) (given property) = (P  ~P)  (x  ~P) (Inverse law) = (P x)  ~P (distributive law) = U  ~P (given property) = ~P (Identity law)

Boolean Algebra for statements A formula says that 2 truth sets are equal corresponds to a formula saying that 2 statements are equivalent ( so all set laws are translated directly into statement laws). The statements about a universe satisfy the following rules: a) Associativity: (p V q) V r = p v (q v r) (p ^ q) ^ r = p ^ (q^ r) b) Commutativity: p V q = q V p p ^ q = q ^ p

Boolean Algebra for Statements c) Distributive laws: p ^ (q v r) = (p ^ q) V (p ^ r) p V ( q ^ r) = (p V q) ^(p V r) d) Identity laws: p^1=p pV0 = p e) Complement laws: p V ¬p = 1 p ^ ¬p = 0 f) Idempotent laws: p V p = p p ^ p = p g) Bound laws: p V 1 = 1 p ^ 0 = 0 h) Absorption laws: p v ( p ^ q ) = p p ^ ( p v q) = p

i) Double negation law: ¬ ¬p = p j) De Morgan’s laws: ¬(p V q) = ¬ p ^ ¬ q ¬(p ^ q) = ¬ p V ¬q

Final Example Simplify: (¬ ¬r) V (s V (r ^ t)) Answer : r V s (¬ (r ^ s) V (r V s)) ^ (¬ (r V s) V (r ^ s)) Answer: (¬r ^ ¬s ) V (r ^ s)