Download as pdf
Download as pdf
You are on page 1of 6
(ASYMPTOTIC BEHAVIOUR of numeric function (sequence) means how the value of the function varies for large r. Ex: 1) a=5 _ r= 0 the value of the numeric function remains constant for increasing r. 2) b=5r?, 120 the value of the function increases for increasing r proportional to r. 3) ¢=Slogr 120 the value of the function increases for increasing r proportional to logr. 4) d.=5/r 120 the value of the function decreases for increasing r proportional to 1/r. ASYMPTOTIC DOMINENCE : Let a and b be numeric functions . We say that a is asymptotically dominates b or b is asymptotically dominated by a_, if there exists +ve constants k and m such that |b,| < m a, for r> k Ex: a=1+1 120 b=1/r+7 120 then a asymptotically dominates b because |b,| < a, for r=7 Note: 1) For any numeric function a, |a| asymptotically dominates a. 2) If b is asymptotically dominated by a, then for any constant a, ab is asymptotically dominated by a. If b is asymptotically dominated by a, then for any integer i, s'b is asymptotically dominated by s'a. If b,¢ are asymptotically dominated by a, then for any constants a, B ab+fe is asymptotically dominated by a. 5) If ¢ is asymptotically dominated by b, b is asymptotically dominated by a then If ¢ is asymptotically dominated by a 6) Itis possible that b is asymptotically dominated by a and a is asymptotically dominated by b. It is possible that b is not asymptotically dominated by a and a is not asymptotically dominated by b. 8) Itis possible that both a and b is asymptotically dominate ¢ while a is not asymptotically dominated by b, nor b is not asymptotically dominated by a 5 4 7 Order of a : Denoted by O(a). Is the set of all numeric functions that are asymptotically dominated by a order of a is also read as “big -oh of a”. Note : If b is asymptotically dominated by a, then b is in in the set of O(a).Instead of saying b is in the set of O(a) we often simply say that b is O(a). 1) O(c O(log rc O(*)c O(r'c O(@')c O(r!). 2) For any numeric function a,a is O((al). 3) Ifb is O(a), then for any constant a, ab is also O(a). 4) b is O(a), then for any integer i, s'b is O(s'a). 5) If b,c are O(a), then for any constants o,f, ab+Be is also O(a). 6) Ife is O(b) and b is O(a) thee is O(a). 7) Itis possible that b is O(a) and a is O(b). 8) Itis possible that b is not O(a) and a is not O(b). 9) Itis possible that ¢ is both O(a) and O(b) while b is not O(a) and a is not O(b). Permutations and combinations: Two principles are act as a “building blocks’ for all counting problems. Sum rule [whole is sum of its parts] _ {The principle of disjunctive counting} IE] ,E2, E3,........En are mutually exclusive events and El can happen in el ways, E2 can happen in e2 ways...... En can happen en ways . Then El or E2 or E3 ... Or En can happen el+e2+........+en ways. 1) Inhow many ways can we draw a heart or a spade from an ordinary deck of playing cards? A heart or an ace? An ace or an king? A numbered card or a king? 2) How many ways can we get a sum of 4 or 8 when two distinguishable dice are rolled? How many ways can we get an even sum? 3) On January 1“ all the students of a class send greeting cards to one another. If the postman delivered 420 cards to the students of this class, then the number of students in the class is Multiplication Rule: (The principle of sequential counting). If some event can in nl! different ways, and if following this event a second event can occur in n2 different ways and following this 2" event, a 3" event can occur in n3 different ways. Then the number of ways the events can occur in the order indicated is n1N2.N3 0. 1] Suppose a license plate contains 2 letters followed by 3 digits the 1 digit non zero. How many different license plates can be printed? 2] There are 4 bus lines between A & B and 3-bus line between B & C. Find the number of ways a person can travel a}By bus from A to C by way of B. b} Round trip by bus from A to C by way of B. 4) How many ways can one right and one left shoe be selected from 10 pairs shoes without obtaining a pair. 5) Inacertain programming language, an Identifier is a sequence of a certain _ number of characters where the ist character must be a letter of English alphabet and the remaining characters may be either a letter or a digit a) How many characters are there of length 5? b) In particular in Pascal an identifier is a sequence of from 1 to 8 characters length with above restrictions, How many Pascal identifiers are there? 6) How many five letter words are there where the ist & last letters a) consonants b) vowels c) are vowels and middle letters are consonants. 7) How many five letter words Are formed If vowels can only appear (if at all) as first or last letter? 8) How many 9-letter Palindromes are possible using the English alphabet. Permutations : © Each of the arrangements that can be made by taking some or all of the number of things (objects) is called a permutation. «Any arrangement of a set of n- objects in a given order is called a permutation of the objects. (Taken all at a time). e Any arrangement of any rsn of these objects in a given order is called r- permutation. Or a permutation of n-objects taken r at a time. © The number of permutations of n of s taken r at a time is denoted by p(n,r). P (nr) =n!/(n-r)! If the objects are arranged in a row, then that arrangement is called a linear permutation. Where as if arranged in circle then it is called circular permutations. The number of circular permutations of n dissimilar taken r at a time is Mp, /t/ The number of circular permutations of n-dissimilar things taken (all at a time) both directions is (n-1)! In only one direction (clock or anti clock) is (n-1)! / 2. The number of permutations of n dissimilar things taken r at a time in which p particular things do not occur is (n-p) p 1) Suppose repletion’s are not permitted. (a) How many three-digit numbers can be formed from six digits 2,3,4,5,7and 9? (b) How many of these are less than 400? (c) How many are even? (d) How many are odd? (e) How many are multiples of 5? 2) The number of four digit numbers that can be formed from the digits {0,1,2,3,4,5} a) Which are divisible by 4 b) five digit numbers that are divisible by 3 b) How many of them are even? 3) In how many ways can 10 persons be seated in a row so that a certain pair of them is not next to each other? 4) Find the number of ways that four mathematics books, three history books, three chemistry books, and two sociology books can be arranged on a shelf so that all books of the same subject are together. 9) Find the number of ways that three Americans, four Frenchmen, four Danes, and. two Italians can be seated in a row so that those of same nationality sit together. 10) Find the total number of +ve integers that can be formed from the digits 1,2,3,4 &5 . If no digit is repeated in any one integer. Permutations of similar things without repetitions: The number of permutations of n-objects of which n1 are alike n2 are alike,....nr are like is nf / nl!n2!.......nr!. 1) Find the number of all possible five letter “words” using the letters from the word “DADDY” 2) Find the number of all possible seven letters “words” using the letters from the word “BENZENE”. 3) Find a) the number m of permutations that can be formed from alll the letters of the word MISSISSIPPI”. b) If the words are to begin with an I. ©) If the words are to begin and end in S. d) If the two p’s are next to each other c) If the four $’s are to be next to each other. £) No consecutive $’s? 4) One has to travel only in north and east directions. How many possible paths will be there from A to B cet

You might also like