This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Schedule 1/2 Review
Chapter 1 ~ Chapter 6 p p October 19, 2009 Wednesday 11:00 ~ 12:20 (Lecture Hall #1 ) 12:50 Ch.1 Sets and Logic g Set Cardinality C Subset, proper subset, power set Union, intersection Union intersection, difference (relative complement) Disjoint, pairwise disjoint Universal set (universe), complement (universe) Venn diagrams Partition Ordered pair Cartesian product Ch.1 Sets and Logic g Propositions conj nction disj nction negation conjunction, disjunction, conditional proposition, necessary condition, sufficient condition, converse, contrapositive Logically equivalent Arguments, Rules of Inference Deductive reasoning Modus ponens, modus tollens,... hypothetical syllogism, disjunctive syllogism Quantifiers Propositional function (predicate) Universal quantifier, existential quantifier Generalized De Morgan's Laws g Rules of inference for quantified statements Universal/existential instantiation/generalization You should know how to define each and how to read (interpret) the notations
CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr Nested quantifiers
3
CS204 Discrete Math (Fall 2009) Determine some argument is valid. Determine some statement is true or false. f l
jinah@cs.kaist.ac.kr 4 Ch.2 Proofs Mathematical systems Axioms, theorem, lemma, corollary Proof : an argument that establishes the truth of a theorem. Logic : a tool f the analysis of proofs. for f f Proofs (from Prof. Song's lecture notes) Among methods of Direct proofs, there are Constructing a counterexample for negation of a universally quantified statement C Constructing an example for an existentially quantified statement t ti l f i t ti ll tifi d t t t Proving both directions of implication for a propositional equivalence Direct proofs Theorem: For all x1,.. xn, if p(x1, .. xn) the q(x1, ... xn) Assume p(x1,.. xn) is true and using p(x1,.. xn) as well as other axioms axioms, definitions, previously derived theorems, and rule of inferences, show that q(x1, ... xn) is true. Establishes p q by assuming that the hypothesis p is true and that the conclusion q is false and then, using p and ~q and other axioms..., derives a contradiction.
(p1 V p2) q ::: (p1 q) ^ (p2 q) Among methods of Indirect proofs, there are P f by contradiction Proof b t di ti Proof by contrapositive Non constructive existence proof Counterexamples Proof b P f by contradiction (i di t proof) t di ti (indirect f) Proof b P f by examples d l does not count as a proof unless the examples t t f l th l are exhaustive Inductive vs. deductive reasoning In inductive reasoning, we collect evidences that support a general rule reasoning rule. Many important scientific discoveries are due to inductive reasoning. Proof by contrapositive [~q ~p] Proof by cases (exhaustive proof) Proofs of equivalence [ p iff q ] Existence proofs [There exist x such that p(x)] Principle of Mathematical Induction Strong form of Induction / Wellordering property Learn what they are and how they are used from Examples and Exercises in the chapter. In deductive reasoning, we show that the truth of the conclusion is a logical consequence of g g q given p premises. Every mathematical argument is deductive. Thus naturally, every mathematical theorem is given in forma of a conditional statement. Mathematical induction is a method of deductive reasoning. reasoning
jinah@cs.kaist.ac.kr CS204 Discrete Math (Fall 2009) 5 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 6 Ch.3 Function and Relations Functions Various examples of a function in the book Definitions: onetoone (injection), onto (surjection), onetoone (surjection) one to one & onto (bijection) (bijection), composition Binary/unary operator Ch.4 Algorithms g Should be able to write a simple pseudocode, read to understand the pseudocode Time complexity Understand the asymptotic notations Sequences and String Definitions Recursive algorithms What it is and how to relate to mathematical induction i d ti Relations Definitions Reflexive, symmetric, antisymmetric, transitive, partial orders, equivalence relation, How to represent / read out to recognize what it is
CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 7 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 8 Ch.6 Counting g Basic principles Permutations and Combinations The pigeonhole principle Various examples and problems Your questions/requests from the end note Sections learned a while back (e g 1 2) and those section that are not (e.g. 1.2) covered by the professor. Proofs g Strong form of induction. Chap 3 Relation Coding (I'm not familiar with coding) Analysis of algorithm (pseudo code) What is a difference between algorithms counting(generating?) combination and permutation? Should I write the algorithm in the exam? Catalan C t l numbers b Combination C(n+t1, t1) 64 HW #22. What does it mean by `well ordered'? wellordered ? How do I prove that the algorithms in 6.4 generate combinations and permutations? More interesting examples for Pigeonhole principle. On the last example with phone number, if there are 3 area codes, is it right to say that there is at least one number which is duplicated? Some difficult problems? Please upload the answers for homework problems.
jinah@cs.kaist.ac.kr CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 9 CS204 Discrete Math (Fall 2009) 10 Catalan Number How many ways of parenthesizing with n parentheses? Ex) n=1 n=2 n=3 () )( ()() (( )) Balanced parentheses p n Cn = C(2n, n) / (n+1)
0 1 1 2 2 3 5 4 14 5 6 7 8 9 10 Cn 1 42 132 429 1430 4862 16796
jinah@cs.kaist.ac.kr CS204 Discrete Math (Fall 2009) 11 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 12 Catalan Number The Catalan number sequence {Cn} appear as the solution of many different counting problems. Recursive definition Let A and B contain the balanced parentheses. Both A and B can contain upto n1 pairs (A)B A contains 0, B contains n1 pairs A contains 1, B contains n2 .... A contains n1, B contains 0 We can count all configurations and add them up to get total with n balanced pairs. p Recurrence relation Initial conditions: C0 = 1, C1 = 1 Cn = C0Cn1 + C1Cn2 + ... + Cn2C1 + Cn1C0 = CkC nk1 nk1
k=0
CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr n1 13 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 14 Catalan Number Counting diagonalavoiding paths Total number of paths through the grid and then subtract off the number of paths that hit the diagonal. (n1) (n+1) ( 1) x ( +1) [ [6.4] #22 ] Write a recursive algorithm that generates all permutations of the set {s1, s2, ..., sn}. Divide the problem into n subproblems: List the permutations that begin with s1. List the .................................... s2. ... List the .................................... sn. Total number of path = C(2n, n) Bad path = C(2n, n+1) n 1) CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 15 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 16 Input: s1, s2, ..., sn and a string p , g Output: all permutations of s1, s2, ..., sn each prefixed by . (To list all permutations of s1, s2, ..., sn, invoke this procedure with equal to the null string ) string.) Perm recurs (s,n,) { Perm_recurs if (n==1) { println(+s1) ( return } for f i=1t n{ to ' = + si perm_recurs({s perm recurs({s1, ...., si1,si+1, ..., sn} n1, '} s }, n 1 } } }
CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr Pseudo code Comments: Input / Output procedure_name ( (parameters) ) begin / end { .... } parameter = value /* assignment x = x+1 parameter == value /* testing if equal / if (..) then xxxx /* then is omitted else { .....} } forloop for i= 2 to n {do ... ; i=i+1 & check if i<=n} while loop whileloop while (i>3) {do ...} return (argument) ( g )
17
CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 18 PigeonHole Principle Prove the following statement using the PigeonHole Principle. In any group of six people at least three must be people, mutual friends or at least three must be mutual strangers. (Assume that each pair of individuals is either two friends or two strangers.) Good Luck! CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 19 CS204 Discrete Math (Fall 2009) jinah@cs.kaist.ac.kr 20 ...
View
Full
Document
 Spring '08
 Unkown

Click to edit the document details