Review for CS1050. Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an.

Slides:



Advertisements
Similar presentations
Extensible Networking Platform CSE 240 – Logic and Discrete Mathematics Review: Mathematical Induction Use induction to prove that the sum of the.
Advertisements

THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Mathematical Induction
PROOF BY CONTRADICTION
Chapter 3 Direct Proof and Proof by Contrapositive
Mathematical induction Isaac Fung. Announcement ► Homework 1 released ► Due on 6 Oct 2008 (in class)
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Elementary Number Theory and Methods of Proof
Week 5 - Friday.  What did we talk about last time?  Sequences  Summation and production notation  Proof by induction.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Induction and recursion
Recursive Definitions Rosen, 3.4. Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
TR1413: INTRO TO DISCRETE MATHEMATICS LECTURE 2: MATHEMATICAL INDUCTION.
CSE115/ENGR160 Discrete Mathematics 03/22/12 Ming-Hsuan Yang UC Merced 1.
What is the best way to start? 1.Plug in n = 1. 2.Factor 6n 2 + 5n Let n be an integer. 4.Let n be an odd integer. 5.Let 6n 2 + 5n + 4 be an odd.
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
1 Strong Mathematical Induction. Principle of Strong Mathematical Induction Let P(n) be a predicate defined for integers n; a and b be fixed integers.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Mathematical Induction
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
1 Mathematical Induction. 2 Mathematical Induction: Example  Show that any postage of ≥ 8¢ can be obtained using 3¢ and 5¢ stamps.  First check for.
Mathematical Induction Assume that we are given an infinite supply of stamps of two different denominations, 3 cents and and 5 cents. Prove using mathematical.
Methods of Proof & Proof Strategies
Mathematical Maxims and Minims, 1988
Lecture 9. Arithmetic and geometric series and mathematical induction
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Chapter 6 Mathematical Induction
Mathematical Induction. F(1) = 1; F(n+1) = F(n) + (2n+1) for n≥ F(n) n F(n) =n 2 for all n ≥ 1 Prove it!
CS 173, Lecture B August 27, 2015 Tandy Warnow. Proofs You want to prove that some statement A is true. You can try to prove it directly, or you can prove.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Methods of Proof Lecture 3: Sep 9. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical.
9.4 Mathematical Induction
Chap 3 –A theorem is a statement that can be shown to be true –A proof is a sequence of statements to show that a theorem is true –Axioms: statements which.
Section 3.3: Mathematical Induction Mathematical induction is a proof technique that can be used to prove theorems of the form:  n  Z +,P(n) We have.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
Methods of Proof Dr. Yasir Ali. Proof A (logical) proof of a statement is a finite sequence of statements (called the steps of the proof) leading from.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Mathematical Induction
Chapter 5. Section 5.1 Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
Direct Proof and Counterexample I Lecture 11 Section 3.1 Fri, Jan 28, 2005.
Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If we can reach a particular.
1 Discrete Mathematical Mathematical Induction ( الاستقراء الرياضي )
Mathematical Induction
Chapter 1 Logic and proofs
3.3 Mathematical Induction 1 Follow me for a walk through...
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
1 Mathematical Induction. 2 What is induction? A method of proof It does not generate answers: it only can prove them Three parts: Base case(s): show.
Mathematical Induction. The Principle of Mathematical Induction Let S n be a statement involving the positive integer n. If 1.S 1 is true, and 2.the truth.
Chapter 1 Logic and Proof.
Advanced Algorithms Analysis and Design
Induction and recursion
CSNB 143 Discrete Mathematical Structures
321 Section, 2-7 Natalie Linnell.
Single Final State for NFA
Review 2.
CS201: Data Structures and Discrete Mathematics I
Follow me for a walk through...
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Mathematical Induction
Follow me for a walk through...
Induction Chapter
Advanced Analysis of Algorithms
Mathematical Induction
Follow me for a walk through...
THE WELL ORDERING PROPERTY
Presentation transcript:

Review for CS1050

Review Questions Without using truth tables, prove that  (p  q)   q is a tautology. Prove that the sum of an even integer and an odd integer is always odd. Use mathematical induction to prove that whenever n  Z+.

Review Questions Prove that f n+1 f n-1 – f n 2 = (-1) n whenever n is a positive integer. Without using set membership tables, prove or disprove that if A,B and C are sets, then A – (B  C) = (A-B)  (A-C). Using the definition of “Big Oh” prove that n! is O(n n ). Prove that (3,5,7) is the only “prime triple”, i.e., the only set of three consecutive odd integers > 1 that are all prime.

Review Questions Suppose f: Z+  Z+ where f(n) = 4n + 1 and Z+ is the set of all non-negative integers. –Is f one-to-one? –Is f onto? Suppose f: Z+  Z+ where f(n) = 4n and Z+ is the set of all non-negative integers –Is f one-to-one? –Is f onto?

