Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Similar documents
Packet #1: Logic & Proofs. Applied Discrete Mathematics

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Discrete Mathematical Structures: Theory and Applications

Logic, Sets, and Proofs

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Intro to Logic and Proofs

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

1 The Foundation: Logic and Proofs

1 The Foundation: Logic and Proofs

Logic and Proof. Aiichiro Nakano

Logic Overview, I. and T T T T F F F T F F F F

2. Use quantifiers to express the associative law for multiplication of real numbers.

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

software design & management Gachon University Chulyun Kim

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Logic and Proofs. (A brief summary)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

A. Propositional Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

With Question/Answer Animations. Chapter 2

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

First order Logic ( Predicate Logic) and Methods of Proof

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Introduction to Sets and Logic (MATH 1190)

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Math 3336: Discrete Mathematics Practice Problems for Exam I

MAT 243 Test 1 SOLUTIONS, FORM A

DISCRETE MATH: FINAL REVIEW

Predicate Logic. Andreas Klappenecker

Compound Propositions

CSC 125 :: Final Exam May 3 & 5, 2010

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

CSE 20. Final Review. CSE 20: Final Review

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Chapter 1 Elementary Logic

Propositional Logic. Spring Propositional Logic Spring / 32

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Discrete Mathematics. (c) Marcin Sydow. Sets. Set operations. Sets. Set identities Number sets. Pair. Power Set. Venn diagrams

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Part I: Propositional Calculus

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

MTH 299 In Class and Recitation Problems SUMMER 2016

Topics in Logic and Proofs

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA

PROPOSITIONAL CALCULUS

Proofs. Chapter 2 P P Q Q

Logic and Proofs. (A brief summary)

Chapter 1 : The language of mathematics.

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

ICS141: Discrete Mathematics for Computer Science I

Chapter 2: The Logic of Quantified Statements

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

CSC Discrete Math I, Spring Propositional Logic

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Chapter 4, Logic using Propositional Calculus Handout

2.2: Logical Equivalence: The Laws of Logic

1.1 Statements and Compound Statements

Do not start until you are given the green signal

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY MA DISCRETE MATHEMATICS

Readings: Conjecture. Theorem. Rosen Section 1.5

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Automata Theory and Formal Grammars: Lecture 1

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Proofs. Chapter 2 P P Q Q

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Announcements. Exam 1 Review

EECS 1028 M: Discrete Mathematics for Engineers

Math 10850, fall 2017, University of Notre Dame

1.1 Language and Logic

1.1 Language and Logic

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

A set is an unordered collection of objects.

Section 1.1 Propositions

It rains now. (true) The followings are not propositions.

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Mat 243 Exam 1 Review

Recall that the expression x > 3 is not a proposition. Why?

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Discrete Mathematics for M.Sc.CS

Basic properties of the Integers

COMP 2600: Formal Methods for Software Engineeing

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Transcription:

CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Packet #2: Set Theory & Predicate Calculus Applied Discrete Mathematics Table of Contents Full Adder Information Page 1 Predicate Calculus Information Pages 2-9 First Hour Exam Study Sheet Page 10 Some First Hour Exam review material Pages 11-16 Set Theory Information Pages 17-26 Arithmetic Proofs Information Page 27

CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Design of Full Adder A full binary adder has 3 inputs and 2 outputs 1. bit A (X) 2. bit B (Y) 3. carry in (C) 1. bit out (S) 2. carry to next digit (C out ) Start by making truth table assuming all inputs and specifying all outputs. Inputs Outputs X Y C S C out 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 then write "and" condition for all "1" outputs then "or" all "and" conditions. S = X'Y'C + X'YC' + XY'C' + XYC C out = X'YC + XY'C + XYC' + XYC then simplify. 1

Predicate Calculus Outline I. Predicates - binding of variables to form propositions. II. General Quantifiers A. - Universal - means "for all" B. - Existential - means "there exists" C. Combinations of two variables using quantifiers D. Distribution of negation using De Morgan's rules III. Compound propositions of a single variable and proving set theory problems (next topic that will be covered) 2

