Lecture 1Overview
Lecture 1Overview
TopicsTopics1. Proof techniques: induction, contradiction Proof techniques
June 1, 2015
CSCE 355 Foundations of Computation
– 2 – CSCE 355 Summer 2015
Models of ComputationModels of Computation
– 3 – CSCE 355 Summer 2015
Summer ScheduleSummer Schedule
Tests on MondaysTests on Mondays June 8 June 15 June 22 1 hour long
Exam June 26Exam June 26
– 4 – CSCE 355 Summer 2015
Course OutcomesCourse Outcomes
Mathematical prerequisites: functions, relations, Mathematical prerequisites: functions, relations, properties of relations, posets. properties of relations, posets.
Proof TechniquesProof Techniques
Finite automata: regular languages, regular Finite automata: regular languages, regular expressions, DFAs, NFAs, equivalences. expressions, DFAs, NFAs, equivalences.
Limitations: pumping lemma Limitations: pumping lemma
Context free languages: grammars, push-down Context free languages: grammars, push-down automata automata
Turing machines: undecidability, the halting problem Turing machines: undecidability, the halting problem
Intractability: NP, NP-Completeness Intractability: NP, NP-Completeness
– 5 – CSCE 355 Summer 2015
PrerequisitesPrerequisites
CSCE 211CSCE 211 Number systems, Boolean algebra, logic design, sequential machines
Mealy machinesMoore machines
– 6 – CSCE 355 Summer 2015
PrerequisitesPrerequisites
CSCE 350CSCE 350 Techniques for
representing and processing information, including the use of
lists, trees, and graphs;
analysis of algorithms;
sorting, searching, and hashing techniques.
MATH 374MATH 374 Propositional and
predicate logic; proof techniques; recursion and
recurrence relations; sets, combinatorics, and probability; functions, relations, and matrices; algebraic structures.
– 7 – CSCE 355 Summer 2015
Review of Relations on SetsReview of Relations on Sets
Binary relations - (X, Y) Binary relations - (X, Y) ἐἐ R R or X Rel Y or X Rel Y < on integers likes (X,Y)
Unary relation - propertiesUnary relation - properties boring(matthews)
Ternary relationTernary relation “X was introduced to Y by Z” -- ( X, Y, Z) Table in a relational database
– 8 – CSCE 355 Summer 2015
Special types of RelationsSpecial types of Relations
InjectionsInjections
SurjectionsSurjections
FunctionsFunctions
– 9 – CSCE 355 Summer 2015
Properties of RelationsProperties of Relations
Property Def Example Neg-Example
Reflexive
Irreflexive
symmetric
antisymmetric
asymmetric
transitive
Total
Injection
Surjection
function
– 10 – CSCE 355 Summer 2015
PosetsPosets Partially Ordered Sets (POSETS)Partially Ordered Sets (POSETS)
Reflexive Antisymmetric Transitive
Hasse Diagram Hasse Diagram
Topological sorting Topological sorting
– 11 – CSCE 355 Summer 2015
Equivalence relationsEquivalence relations
– 12 – CSCE 355 Summer 2015
Proof TechniquesProof Techniques
1.1 Direct proof 1.2 Proof by induction 1.3 Proof by transposition 1.4 Proof by contradiction 1.5 Proof by construction 1.6 Proof by exhaustion 1.7 Probabilistic proof 1.8 Combinatorial proof 1.9 Nonconstructive proof 1.10 Proof nor disproof 1.11 Elementary proof
– 13 – CSCE 355 Summer 2015
Deductive ProofsDeductive Proofs
the conclusion is established by logically combining the conclusion is established by logically combining the axioms, definitions, and earlier theoremsthe axioms, definitions, and earlier theorems
Example: The sum of two even integers is even.Example: The sum of two even integers is even.
HypothesisHypothesis
– 14 – CSCE 355 Summer 2015
Theorem 1.3 used to prove Theorem 1.4Theorem 1.3 used to prove Theorem 1.4
Theorem 1.3 If x >= 4 then 2Theorem 1.3 If x >= 4 then 2xx >= x >= x22..
Theorem 1.4 If x is the sum of the squares of 4 Theorem 1.4 If x is the sum of the squares of 4 positive integers then 2positive integers then 2xx >= x >= x22..
ProofProof
– 15 – CSCE 355 Summer 2015
Theorem 1.3 If x >= 4 then 2x >= x2.Theorem 1.3 If x >= 4 then 2x >= x2.
f(x) = xf(x) = x22 / 2 / 2xx..
Then what is the derivative f’ of fThen what is the derivative f’ of f
Derivative of quotient??Derivative of quotient?? http://www.math.hmc.edu/calculus/tutorials/quotient_rule/
So f’(x) =So f’(x) =
– 16 – CSCE 355 Summer 2015
Proofs about Equality of SetsProofs about Equality of Sets
To prove S = TTo prove S = T Show S is a subset of T, and T is a subset of S
Commutative law of unionCommutative law of union
Theorem 1.10 Distributive law of union over Theorem 1.10 Distributive law of union over intersectionintersection
ProofProof
– 17 – CSCE 355 Summer 2015
Proof by ContradictionProof by Contradiction
– 18 – CSCE 355 Summer 2015
If and only If statementsIf and only If statements
IF H then C H = Hypothesis C = conclusionIF H then C H = Hypothesis C = conclusion H implies C H only if C C if H
A if and only if BA if and only if B If part : Only-if part
Theorm 1.7 ceiling = floor Theorm 1.7 ceiling = floor x is an integer x is an integer
– 19 – CSCE 355 Summer 2015
InductionInduction
Given a statement S(n) about an integer n that we Given a statement S(n) about an integer n that we want to prove.want to prove.
Basis Step: Show S(i) is true for a particular integer iBasis Step: Show S(i) is true for a particular integer i Usually i = 0 or i = 1
Inductive Step: Inductive Step: AssumeAssume S(n) is true S(n) is true for n >= i and for n >= i and then show S(n+1) is truethen show S(n+1) is true
Inductive Hypothesis:Inductive Hypothesis: Assume S(n) is true Assume S(n) is true
– 20 – CSCE 355 Summer 2015
Example Induction Proof: Theorem 1.16Example Induction Proof: Theorem 1.16
– 21 – CSCE 355 Summer 2015
Number of leaves in complete tree of height h is 2h. Number of leaves in complete tree of height h is 2h.
– 22 – CSCE 355 Summer 2015
More general inductionMore general induction
Basis step as beforeBasis step as before
Assume S(k) for all k <= n then show S(n)Assume S(k) for all k <= n then show S(n)
– 23 – CSCE 355 Summer 2015
Recursive Def of TreeRecursive Def of Tree
Basis: a single node is a tree.Basis: a single node is a tree.
If T1, T2, … Tk are trees then a new tree can be If T1, T2, … Tk are trees then a new tree can be formed byformed by1. Add new node N, the root of the new tree
2. Add copies of T1… Tk
3. Add an edge from N to the root of each T1, T2, … Tk
– 24 – CSCE 355 Summer 2015
Structural InductionStructural Induction
For objects with recursive definitions consisting of For objects with recursive definitions consisting of base objects and then combining rulesbase objects and then combining rules
Basis step: show the proposition S(X) holds for Basis step: show the proposition S(X) holds for every base object X.every base object X.
Inductive step: Given a recursive structure X formed Inductive step: Given a recursive structure X formed from X1, X2, … Xn by the application of the def. thenfrom X1, X2, … Xn by the application of the def. then
Assume S(X1) S(X2) …. S(Xn) are true and Assume S(X1) S(X2) …. S(Xn) are true and
show that S(X) is trueshow that S(X) is true
– 25 – CSCE 355 Summer 2015
Recursive Def of Arithmetic ExpressionsRecursive Def of Arithmetic Expressions
Basis: a number or a variable is an expression.Basis: a number or a variable is an expression.
If E and F are expressions then a new expression G If E and F are expressions then a new expression G can be formed by applying one of the three rulescan be formed by applying one of the three rules
1.1. G = E + FG = E + F
2.2. G = E * FG = E * F
3.3. G = ( E )G = ( E )
– 26 – CSCE 355 Summer 2015
Every Expression has equal number of left and right parenthsesEvery Expression has equal number of left and right parenthses
– 27 – CSCE 355 Summer 2015
HomeworkHomework
1.1. ..
2.2. Prove if a complete binary tree has n leaves then Prove if a complete binary tree has n leaves then it has 2n-1 nodes.it has 2n-1 nodes.
– 28 – CSCE 355 Summer 2015
References– Mathematical FoundationsReferences– Mathematical Foundations http://en.wikipedia.org/wiki/Binary_relationhttp://en.wikipedia.org/wiki/Binary_relation
http://en.wikipedia.org/wiki/Relation_(mathematics)http://en.wikipedia.org/wiki/Relation_(mathematics)
http://en.wikipedia.org/wiki/Mathematical_proofhttp://en.wikipedia.org/wiki/Mathematical_proof
http://en.wikipedia.org/wiki/Proofs_from_THE_BOOKhttp://en.wikipedia.org/wiki/Proofs_from_THE_BOOK
Extended “Proof” techniquesExtended “Proof” techniques
http://www.maths.uwa.edu.au/~berwin/humour/http://www.maths.uwa.edu.au/~berwin/humour/invalid.proofs.html invalid.proofs.html
Fair Use Books OnlineFair Use Books Online
http://fair-use.org/bertrand-russell/the-principles-of-http://fair-use.org/bertrand-russell/the-principles-of-mathematics/ mathematics/
BooksBooks
Dr. Euler's Fabulous Formula: Cures Many Mathematical Dr. Euler's Fabulous Formula: Cures Many Mathematical IllsIlls