Solution Example Formula for number of Functions Number of Functions • If a set A has m elements and set B has n elements, then the number of functions possible from A to B is nm.
• For example, if set A = {3, 4, 5}, B = {a, b}.
– The total number of possible functions from A to B = 23 = 8 Number of one to one functions Number of onto functions Example-1 • Find the number of injective function from A to B where A = { a,b,c } and B = { 1,2,3,4,5} Example-2 • Count the number of surjective functions from A to B where A={1,2,3,4} and B={a,b}. Pigeonhole Principle • The pigeonhole principle states that if n items are put into m containers, with n>m, then at least one container must contain more than one item. • Also known as shoe box argument. • If there are many pigeons and a few pigeonholes then there must be some pigeonhole occupied by two or more pigeons. • Let D and R be finite sets if |D| >|R|, then for any function f from DR, there exists d1,d2 ∈D such that f(d1)=f(d2) • For any function f from DR there exists i elements d1,d2….di in D, i = ⌈ |D|/|R|⌉ such that f(d1)=f(d2)…f(di). Example-1 • If 50 bicycles are colored with 7 colors then at least how many bicycles have the same color ? Example-2 • Let T be an equilateral triangle whose sides are of length 1 unit. Show that if any 5 points are chosen lying on or inside triangle, then two of them must be no more than 0.5 unit apart. Example-3 A chess player wants to prepare for a championship match by playing some practice games in 77 days. She wants to play at least one game a day but not more than 132 games altogether. Show that no matter how she schedules the games, there is a period of consecutive days during which she plays exactly 21 games. Solution