290 likes | 354 Views
Methods of Proof: Overview. Deductive and inductive proofs If and only if proofs Review of sets Examples of deductive proof using sets Contrapositive of If H then C Proof by contradiction Induction on integers. Deductive proof: Used extensively in geometry & trigonometry
E N D
Methods of Proof: Overview Deductive and inductive proofs If and only if proofs Review of sets Examples of deductive proof using sets Contrapositive of If H then C Proof by contradiction Induction on integers
Deductive proof: • Used extensively in geometry & trigonometry • Not very important in this class • Inductive proof: • Basis of most automata theory • Proficiency in induction is a learning objective of this class
Deductive proof • Step-by-step argument from given information to a conclusion • “from the information that you gave me, I deduce that ….” • No internal assumptions are allowed • Example: proving that sets are equivalent
Proving equivalences about sets • In automata theory frequently ask “Are sets constructed in different ways actually the same set?” • Elements of sets are usually strings; hence sets are called “languages” • Statement “set E = set F” means every element in E is in F and every element in F is in E
Equivalent sets • set E = set F is example of “if and only if” • Element x is in E if and only if x is in F • To prove E = F must prove two if…then statements • If x is in E then x is in F • If x is in F then x is in E
Background on sets • If xA implies xB, then A is a subset of B (written AB) • If, in addition, AB then A is a proper subset of B (written AB) • AB = intersection of sets A and B defined by {x: xA and xB } • AB = union of sets A and B defined by {x: xA or xB }
More background on sets • A - B = difference of sets A and B defined by {x: xA and xB } • Let T be complement of S with respect to U then SU, TU, ST = U, and ST = null • Sets obey laws similar to numbers (commutative, associative, distributive, etc)
Proof of distributive law of sets • R(ST) = (RS)(RT) • Let E = R(ST) • Let F = (RS)(RT) • Must prove • if x is in E then x is in F • if x is in F then x is in E
Proof of distributive law of sets: part 1 if x R(ST) then x R or x (ST) (def. of union) x R or x S and x T (def. of intersection) x RS (def. of union) x RT (def. of union) x (RS)(RT) (def. of intersection) Therefore if x is in E then x is in F
Proof of distributive law of sets: part 2 if x (RS)(RT) then x RS (def. of intersection) x RT(def. of intersection) x R or x S and x T(logic?) x R or x (ST) (def. of intersection) x R(ST) (def. of union) Therefore if x is in F then x is in E
Logic of “If H then C” • Given 2 statements, hypothesis H and conclusion C, exactly one of following is the case: • 1. H and C are both true • 2. H is true and C is false • 3. H is false and C is true • 4. H and C are both false • Only (2) makes “if H then C” false • (3) does not apply to “if H then C” • In both (1) and (4) “if H then C” is true
Contrapositives • The contrapositive of “if H then C” is “if not C then not H” • New hypothesis is “not C” • New conclusion is “not H” • 4 cases of previous slide still apply
Logic of “If not C then not H” • Given statements not C and not H, exactly one of following is the case: • 1. not C and not H are both true • 2. not C is true and not H is false • 3. not C is false and not H is true • 4. not C and not H are both false • Only (2) makes “if not C then not H” false • (3) does not apply to “if not C then not H ” • In both (1) and (4) “if not C then not H” is true • hence “if not C then not H” is equivalent to “if H then C” and may be easier to prove
Contrapositive question What is the contrapositive of “if x > 4 then 2x > x2”
Proof by contradiction Proving that “if H then not C” is false is equivalent to proving “if H then C” Example using complement of a set
Proof by contradiction Given: T is the complement of S with respect to U Prove: If S is finite and U is infinite, then T is infinite Hypothesis has 3 parts T is complement of S S is finite U is infinite Conclusion is “T is infinite” not C is “T is finite”
Proof by contradiction • assume T is finite (i.e. not C) • then ||T||=some integer m • Given S is finite; therefore ||S||=some integer n • T is complement of S with respect to U; therefore; ST = U and ST = null • Hence, ||U||=m+n, which implies U is finite • Therefore “if H then not C” contradicts the part of H that U is infinite • This proves “if H then C”
Inductive proof • Many types of induction • Induction on integers is probably the most familiar
Induction on integers • S(n) is statement about integers we want to prove • Base case establishes truth of the statement for n=is typically the smallest integer where statement is true • Inductive step proves statement for n>is using either “if S(n) then S(n+1)” or “if S(n-1) then S(n)”
I require a “structured” proof with thefollow elements present and identified. • Proof of base case • Setup equation designed to use the inductive hypothesis • Statement of inductive hypothesis • Application of inductive hypothesis • Algebra that completes the proof • All algebraic operations must be on the right-hand-side of the equals sign.
Setup equations depends on approach • In approach “if S(n) then S(n+1)”, S(n+1) is on LHS of setup and inductive hypothesis is about S(n). • In approach “if S(n-1) then S(n)”, S(n) is on LHS of setup and inductive hypothesis is about S(n-1). • I will always specify which approach is to be used in a particular problem
Background on sums: k=1 to n+1 k2 = k=1 to n k2 + ? k=1 to n k2 = k=1 to n-1 k2 + ?
Background on sums: k=1 to UL k = UL(UL+1)/2 If UL=n we get k=1 to n k = n(n+1)/2 If UL=n+1 we get ? If UL=n-1 we get ?
Example: prove k=1 to n k = n(n+1)/2 using “if S(n-1) then S(n)”
Structured Proof of k=1 to n k = n(n+1)/2 by if S(n-1) then S(n) Base case n=1 k=1 to 1 k =? 1(1+1)/2 =? IH: assume about S(n-1) what you want to prove about S(n) Application of IH-> Setup equation IH:
Assignment #1 Due 8-23-19 Use the approach if S(n-1) then S(n) to give a structured proof that k=1 to n k2 = n(n+1)(2n+1)/6
Induction in recursive definitions Example: definition of a tree structure Base case: a single node is a tree Induction: the structure obtained by adding a node to a tree is a tree Prove: in a tree the #of nodes = #of edges+1 use approach if S(n-1) then S(n).
Structural Induction Prove: in every tree #of nodes = #of edges+1 Basis: true for single-node tree (no edges) IH: assume #of nodes = #of edges+1 is true for a tree with n-1 nodes Induction: As defined in the previous slide, a tree with n nodes can be obtained from a tree with n-1 nodes by attaching a node. Adding a node requires adding an edge; hence, the n-node tree has both one more node and one more edge than the n-1 node tree. Therefore #of nodes = #of edges+1 applies to the n-node tree.