Discrete Mathematics • Mathematical reasoning: think logically; know how to prove • Combinatorial analysis: know how to count • Discrete structures: represent object and their relationships • Algorithmic thinking: how to solve problems by a compute • Application and modeling: model application and solve relevant problems Chapter 1 Logic , Sets , and Functions 1.1 Logic – A proposition is a statement that is either true or false, but not both – example 1 & 2 – Logical operators (connectives) to form new proposition – P , PQ , PQ , PQ , PQ , PQ negation , conjunctions, disjunctions , exclusive or , implications , two-way Logic (cont.) – Truth table 修過A或B的學生才可以修C 湯或沙拉 the statement “If a player hits more than 60 homeruns, then a bonus of $10 million is awarded “ in a contract If today is Friday, then 2+3=5 If today is Friday, then 2+3=6 to search:(MEXICO UNIVERSITEIS) NEW; (NEW MEXICO A) UNIV 1.2 Propositional Equivalent – tautology: contradiction: (example 1) contingency: – logically equivalent: proposition that have the same truth values in all possible cases – pq Propositional Equivalent (cont.) – P Q if P Q is a tautology P is a tautology if P T • example 2 (PQ)PQ De Margan’s Laws • example 3 P Q P Q • example 4 P ( Q R ) ( P Q ) ( P R ) Propositional Equivalent(cont.) – Table 5 Logical Equivalence – example 5&6 • a truth table can be used to determine whether a compound proposition is a tautology, but only when a proposition has a small number of variables 1.3 Predication and Quantifiers – X > 3 is not a proposition let P(x) denote the statement X>3, P(4) and P(2) are propositions P(x)→predicate,refers to a property X can have Q(x, y) denote x=y+3, Q(1, 2) is a proposition Predication and Quantifiers (cont.) – quantifiers – xP(x): P(x) is true for all value of X in a partial domain – let P(x) denote X+1> X, the domain the set of real numbers, xP(x) is true – if the domain contains X1, X2,…, Xn xP(x) P(x1) P(x2) P(x3) … P(xn) Example 8 Predication and Quantifiers (cont.) – xP(x): P(x) is true for a value of X • Existential quantifier – let Q(x) denote X=X+1,xQ(x) is false – xP(x) P(x1) P(x2) … P(xn) Example 11 – xy( x+y=y+x ) x y( x+y=0 ) Predication and Quantifiers (cont.) Express“some student in this class has visited Mexico” – M(x): X has visited Mexico, domain of X: students in the class x M(x) Example “every student in this class has visited either Canada or Mexico” – C(x): X has visited Canada x ( C(x) M(x) ) Predication and Quantifiers (cont.) Example “All lions are fierce” P(x): X is a lion Q(x): X is fierce x ( P(x) Q(x) ) “Some lions do not drink coffee” R(x): X drinks coffee x ( P(x) R(x) ) x ( P(x) R(x) ) Predication and Quantifiers (cont.) Binding variables – a variable is bound if a quantifiers is used or a value is assigned ; otherwise, it is free – a proposition cannot contain free variable – Q(x,y): X+Y=0 yxQ(x,y) is false xyQ(x,y) is true if yxP(x,y) is true, then xyP(x,y) is true if xyP(x,y) is true, then yxP(x,y) is true Predication and Quantifiers (cont.) Negations “Every student in the class has taken a course in Calculus” x P(x) “Some student in the class has not taken a course in C” x P(x) xP(x) xP(x) xQ(x) x Q(x)