Predicate - function which becomes a proposition when the variables are assigned values from an appropriate Universe of Discourse (U). QUANTIFIERS P(x): x 2 > x (not a proposition) But these are: - For all x in R, x 2 > x - For some x in R, x 2 > x - There exists x in R for which x 2 > x Predicates 1. P(x): x 2 > x P(x) is not a proposition Choose value for x from R. P(5): 5 2 > 5 pin variable at 5 P(5) is a proposition 2. P(x): x x = x P(x) is not a proposition Choose value for x from P({0,1}). P(0): 0 0 = 0 pin variable at 0 P(0) is a proposition 3. Q(x,y): (x < y) (x 2 < y 2 ) Q(x,y) is not a proposition Choose x,y from R. Q(-3,2): (-3 < 2) ((-3) 2 < 2 2 ) Q(-3,2) is a proposition From predicates (P(x), Q(x)) one can form compound predicates: P(x) (P(x) Q(x)) (P(x) Q(x)) (P(x) Q(x)) (P(x) Q(x)) x P(x) x Q(x) Example: [ x (P(x) Q(x)) ( x P(x) x Q(x))] 3

Propositional Logic Equivalences and Implications Still Hold Example: ( x P(x) x Q(x)) ( ( x P(x)) x Q(x)) (implication equivalence) Example: x (P(x) Q(x)) x P(x) x Q(x) (modus ponens implication) Also Have New Relationships: De Morgan's Rules in Predicate Calculus ( x P(x)) x ( P(x)) ( x P(x)) P(x) P(x) x ( P(x)) 1 at least one 1 (at least 1 P(x) false one true) 0 all P(x) true 1 (all false) 0 ( x P(x)) x ( P(x)) P(x) ( x P(x)) x ( P(x)) P(x) all false 1 1 1 (all true) at least 0 1 0 (at least one true one false) 4

Predicate Calculus Truth Table Example 1: x P(x) x Q(x) x [P(x) Q(x)] We have two propositions on the left side which form the compound proposition [ x P(x) x Q(x)]. We must consider all combinations of the truth values: x P(x) x Q(x) x P(x) x Q(x) x [P(x) Q(x)] 0 0 0 Row 1 0 1 0 Row 2 1 0 0 Row 3 1 1 1 Row 4 Row 1: x P(x) = 0 P(x) has at least one 0 (false for some value of x) x Q(x) = 0 Q(x) has at least one 0 Therefore, P(x) Q(x) has at least one 0 Therefore, x(p(x) Q(x)) = 0 Row 2: x P(x) = 0 P(x) has at least one 0 x Q(x) = 1 Q(x) = 1 for all x P(x) Q(x) = 0 since P(x) = 0 for some x Therefore, x(p(x) Q(x)) = 0 Row 3: x P(x) = 1 x Q(x) = 0 Work same way and show Case 3 = 0 Row 4: x P(x) = 1 x Q(x) = 1 Work same way and show Case 4 = 1 x P(x) x Q(x) x [P(x) Q(x)] is the same on both sides of the truth table and therefore the statement is true. 5

Predicate Calculus Conversion Example: We can prove that: x P(x) x Q(x) x [P(x) Q(x)] from our previous statement without using truth tables: Start: x P(x) x Q(x) x [P(x) Q(x)] negate both sides [ x P(x) x Q(x)] [ x [P(x) Q(x)]] x [ P(x)] x [ Q(x)] x [ P(x) Q(x)] substitute P(x) = A(x) Q(x) = B(x) x [A(x)] x [B(x)] x [A(x) B(x)] Predicate Calculus Truth Table Example 2: Is x P(x) x Q(x) x [P(x) Q(x)] true? x P(x) x Q(x) x P(x) x Q(x) x [P(x) Q(x)] 0 0 0 Row 1: Can be true for 0 1 1 some P(x) Q(x) and 1 0 1 therefore not logically 1 1 1 equivalent. (See example below.) Row 1: x P(x) = 0 P(x) has at least one 0 x Q(x) = 0 Q(x) has at least one 0 Does P(x) Q(x) always have at least one "0" for any P(x) and Q(x)? x P(x) x Q(x) P(x) Q(x) P(x) Q(x) x [P(x) Q(x)] 0 0 0 1 1 1 0 0 1 0 1 1 6

