



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of functions, their properties, and related concepts such as one-to-one, onto, and bijective functions, sequences, and convergence. Topics include function notation, function as relations, composite functions, one-to-one and onto functions, mathematical functions, and summation symbols. The document also discusses recursive function definitions and the complexity of algorithms.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Functions. A mapping. Usual notation f: A → B If a^ A, f(a)bbB All members of A are mapped to the set B. A is the domain of the function f, B, its range or codomain. Functions as relations. Composite functions. f: A→B and then g: B→C is a mapping gf such that gf: A → C. a b** c d x y z m A B
One-to-0ne, Onto function A function f: A → B is one-to-one if all its members are mapped, and different members of A are mapped to different members in B. Also called injective functions. A function is onto if all elements of B are images of some elements of A. An onto function is also called a surjective function. A function that is both one-to-one and onto are called bijective functions or a one-to-one correspondence. General features of one-to-one and onto functions For an one-to-one f: A → B we cannot have distinct pairs (a,b), (c,b). a b c c m o n p
What about double indexed sums? n i 1 0 j n 1 ai bj a 1 bn 1 a 2 bn 2 ... anb 0 What about this kind? (a b a b ... a b ) ... ab (ab ab ... ab ) 2 3 2 4 2 q 2 1 3 1 q p i 1 q j i i j 1 What about product forms? i 1 ai a 1 a 2 a 3 ...an How about (a a a a ) a (aa a a ) (a aa a ) ... n n 1 n 2 n 3 1 2 3 4 2 3 4 5 n i 1 i 3 i i ^ We can have all kinds of combinations of and ^ in an expression. Recursive functions definitions. else, gcd(n,m%n ) gcd(m,n) nif(mmodn) 0 Another function.
k k/ 2 2 k k 1 x (x ) else x x x ifk% 2 0 Complexity of algorithms. Big-oh notation, complexity, ^ complexity. Complexities of well-known algorithms. Linear search: O(n) Binary search: O(log n) Bubble sort: O(^ n ) 2 Selection sort: O(^ n ) 2 Insertion sort: O^ (n ) 2 Quicksort: O(n log n)