Universal Conditional Statements s2
Total Page:16
File Type:pdf, Size:1020Kb
CmSc 175 Discrete Mathematics Study Guide for Unit Exam 2
Predicate Logic, Valid and Invalid Arguments in Predicate Logic Proofs, Mathematical Induction, Set, Boolean Algebra
1. Be able to translate universally and existentially quantified statements in predicate logic and find their negation
2. Be able to recognize valid and invalid arguments in predicate logic, determine the inference rule applied and the types of errors.
3. Know how to prove statements using direct proofs and mathematical induction.
4. Know set identities
5. Know the formal definitions of set operations: union, intersection, difference and complement.
6. Be able to compute union, complement, intersection of discrete sets and of sets of real numbers
7. Know how to simplify set expressions and to show that two expressions are equivalent using set identities and the formal definitions of set operations.
8. Know how to find the powerset of a given set, the Cartesian product of two sets, and to determine if a given set of subsets of some set is a partition or not.
9. Know the axioms of Boolean Algebra
10. Be able to prove statements in Boolean algebra, e.g. x + x = x
Sample problems with solutions are given below. See also problems in homework assignments and quizzes
1 1. Be able to translate universally and existentially quantified statements in predicate logic and find their negation
Men are mortal x, man(x) mortal(x) Negation: x, man(x) ~mortal(x) Some men are immortal
Some cheaters sit at the back row x, cheater(x) sit_in_the_back_row (x) Negation: x, cheater(x) sit_in_the_back_row (x) (x) No cheaters sit in the back row
Negations of quantified statements Babies cry. Some babies don’t cry
No textbook is cheap Some textbooks are cheap
Some students study in the library No students study in the library
Some students don’t take introductory classes All students take introductory classes
2. Be able to recognize valid and invalid arguments in predicate logic, determine the inference rule applied and the types of errors.
All honest people pay their taxes. Darth is not honest Therefore Darth does not pay his taxes Invalid, Inverse error
Senior students must take a capstone class Anna is a senior student Therefore Anna must take a capstone class. Valid, Modus Ponens
All teachers occasionally make mistakes. No gods make mistakes Therefore no teachers are gods Valid Hypothetical Syllogism. Explanation: x, teacher(x) make_mistakes(x) (1) x, god(x) ~make_mistakes(x) (2) x, make_mistakes (x) ~ god (x) (2’ contrapositive of (2))
2 Now combine (1) and (2’) with HS, we get: x, teacher(x) ~ god (x)
All teachers occasionally make mistakes. Peter makes mistakes Therefore Peter is a teacher Invalid converse error
All teachers occasionally make mistakes. Peter does not make mistakes Therefore Peter is not a teacher Valid Modus Tollens
3. Know how to prove statements using direct proofs and mathematical induction.
3.1. Prove that the sum of two odd numbers is an even number. Proof: Let x and y be two odd numbers. By the definition of odd numbers, there is some p integer such that x = 2p -1, and there is some q integer such that y = 2q – 1.
x + y = 2p – 1 + 2q – 1 = 2p + 2q – 2 = 2(p + q – 1) Let s = p + q – 1 Then, x + y = 2s
x + y has the representation of an even number, therefore it is even.
3.2. Let S(n) = 1 + 2 + 3 + 4 + …. + n, n = 1, 2, 3, …. Prove by mathematical induction the statement P(n): S(n) = n(n+1)/2 for all integers n 1 a. Base step Show that P(1) is true. P(1): S(1) = 1*(1 + 1)/2 = 1 By the definition of S(n), S(1) = 1 Therefore P(1) is true
b. Inductive step Show that P(k) P(k+1) is true P(k): S(k) = k(k+1)/2 P(k+1): S(k+1) = (k+1)(k+2)/2
Assume that P(k) is true. We have to show that P(k+1) is also true. S(k+1) = S(k) + (k+1) = k(k+1)/2 + (k+1) = = k(k+1)/2 + 2(k+1)/2
3 = ((k+1)(k+2))/2 Therefore P(k+1) is true, therefore P(k) P(k+1) is true. By the principle of math induction, P(n): S(n) = n(n+1)/2 is true for all integers n 1
4. Know set identities
See Lesson 11
5. Know the formal definitions of set operations: union, intersection, difference and complement.
A B = {x | (x є A ) (x є B)}
A B = {x | (x є A ) V (x є B)}
A – B = {x | (x є A ) V (x B)}
~A = {x | (x A ) }
6. Be able to compute union, complement, intersection of discrete sets and of sets of real numbers
Let A = {x | -1 < x < 6 V 10 x 15} B = {x | 4 < x 12}
A B = { x | 4 < x < 6 V 10 x 12}
A B = { x | -1 < x 15 }
~A = { x | x -1 V 6 x < 10 V 15 < x} ~B = { x | x 4 V 12 < x}
~A ~B = {x | x -1 V 15 < x} ~A ~B = {x | x 4 V 6 x < 10 V 12 < x}
7. Know how to simplify set expressions and to show that two expressions are equivalent using set identities and the formal definitions of set operations.
Show that
(A B) B = B
4 a. Proof using set identities
(A B) B = (A B) ( B U) by identity law = (A B) ( B (A ~A)) by complementation law = (A B) (B A) (B ~A) by distributive law = (B A) (B A) (B ~A) by commutative laws = (B A) (B ~A) by idempotent laws (i.e. A A = A) = B (A ~A) by distributive law = B U by complementation law = B by identity law
b. Proof using the formal definitions
(A B) B = {x | ((x є A ) (x є B)) V (x є B)} = = {x | (x є B)} by the absorption laws in propositional logic (P V (P Λ Q) ≡ P Here P is x є B, Q is x є A
8. Know how to find the power set of a given set, the Cartesian product of two sets, and to determine if a given set of subsets of some set is a partition or not.
a. Power set A = {1,2} P (A) = {, {1}, {2}, {1,2}} Note: The power set of a set with n elements has 2n elements
A = P (A) = {} A = {P (A) = {, {}, {}, {, } }
b. Cartesian products A = {1,2}, B = {a, b, c}, C = {3} A x B = {(1,a), (1,b), (1,c), (2,a), (2,b), (2,c)} B x A = {(a,1), (a,2), (b,1), (b,2), (c,1), (c,2)} A x C = {(1,3), (2,3)} The number of pairs in the Cartesian product is the product of the number of elements of each set.
c. Partitions
A = {1,2,3,4,5}, Which of the following sets are not partitions? Explain
{{1,2},{3,5},{4}} Partition {{1,2,3},{4,5}} Partition {1,2},{4,5}} Not a partition, element 3 is missing
5 {{1,2},{2,3,4,5}} Not a partition, element 2 is repeated, i.e. the sets {1,2} and {2,3,4,5} are not disjoint
9. Know the axioms of Boolean Algebra
See Lesson 13
10. Be able to prove statements in Boolean algebra, e.g. x + x = x
Prove x = x + x
x = x + 0 by identity axiom = x + x . ~x by complements axiom = (x + x) . (x + ~x) by distributive axiom = (x + x) . 1 by complements axiom = x + x by identity axiom
6