Analysis of Algorithms
Analysis of Algorithms CSIS 385
Popular in Course
Popular in ComputerScienence
This 2 page Class Notes was uploaded by Lincoln Miller II on Tuesday October 20, 2015. The Class Notes belongs to CSIS 385 at Siena College taught by Staff in Fall. Since its upload, it has received 36 views. For similar materials see /class/225358/csis-385-siena-college in ComputerScienence at Siena College.
Reviews for Analysis of Algorithms
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/20/15
Chapter 2 Mathematics Review Sets of Numbers N Natural numbers 1 2 3 4 positive whole numbers infinite countable 9 Real numbers ie oating point numbers infinite not countable Integers both nonnegative and negative whole numbers 2 1 0 l 2 includes zero countable Rational numbers can be expressed as a fraction of two whole numbers ie 025 counta e xE is not rational ie can not be expressed as ab where a and b are whole numbers Cardinalitx If X is a finite set X is the number of elements in the set Polmomial of degree n n r171 ml 2 px cnx cHx cHx czx clxc0 Exam le 3x35x24xx4 Polynomial of degree 4 a common trick in this course Set Notation a b All the number between a and b including both a and b a b All the number between a and b excluding both a and b Examples 3 6 3 4 5 6 assuming a and b are integers 1 2 1 3 1 2 30 60 is infinite assuming a and b are Real Numbers Seguences are like sets except the order of the elements matter Given a 1 2 3 and b 3 1 2 the sequences a and b are not equal Sequence an a0 a1 a1 a decreasing sequence 23 increasing sequence 9 6 5 9 9 9 nonincreasing sequence 3 2 nondecreasing sequence 5 4 3 7 10 is a subsequence ofa 1 3 4 7 8 10 Logic q I7 interpreted as notp and q or not r Can also be written as pqr pq is true whenp 0 and q 1 Also r is true when r 0 Thus pqr is true when r 0 or whenp 0 and q l Permutations number of different orderings analogous to sequences Given abc there are 3 6 permutations abc acb bca bac cab cba Combinations number of different subsets order does not matter Given abc there is one combination of size 3 Given abcd there are 4 combinations of size 3 abc bcd cda dac Binomial coefficient counts the number of combinations ie the number of kelement subsets of an n element set I 10 i i gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt gtxlt 7 n 10 2amp210 9 8 7 6 5 4 3 2110 9 821034120 k n kk 7 10 77 37 3217654321 32 Logarithms amp Exponents Example 23 8 so log2 8 3 Thus blogbx x and 10gb b1C xLogarithms cancel out exponentials 0gb x Change of base formula log a 10gb xy ylogb x loga x Natural Log lnx logex where e 2718 If base not given assume base equals 2 logxy logx logQI logxy logx logy 211 2211 2nm 2n2m 21quot 1 2m Summations n 2 n 3 Z n n1 Zyz i z j EEQZZiELi Zawz gg 11 2 2 11 6 6 11 Iquot l Proof by Induction Example Side A Side B it nn 1 11 2 1 Step 1 Show that the base case is true n 1 Side A Xi 1 Side B l 1 111Q 2 2 Substitute base value ie n l on both Side A and Side B and show that the numeric value is equal Step 2 Assume true for n This is important because we can use the equality to perform a substitution Step 3 Prove true for n1 n1 SideAZi SideBW 11 n1 V1 Try to rewrite Side A or Side B so that it includes the initial equality ie Side A Xi n l 2i 11 11 Notice how Side A is rewritten as n1 plus the initial equality Now perform the substitution and simplify side A nn1 2n2n2 n n2 3n2 2 SideA n1Zinl 2 2 11 Now simplify side B nlnll nln2 n2 3n2 2 2 2 Side B
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'