Predicate Calculus Truth Table Example 3 (Independent Variables): x P(x) y Q(y) x y [P(x) Q(y)] We have two propositions on the left side which form the compound proposition x y [P(x) Q(y)].We must consider all combinations of the truth values: x P(x) y Q(y) x P(x) y Q(y) x y [P(x) Q(y)] 0 0 0 Row 1 0 1 1 Row 2 1 0 1 Row 3 1 1 1 Row 4 Row 1: y Q(y) = 0 Q(y)=0 for all y values Therefore, sub in Q(y)=0 to get x y [P(x) 0 ] = x y P(x) = x P(x) Therefore, since x P(x) is false, then x y [P(x) Q(y)] = 0 Row 2: y Q(y) = 1 Q(c)=1 for some c Therefore, sub in Q(y)=1 to get x y [P(x) 1 ] = x y 1 = 1 Therefore, x y [P(x) Q(y)] = 1 Row 1: y Q(y) = 0 Q(y)=0 for all y values Therefore, sub in Q(y)=0 to get x y [P(x) 0 ] = x y P(x) = x P(x) Therefore, since x P(x) is true, then x y [P(x) Q(y)] = 1 Row 2: y Q(y) = 1 Q(c)=1 for some c Therefore, sub in Q(y)=1 to get x y [P(x) 1 ] = x y 1 = 1 Therefore, x y [P(x) Q(y)] = 1 x P(x) y Q(y) x y [P(x) Q(y)] is the same on both sides of the truth table and therefore the statement is true. In this case, the variables in each predicate are independent, so the order of the quantifiers DOES NOT MATTER. 7

Example: Definition of Continuity A function of f is continuous on the real numbers if and only if ε [(ε > 0) δ ((δ > 0) x y [ x - y < δ f(x) - f(y) < ε])] Universe of Discourse = R One can negate an expression. For example, consider the expression x [P(x) y Q(y)], negating gives the following: x [P(x) y Q(y)] x [P(x) y Q(y)] x [ P(x) y Q(y)] x [P(x) ( y Q(y))] x [P(x) y (Q(y))] **Recommended: Negate the definition of continuity: i.e., f is not continuous on R 8

Given the following predicates, evaluate the propositions generated by using the indicated quantifiers with those predicates. P(x,y) x R, y R P(x,y) x {0,1}, y {0,1} Quantifiers x 2 + y = y 2 + 2x x y x y = y x 0 (x = 1 and y = 2 is false) 0 (x = 1 and y = 0 is false) x y = y x 1 (x = 0 and y = 0 is true) 1 (x = 0 and y = 0 is true) x y 0: (2x - x 2 ) < 1, for x = 1 is imag 4 1: y = 1 See ** below. y x 0 1: y = 1 y x 1: y - y 2 < 1, is real for all y 1: x = 0 See * below. x y 0 1: x = 0 *: y x Case: x 2 + y = y 2 + 2x **: x y Case: x 2 + y = y 2 + 2x x 2-2x - (y 2 - y) = 0 y 2 - y - (x 2-2x) = 0 x = 2 ± 4 + 4(y2 - y) 2 y = 1 ± 1 + 4(x2-2x) 2 (4 + 4(y 2 - y)) > 0 (1 + 4(x 2-2x)) > 0 4(y 2 - y) > -4 4(x 2-2x) > -1 y 2 - y > -1 x 2-2x > - 1 4 y - y 2 < 1 2x - x 2 < 1 4 is true for all values is false when x = 1 of y 9

First Hour Exam Study Sheet I. Truth tables Be able to prove a logical equivalence or implication with a truth table. II. III. General knowledge Be familiar with: DeMorgan's laws that relate to, modus ponens, modus tollens, contrapositive, implication laws relating to and, transitivity laws, constructive and destructive dilemmas for combining multiple implications, etc. Understand a direct proof as well as an indirect proof such as proof by contradiction IV. Be able to follow and give reasons for each step in a propositional calculus proof V. Be able to test if a proposition is true by use of a truth table and give formal proof if true or counter example if false VI. Be able to prove a proposition by contradiction VII. Logic circuits A. Be able to produce logic statements from a logic circuit B. Be able to change the form of the logic statement by use of logical equivalences C. Be able to produce a logic circuit from the logic statement D. Know the symbols for and's, or's, nand's, nor's, etc. VIII. Predicate Calculus A. Know quantifiers, FOR ALL and THERE EXISTS B. Be able to apply DeMorgan s and other logical equivalence rules to predicate calculus statements C. Be able to prove logical impications and logical equivalences in predicate calculus using truth tables D. Be able to write predicate calculus statements in English and convert English statements to predicate calculus. 10