Without using truth tables, prove that  (p  q)   q is a tautology.  (p  q)   q   (  p  q)   q  Misc. T6 (Implication equivalence)  (  p  q)   q  Misc. T6 (Implication equivalence) (  p  q)   q  Double Negation  p  (q   q)  Associative  p  T  Misc. T6 (Or tautology) T  Domination

Prove that the sum of an even integer and an odd integer is always odd. Let e be an even integer and f be an odd integer. Then there exists i,j  Z such at e = 2i and f=2j+1. (Why not e = 2j and f=2j+1?) Then e+f = 2i+2j+1 = 2(i+j) + 1 which is odd since i+j must be an integer.

Use mathematical induction to prove that whenever n  Z+. Basic Case: Let n = 1, then Inductive Case: Assume that the expression is true for n, i.e., that then we must show that

Prove that f n+1 f n-1 – f n 2 = (-1) n whenever n is a positive integer. Basis Step : For n=1 we have f 2 *f 0 – f 1 2 = 1*0 – 1 2 = -1 which is (-1) 1 Inductive Step: Assume the inductive hypothesis that f n+1 f n-1 – f n 2 = (-1) n. We must show that that f n+1+1 f n+1-1 – f n+1 2 = (-1) n+1

Then for n+1 we have that f n+1+1 f n+1-1 – f n+1 2 = f n+2 f n – f n+1 2 = (f n+1 +f n )f n - f n+1 2 = (f n+1 f n ) + f n 2 - f n+1 2 = (f n+1 )(f n - f n+1 ) + f n 2 = (-f n+1 )(f n+1 -f n )+ f n 2 But we know that f n+1 -f n = f n-1 so = (-f n+1 )(f n-1 )+ f n 2 = -(f n+1 f n-1 - f n 2 ) = -(-1) n by the inductive hypothesis which is (-1) n+1

Without using set membership tables, prove or disprove that if A,B and C are sets, then A – (B  C) = (A-B)  (A-C). Proof: We must show that A – (B  C)  (A-B)  (A-C) and that (A- B)  (A-C)  A – (B  C). First we will show that A – (B  C)  (A-B)  (A-C). Let e be an arbitrary element in A – (B  C). Then e  A but e  (B  C). Since e  (B  C), then either e  B or e  C or both. If e  A but e  B, then e  (A-B). If e  A but e  C, then e  (A-C). Since e is either an element of (A-B) or (A-C), then e must be in their union.. Therefore e  (A-B)  (A-C).

Now we will show that (A-B)  (A-C)  A – (B  C). Let e be an arbitrary element in (A-B)  (A-C). Then either e is in (A-B) or e is in (A-C) or e is in both. If e is in (A-B), then e  A but e  B. If e  B then e  (B  C). Therefore e  A-(B  C). If e is in (A-C), then e  A but e  C. If e  C then e  (B  C). Therefore e  A-(B  C).

Using the definition of “Big Oh” prove that n! is O(n n ). Proof: We must show that  constants C  N and k  R such that |n!|  C|n n | whenever n > k. n! = n(n-1)(n-2)(n-3)…(3)(2)(1)  n(n)(n)(n)…(n)(n)(n) n times =n n So choose k = 0 and C = 1

Prove that (3,5,7) is the only “prime triple”, i.e., the only set of three consecutive odd integers > 1 that are all prime We must show that, for any three consecutive odd integers, at least one is divisible by some other number. We will show that for every three consecutive odd integers, one of them is divisible by 3. Proof: Any three consecutive odd integers can be written as 2k+1, 2k+3, and 2k+5 for k  Z. For any k  Z, there are three possible cases, k = 3j,k = 3j+1,k = 3j +2 for j  Z.

Case 1: k = 3j. Then three consecutive odd integers look like: 2k+1= 2(3j) + 1 = 3(2j) + 1 2k+3= 2(3j) + 3 = 3(2j) + 3 = 3(2j+1) which is divisible by 3 since 2j+1 is an integer 2k+5 = 2(3j) + 5 = 3(2k) + 5 = 3(2k+1) + 2

Case 2: k = 3j+1 Then three consecutive odd integers look like: 2k+1= 2(3j+1) + 1 = 3(2j+1) which is divisible by 3 since 2j+1 is an integer. 2k+3= 2(3j+1) + 3 = 3(2j+1) +2 2k+5 = 2(3j+1) + 5 = 3(2j+2) + 1

Case 3: k = 3j+2 Then three consecutive odd integers look like: 2k+1= 2(3j+2) + 1 = 3(2j+1) + 2 2k+3= 2(3j+2) + 3 = 3(2j+2) +1 2k+5 = 2(3j+2) + 5 = 3(2j+3) which is divisible by 3 since 2j+3 is an integer. The only number divisible by 3 and that is prime is 3 so 3,5,7 is the only possible “prime triple”.

Suppose f:Z +  Z + where f(n) = 4n + 1 and Z + is the set of all non-negative integers. Is f one-to-one? Is f onto? Suppose f: Z +  Z + where f(n) = 4n and Z + is the set of all non-negative integers Is f one-to-one? Is f onto?