Download presentation
Presentation is loading. Please wait.
Published byMerry Allen Modified over 9 years ago
2
Review I Rosen 1.1-1.5, 3.1
3
Know your definitions!
4
Definition 1. Negation of p Let p be a proposition. The statement “It is not the case that p” is also a proposition, called the “negation of p” or ¬p (read “not p”) Table 1. The Truth Table for the Negation of a Proposition p ¬p T F F T p = The sky is blue. p = It is not the case that the sky is blue. p = The sky is not blue.
5
Definition 2. Conjunction of p and q Let p and q be propositions. The proposition “p and q,” denoted by p q is true when both p and q are true and is false otherwise. This is called the conjunction of p and q. Table 2. The Truth Table for the Conjunction of two propositions p q p q T T T T F F F T F F F F
6
Definition 3. Disjunction of p and q Let p and q be propositions. The proposition “p or q,” denoted by p q, is the proposition that is false when p and q are both false and true otherwise. Table 3. The Truth Table for the Disjunction of two propositions p q p q T T T T F T F T T F F F
7
Definition 4. Exclusive or of p and q Let p and q be propositions. The exclusive or of p and q, denoted by p q, is the proposition that is true when exactly one of p and q is true and is false otherwise. Table 4. The Truth Table for the Exclusive OR of two propositions p q p q T T F T F T F T T F F F
8
Definition 5. Implication p q Let p and q be propositions. The implication p q is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Table 5. The Truth Table for the Implication of p q. p q p q T T T T F F F T T F F T
9
Implications If p, then q p implies q if p,q p only if q p is sufficient for q q if p q whenever p q is necessary for p Not the same as the if- then construct used in programming languages such as If p then S
10
Implications How can both p and q be false, and p q be true? Think of p as a “contract” and q as its “obligation” that is only carried out if the contract is valid. Example: “If you make more than $25,000, then you must file a tax return.” This says nothing about someone who makes less than $25,000. So the implication is true no matter what someone making less than $25,000 does. Another example: p: Bill Gates is poor. q: Pigs can fly. p q is always true because Bill Gates is not poor. Another way of saying the implication is “Pigs can fly whenever Bill Gates is poor” which is true since neither p nor q is true.
11
Related Implications Converse of p q is q p Contrapositive of p q is the proposition q p
12
Definition 6. Biconditional Let p and q be propositions. The biconditional p q is the proposition that is true when p and q have the same truth values and is false otherwise. “p if and only if q, p is necessary and sufficient for q” Table 6. The Truth Table for the biconditional p q. p q p q T T T T F F F T F F F T
13
Logical Equivalence An important technique in proofs is to replace a statement with another statement that is “logically equivalent.” Tautology: compound proposition that is always true regardless of the truth values of the propositions in it. Contradiction: Compound proposition that is always false regardless of the truth values of the propositions in it.
14
Logically Equivalent Compound propositions P and Q are logically equivalent if P Q is a tautology. In other words, P and Q have the same truth values for all combinations of truth values of simple propositions. This is denoted: P Q (or by P Q)
15
Example: DeMorgans Prove that (p q) ( p q) pq (p q) (p q) p q ( p q) T T F F T F T F F T F T F F F F T F T F F F T T T T
16
List of Logical Equivalences p T p; p F pIdentity Laws p T T; p F FDomination Laws p p p; p p p Idempotent Laws ( p) pDouble Negation Law p q q p; p q qpqp Commutative Laws (p q) r p p (q r); (p q) r p (q r) Associative Laws
17
List of Equivalences p (q r) (p q) (p r)Distribution Laws p (q r) (p q) (p r) (p q) ( p q)De Morgan’s Laws (p q) ( p q) Misc., Table 6 p p TOr Tautology p p FAnd Contradiction (p q) ( p q)Implication Equivalence p q (p q) (q p)Biconditional Equivalence
18
Prove: (p q) q p q (p q) q Left-Hand Statement q (p q) Commutative (q p) (q q) Distributive (q p) TOr Tautology (Misc. T6) q p Identity p q Commutative Begin with exactly the left-hand side statement End with exactly what is on the right Justify EVERY step with a logical equivalence
19
Prove: (p q) q p q (p q) q Left-Hand Statement q (p q) Commutative (q p) (q q) Distributive Why did we need this step? Our logical equivalence specified that is distributive on the right. This does not guarantee distribution on the left! Ex.: Matrix multiplication is not always commutative (Note that whether or not is distributive on the left is not the point here.)
20
Prove or Disprove p q p q ??? To prove that something is not true it is enough to provide one counter-example. (Something that is true must be true in every case.) pqp qp q FTTFFTTF The statements are not logically equivalent
21
Method to construct DNF Construct a truth table for the proposition. Use the rows of the truth table where the proposition is True to construct minterms –If the variable is true, use the propositional variable in the minterm –If a variable is false, use the negation of the variable in the minterm Connect the minterms with ’s.
22
How to find the DNF of (p q) r pqr (p q) r(p q) r TTTTFF TTFTTT TFTTFF TFFTTT FTTTFF FTFTTT F FTFFT FFFFTT There are five sets of input that make the statement true. Therefore there are five minterms.
23
pqr (p q) r(p q) r TTTTFF TTFTTT TFTTFF TFFTTT FTTTFF FTFTTT FFTFFT FFFFTT From the truth table we can set up the DNF (p q) r (p q r) (p q r) ( p q r) ( p q r) ( p q r)
24
Quantifiers Universe of Discourse, U: The domain of a variable in a propositional function. Universal Quantification of P(x) is the proposition:“P(x) is true for all values of x in U.” Existential Quantification of P(x) is the proposition: “There exists an element, x, in U such that P(x) is true.”
25
Universal Quantification of P(x) xP(x) “for all x P(x)” “for every x P(x)” Defined as: P(x 0 ) P(x 1 ) P(x 2 ) P(x 3 ) ... for all x i in U Example: Let P(x) denote x 2 x If U is x such that 0 < x < 1 then xP(x) is false. If U is x such that 1 < x then xP(x) is true.
26
Existential Quantification of P(x) xP(x) “there is an x such that P(x)” “there is at least one x such that P(x)” “there exists at least one x such that P(x)” Defined as: P(x 0 ) P(x 1 ) P(x 2 ) P(x 3 ) ... for all x i in U Example: Let P(x) denote x 2 x If U is x such that 0 < x 1 then xP(x) is true. If U is x such that x < 1 then xP(x) is true.
27
Quantifiers xP(x) True when P(x) is true for every x. False if there is an x for which P(x) is false. xP(x) True if there exists an x for which P(x) is true. False if P(x) is false for every x.
28
Negation (it is not the case) xP(x) equivalent to x P(x) True when P(x) is false for every x False if there is an x for which P(x) is true. xP(x) is equivalent to x P(x) True if there exists an x for which P(x) is false. False if P(x) is true for every x.
29
Quantification of Two Variables (read left to right) x yP(x,y) or y xP(x,y) True when P(x,y) is true for every pair x,y. False if there is a pair x,y for which P(x,y) is false. x yP(x,y) or y xP(x,y) True if there is a pair x,y for which P(x,y) is true. False if P(x,y) is false for every pair x,y.
30
Quantification of Two Variables x yP(x,y) True when for every x there is a y for which P(x,y) is true. (in this case y can depend on x) False if there is an x such that P(x,y) is false for every y. y xP(x,y) True if there is a y for which P(x,y) is true for every x. (i.e., true for a particular y regardless (or independent) of x) False if for every y there is an x for which P(x,y) is false. Note that order matters here In particular, if y xP(x,y) is true, then x yP(x,y) is true. However, if x yP(x,y) is true, it is not necessary that y xP(x,y) is true.
31
Basic Number Theory Definitions from Chapters 1.6, 2 Z = Set of all Integers Z+ = Set of all Positive Integers N = Set of Natural Numbers (Z+ and Zero) R = Set of Real Numbers Addition and multiplication on integers produce integers. (a,b Z) [(a+b) Z] [(ab) Z]
32
Number Theory Defs (cont.) n is even is defined as k Z n = 2k n is odd is defined as k Z n = 2k+1 x is rational is defined as a,b Z x = a/b, b 0 x is irrational is defined as a,b Z x = a/b, b 0 or a,b Z, x a/b, b 0 p Z+ is prime means that the only positive factors of p are p and 1. If p is not prime we say it is composite. = “such that”
33
Methods of Proof p q (Example: if n is even, then n 2 is even) Direct proof: Assume p is true and use a series of previously proven statements to show that q is true. Indirect proof: Show q p is true (contrapositive), using any proof technique (usually direct proof). Proof by contradiction: Assume negation of what you are trying to prove (p q). Show that this leads to a contradiction.
34
Direct Proof Z, Prove: n Z, if n is even, then n 2 is even. Tabular-style proof: n is evenhypothesis n=2k for some k Z definition of even n 2 = 4k 2 algebra n 2 = 2(2k 2 ) which isalgebra and mult of 2*(an integer)integers gives integers n 2 is evendefinition of even
35
Same Direct Proof Z, Prove: n Z, if n is even, then n 2 is even. Sentence-style proof: Assume that n is even. Thus, we know that n = 2k for some integer k.It follows that n 2 = 4k 2 = 2(2k 2 ). Therefore n 2 is even since it is 2 times 2k 2, which is an integer.
36
Z, Prove: n Z, if n is even, then n 2 is even. Proof: Assume that n is even. Thus, we know that n = 2k for some integer k. It follows that n 2 = 4k 2 = 2(2k 2 ). Therefore n 2 is even since it is 2 times 2k 2 which is an integer. Structure of a Direct Proof
37
Example of an Indirect Proof Prove: If n 3 is even, then n is even. Proof: The contrapositive of “If n 3 is even, then n is even” is “If n is odd, then n 3 is odd.” If the contrapositive is true then the original statement must be true. Assume n is odd. Then k Z n = 2k+1. It follows that n 3 = (2k+1) 3 = 8k 3 +8k 2 +4k+1 = 2(4k 3 +4k 2 +2k)+1. (4k 3 +4k 2 +2k) is an integer. Therefore n 3 is 1 plus an even integer. Therefore n 3 is odd. Assumption, Definition, Arithmetic, Conclusion
38
Discussion of Indirect Proof Could we do a direct proof of If n 3 is even, then n is even? Assume n 3 is even... then what? We don’t have a rule about how to take n 3 apart!
39
Example: Proof by Contradiction Prove: The sum of an irrational number and a rational number is irrational. Proof: Let q be an irrational number and r be a rational number. Assume that their sum is rational, i.e., q+r=s where s is a rational number. Then q = s-r. But by our previous proof the sum of two rational numbers must be rational, so we have an irrational number on the left equal to a rational number on the right. This is a contradiction. Therefore q+r can’t be rational and must be irrational.
40
Structure of Proof by Contradiction Basic idea is to assume that the opposite of what you are trying to prove is true and show that it results in a violation of one of your initial assumptions. In the previous proof we showed that assuming that the sum of a rational number and an irrational number is rational and showed that it resulted in the impossible conclusion that a number could be rational and irrational at the same time. (It can be put in a form that implies n n is true, which is a contradiction.)
41
Using Cases Prove: n Z, n 3 + n is even. Separate into cases based on whether n is even or odd. Prove each separately using direct proof. Proof: We can divide this problem into two cases. n can be even or n can be odd. Case 1: n is even. Then k Z n = 2k. n 3 +n = 8k 3 + 2k = 2(4k 3 +k) which is even since 4k 3 +k must be an integer.
42
Cases (cont.) Case 2: n is odd. Then k Z n = 2k+1. n 3 + n = (8k 3 +12k 2 + 6k + 1) + (2k + 1) = 2(4k 3 + 6k 2 + 4k + 1) which is even since 4k 3 + 6k 2 + 4k + 1 must be an integer. Therefore n Z, n 3 + n is even
43
Proof? Prove if n 3 is even then n is even. Proof: Assume n 3 is even. Then k Z n 3 = 8k 3 for some integer k. It follows that n = 3 8k 3 = 2k. Therefore n is even. Statement is true but argument is false. Argument assumes that n is even in making the claim n 3 =8k 3, rather than n 3 = 2k. This is circular reasoning.
44
Prove or Disprove If m and n are even integers, then mn is divisible by 4. The sum of two odd integers is odd. The sum of two odd integers is even. If n is a positive integer, then n is even iff 3n 2 +8 is even. n 2 + n + 1 is a prime number whenever n is a positive integer. n 2 + n + 1 is a prime number whenever n is a prime number. |x| + |y| |x + y| when x,y R. 3 is irrational.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.