Some First Hour Exam Review Material These proofs are intended as extra practice problems for the first hour exam. They do not have to be turned in and will not be collected. However, they are recommended, since the same types of problems will be encountered on the exam. A solution for each problem is attached. Reminder: There are a variety of solutions for each problem, so your solution may or may not match the solution given. Do a direct and indirect proof for each. 1. Given: p (q r) Prove: s r (p s) q 2. Given: p q Prove: t ( p r) r s (q s) t 3. Given: p (q r) Prove: p (r s) q s 11

Solutions 1. Direct Proof: Statement 1. p (q r) Given 2. (p s) Given Reason 3. q Given 4. p s 2; Implication (rule 10a) 5. s p 4; Contrapositive (rule 9) 6. s (q r) 1,5; Hypothetical Syllogism (rule 24) 7. s ( q r) 6; Implication (rule 10a) 8. ( s ( q r)) 7; Implication (rule 10a) 9. (( s r) q) 8; Associate (rule 3a) 10. ( s r) 3,9; Disjunctive Syllogism (rule 21) 11. s r 10; Implication (rule 10a) Indirect Proof: Statement 1. p (q r) Given 2. (p s) Given Reason 3. q Given 4. (s r) Negation of Conclusion 5. (s r) 4; Implication (rule 10b) 6. p s 2; Implication (rule 10a) 7. s p 6; Contrapositive (rule 9) 8. s 5; Simplification (rule 17) 9. p 7,8; Modus Ponens (rule 19) 10. q r 1,9; Modus Ponens (rule 19) 11. r 5; Simplification (rule 17) 12. q 10,11; Modus Tollens (rule 20) 13. ( q q) 3,12; Conjunction (rule 34) 14. Contradiction 13; Rule 7b 12

2. Direct Proof: Statement Reason 1. p q Given 2. r s Given 3. (q s) t Given 4. (p r) (q s) 1,2; Constructive Dilemmas (rule 26a) 5. (p r) t 3,4; Hypothetical Syllogism (rule 24) 6. t (p r) 5; Contrapositive (rule 9) 7. t ( p r) 6; DeMorgan (rule 8a) Indirect Proof: Statement 1. p q Given 2. r s Given 3. (q s) t Given Reason 4. [t ( p r)] Negation of Conclusion 5. [t (p r)] 4; DeMorgan (rule 8a) 6. (t (p r)) 5; Implication (rule 10b) 7. t 6; Simplification (rule 17) 8. (p r) 6; Simplification (rule 17) 9. (p r) (q s) 1,2; Constructive Dilemmas (rule 26a) 10. (q s) 8,9; Modus Ponens (rule 19) 11. t 3,10; Modus Ponens (rule 19) 12. (t t) 7,11; Conjunction (rule 34) 13. Contradiction 12; Rule 7b 13

3. Direct Proof: Statement Reason 1. p (q r) Given 2. q s Given 3. (q r) (s r) 2; Rule 25a 4. p (s r) 1,3; Hypothetical Syllogism (rule 24) 5. p (r s) 4; Commutative (rule 2a) Indirect Proof: Statement 1. p (q r) Given 2. q s Given Reason 3. (p (r s)) Negation of Conclusion 4. (p (r s)) 3; Implication (rule 10b) 5. p 4; Simplification (rule 17) 6. (r s) 4; Simplification (rule 17) 7. ( r s) 6; DeMorgan (rule 8a) 8. r 7; Simplification (rule 17) 9. s 7; Simplification (rule 17) 10. q 2,9; Modus Tollens (rule 20) 11. ( q r) 8,10; Conjunction (rule 34) 12. (q r) 11; DeMorgan (rule 8a) 13. p 1,12; Modus Tollens (rule 20) 14. ( p p) 5,13; Conjunction (rule 34) 15. Contradiction 14; Rule 7b 14

More First Hour Exam Review Material These proofs are intended as extra practice problems for the first hour exam. They do not have to be turned in and will not be collected. However, they are recommended, since the same types of problems will be encountered on the exam. A solution for each problem is attached. Reminder: There are a variety of solutions for each problem, so your solution may or may not match the solution given. Do a direct proof for each. 1. Given: p q Prove: q s r s r p 2. Given: p q Prove: (p r) r s q s 3. Given: p s Prove: s q p q 4. Use the contrapositive and DeMorgan s laws on the right side of the following: [(p q) (r s)] [(p r) (q s)] (Note: This is the Constructive Dilemma) to obtain the following: [(p q) (r s)] [( q s) ( p r)] (Note: This is Destructive Dilemma). 5. Use the implication rule on the left side of the following: [(p q) q ] p (Note: This is Modus Tollens) to obtain the following: [( p q) q] p (Note: This is Disjunctive Syllogism). 15

Solutions 1. Statement Reason 1. p q Given 2. r s Given 3. r p Given 4. (p r) (q s) 1,2; Constructive Dilemmas (rule 26a) 5. p r 3; Commutative Laws (rule 2a) 6. q s 4,5; Modus Ponens (rule 19) 2. Statement Reason 1. p q Given 2. r s Given 3. q s Given 4. (q s) 3; DeMorgan s Laws (rule 8b) 5. (p r) (q s) 1,2; Constructive Dilemmas (rule 26b) 6. (p r) 4,5; Modus Tollens (rule 20) 3. Statement Reason 1. p s Given 2. q p Given 3. q Given 4. p 2,3; Disjunctive Syllogism (rule 21) 5. s 1,4; Modus Ponens (rule 19) ----------------------------------------------------------------------------------------------------------- 4. [(p q) (r s)] [(p r) (q s)] [(p q) (r s)] [ (q s) (p r)] [(p q) (r s)] [( q s) ( p r)] Contrapositive DeMorgan s 5. [(p q) q] p [( p q) q] p Implication 16

Set Theory Outline I. Definitions II. Operations III. Use of Venn Diagrams IV. Set Proofs using Set Theory and Predicate Calculus 17

Sets Use capital letters such as A, B, C for set designation. Use small letters such as a, b, c for elements of a set. A = {a,b,c} {elements} = is element of a A A represents cardinality (number of elements) of a set. A = {a,b,c} = 3 Sets can be represented by a general description. B = {n n P} The elements of B are n such that n is an element of P. There are some special representations: [a,b] = {x R: a x b} [a,b) = {x R: a x < b} (a,b] = {x R: a < x b} (a,b) = {x R: a < x < b} Note: [1,2] infinite number of elements (1,2) infinite number of elements {1,2} two elements (also written { }) is the symbol for the empty set (the set with no elements). Elements of a set can be sets: A = {1,2,3} A = 3 B = {a,b,c,d} B = 4 C = {A,B} C = 2 18

Note: = 0 However { } = 1 P(A) is the power set of A. The power set is the set of elements which are all possible subsets of A. For any set A, A. (The empty set is a subset of all sets.) Examples: A = {0,1} Subsets of A:, {0}, {1}, {0,1} P(A) = {,{0},{1},{0,1}} A = {a,b,c} Subsets of A:, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c} P(A) = {,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}} Suppose A = A = 0 P(A) = { } { } = 1 A = {a,b} A = 2 P(A) = {,{a},{b},{a,b}} P(A) = 4 A = 3 P(A) = 8 A = n P(A) = 2 n prove by induction A = A = 0 P(A) = 1 2 0 = 1 true for zero A = n + 1 A = {e 1,e 2,,e n,e n+1 } P(A) = P(A/{e n+1 }) + P[(A/{e n+1 }) {e n+1 }] P(A) = 2 n + 2 n 2 2 n = 2 n+1 19

Set Operations Let: A = {1,2,5,7,9} B = {1,5,6,8} = union of sets A B = {x x A or x B} A B = {1,2,5,6,7,8,9} = intersection of sets A B = {x x A and x B} A B = {1,5} \ or - = difference (relative complement) of sets A/B = {x x A and x B} Also written as (A B c ) or (A - B) A/B = {2,7,9} B/A = {6,8} = symmetric difference (xor) of sets A B = {x (x (A B)) and (x (A B))} Also written as (A/B B/A) A B = {2,6,7,8,9} = subset of a set A B = {x if x A then x B} = proper subset of a set A B = {x if x A then x B, but not for all x B} Also written as (A B) U = universal set being considered i. e.: ℵ, R, etc. c = absolute complement of a set A c = {x x A} Also written as (U/A) 20

Laws of Algebra of Sets 1. Commutative Laws a. A B = B A b. A B = B A 2. Associative Laws a. (A B) C = A (B C) b. (A B) C = A (B C) 3. Distributive Laws a. A (B C) = (A B) (A C) b. A (B C) = (A B) (A C) 4. Idempotent Laws a. A A = A b. A A = A 5. Identity Laws a. A = A b. A = c. A U = U d. A U = A 6. Double Complementation (A c ) c = A 7. a. A A c = U b. A A c = 8. a. U c = b. c = U 9. De Morgan Laws a. (A B) c = A c B c b. (A B) c = A c B c 21

Venn Diagrams Union - A B Intersection - A B Relative Complement - A/B Symmetric Difference - A B 22

Absolute Complement - A c Examples: 1. Show (A-B)-C A-(B-C) Let A = {1,2} B = {1,3} C = {2,3} Then (A-B)-C = {2}-{2,3} =, but A-(B-C) = {1,2}-{1} = {2} 2. Show (A-B)-C A-(B-C) (A-B)-C A-(B-C) 23

Examples involving the empty set: {n ℵ 2 < n < 3} = {r Q r 2 = 2} = {x R x 2 < 0} = Illustration of the Distributive Laws: A (B C) = (A B) (A C) Consider De Morgan's Laws: (A B) c = A c B c (A B) c A c B c 24

Computer Representation of Subsets of a Small Set S 3-bit binary numbers S = {a,b,c} a b c Elements of P(S) 0 0 0 0 0 1 {c} 0 1 0 {b} 0 1 1 {b,c} 1 0 0 {a} 1 0 1 {a,c} 1 1 0 {a,b} 1 1 1 {a,b,c} If S = k then P(S) = 2 k. Cardinality - size of set finite - if number of elements is n for some n ℵ. Set infinite- otherwise {a,b,c} 3 {2,4,,12} 6 {x R x 2 + 1 = 0} 0 Cardinality {2x + 1 x P} infinite [0,1) infinite ℵ, R, Q, Z, P, C infinite 25

Examples 1. Q R = Q 2. R-Q = Irrationals 3. ℵ-P = {0} 4. Z P = {0,-1,-2,-3, } 5. ℵ P = ℵ 6. (0,1) Z = 7. (0,1) [1,2] = (0,2] 8. (0,1) (1,2) = True or False? 1. [(A B) (B C)] (A C) True: B = {A, } C 2. [(A B) (B C)] (A C) False: Counter-example: A = {1}, B = {{1},2}, C = {{1},2,3} 3. [(A B) (B C)] (A C) False: Counter-example: A = {1}, B = {{1},2}, C = {{{1},2},3} 26

Arithmetic Proofs Information N = Natural numbers 0,1,2,3,... P = Positive integers 1,2,3,... Z = all integers...-3,-2,-1,0,1,2,3,... Q = all rational numbers (ratio of two integers m/n) R = all real numbers 1.) We will deal most often with integers A. Integers are closed under 1. addition 2. multiplication Integers closed under an operation means that if you start with integers and perform these operations, you will end up with an integer. 2 + 3 = 5 all integers 4 * 7 = 28 all integers 9 4 = (2.25) 9 and 4 are integers but (2.25) is not an integer. Therefore, integers are not closed under division B. Other properties we will assume: 1. Normal arithmetic rules apply: a. 2 + 3 = 5 b. 4 * 7 = 28 c. 12/3 = 4, etc. 2. Properties of numbers a. x even x = 2n (where n is an integer) b. x is odd x = 2n + 1 (where n is an integer) c. x is rational x = m/n where m and n are integers d. x is prime x > 1 (and cannot be factored except by 1 and x) e. x is an integer x is prime or a product of primes f. if "a" and "b" are integers; there exist two integers "q" and "r" such that: a = q*b + r where 0 r < b. g. xy = 0 x = 0, y = 0, or both x and y = 0 27

28