On Performance Deviation of Binary Search Tree Searches from the Optimal Search Tree Search Structures

Size: px
Start display at page:

Download "On Performance Deviation of Binary Search Tree Searches from the Optimal Search Tree Search Structures"

Transcription

1 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 O Performace Deviatio of Biary Search Tree Searches from the Optimal Search Tree Search Structures Ahmed Tarek Abstract Biary Search Trees are a frequetly used data structure for rapid access to the stored data. Data structures like arrays, vectors ad liked lists are limited by the trade-off betwee the ability to perform a fast search ad resize easily. They are a alterative that is both dyamic i size ad easily searchable. Due to efficiecy reaso, complete ad early complete biary search trees are of particular sigificace. This paper addresses the performace aalysis ad measuremet, collectively kow as the Performace i biary search tree search applicatios. Performace measuremet is equally sigificat asides from the performace aalysis to lear more about the deviatio from optimality. To estimate this deviatio, ew performace criteria for the biary search trees are preseted. A multi-key search algorithm is proposed ad the related aalysis followed. The algorithm is capable of searchig for multiple key elemets i the same executio, sacrificig some optimality i the timig cosideratio. This helps i pruig a subtree structure out of a give biary search tree for further processig. Keywords Complete Biary Search Tree, Nearly Complete Biary Search Tree, Performace Criteria, Sparsity Factor, Desity Factor, Multi-Key Search, Search-tree Pruig. I. INTRODUCTION Efficiet access to the stored data is a maistream reaso for the choice of a good data structure (DS). To provide efficiet access, the DS may eed to store additioal iformatio kow as the overhead. Therefore, a major objective of a DS is to keep the overhead miimum while allowig maximum access to the stored data. This paper is cocered with the aalysis of biary search trees (BSTs) as data structures of choice with several performace criteria. The deviatio from the optimality for usig the BSTs are demostrated usig performace measuremet results. BSTs ad the related applicatios are studied extesively i the literature. Amog the most otable cotributios, [] has studied the height, size performace of a class of BSTs i dictioary applicatio. I [], a applicatio of the BSTs i Neural Networks is preseted. This research paper deals with the geeral performace i BST search applicatios. A ew algorithm i searchig for multiple umber of odes i the same executio is also proposed. The multiple key BST search helps prue a subtree structure from a existig BST for further processig. Performace measuremet of the proposed multi-key BST search algorithm is also preseted. The results i this paper are both theoretical ad applied i ature. The performace graphs are obtaied usig the commo high level laguage compilers ruig o multiple Mauscript received September 3, 7; accepted February 6, 8; revised April 9, 8. This work was supported by the Califoria Uiversity of Pesylvaia i Pesylvaia, USA. Ahmed Tarek is associated with the Departmet of Math ad Computer Sciece at Califoria Uiversity of Pesylvaia, 5 Uiversity Aveue, Califoria, Pesylvaia 549, USA (phoe: (74) ; fax: (74) ; tarek@cup.edu) platforms. A umber of performace criteria are addressed. Fially, future research directios are outlied. The remaider of this paper is structured as follows. I Sectio II, terms ad otatios used i this paper are itroduced. Some ew cocepts are also defied. Sectio III cosiders performace of the BSTs usig the criteria itroduced i sectio II. Sectio IV itroduces the Multiple Key BST Search algorithm. This sectio also icorporates the related aalysis. Sectio V is based o the search-based performace of the BSTs. Sectio V I addresses the practical performace issues. Sectio V II outlies future research aveues. II. TERMINOLOGY AND NOTATIONS Followig otatios are used all throughout this paper. : Total umber of odes. T r : A biary search tree, which is abbreviated as, BST. l: Number of leaves. i : Iteral (iterior) ode cout. e : Number of exteral odes. h: Height of the BST. C i : Cost for a successful search i a BST. C e : Cost for a usuccessful search. I: Iteral path legth. E: Exteral path legth. sf: Sparsity factor. df: Desity Factor. L: Loss i capacity factor. Special terms ad cocepts are preseted by combiig meaigful idices with the correspodig otatio. Some useful defiitios are preseted ext. Deviatio i Height, h dev : The deviatio i height, h dev is the deviatio of the actual height, h from the optimal possible height, h o. This is expressed i % as follows: h dev = h ho h o %. Sparsity Factor: Justifies the relative sparsity of a actual BST i compariso to a full, ad complete BST with the same height, h. Mathematically, Sparsity Factor, sf = max m ax %. Here, max = maximum possible umber of records that may be accommodated i a complete BST with the actual height, h = ( (h+) ), ad = the actual umber of records curretly preset. Desity Factor: This determies the relative desity of a actual BST i compariso to a liear slim BST havig the same height, h. This is defied mathematically as, df = mi mi %. Here, mi = the miimum umber of records i a slim BST with the actual height, h = (h + ). III. PERFORMANCE WITH THE SPARSITY AND THE DENSITY FACTORS It is always desired that a costructed BST be as dese as possible approachig the complete or the early complete 4 Mauscript received May 6, 7: Revised received Aug. 3, 7

2 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 BST structure, ad as less sparse as is feasible. Followig result holds true i this cotext. Theorem : The maximum height deviatio from a liear sparse BST to a early complete bushy BST havig odes is: h diffmax = ( log (+)), ad the correspodig miimum possible height deviatio is: h diffmi = ( ) log, ad the differece betwee these two extreme deviatios is: log ( (+) ). Proof: For a liear skiy tree, there will be exactly ode at each level. Sice the ode coutig starts at the root record with level, therefore, (h s + ) =. This provides, h s = ( ). Suppose that there are k records at the last level h. I that evet, ( h ) + k =, this meas, h ( ) + k =. Therefore, h = ( k), this provides, h = ( + k). Hece, h = log ( + k). For the miimum deviatio i height, there is oly record at level h. Therefore, k =, ad h bmax = log. Hece, h diffmi = (h s h bmax ) = ( ) log. For the maximum height deviatio, there are h records at level h. Therefore, k = h, ad h = ( + h ), which provides, h+ = ( + ). This yields, (h + ) = log ( + ), or h = log ( + ). Therefore, h diffmax = (h s h bmi ) = ( ) (log (+) ) = ( log (+)). Therefore, fially, h diffmax h diffmi = ( log ( + )) - (( ) log ) = ( + log ( + ) + log ) = (log () log ( + ) + log ) = log () log ( + ) = log + = log ( (+) ). The differece, ( max - mi ) defies the maximum deviatio i the umber of records with a actual height, h. Hece, mdev = max - mi = ( (h+) - (h+)) = ( (h+) h ). The deviatio i height, h dev is defied as the deviatio of the actual height, h from the optimal height, h o. This is expressed as % of h o. Mathematically: h dev = h ho h o %. (a) BST height, h umber of odes, h a & h o differece i actual ad optimal heights, d (b) umber of odes, h a - h o plot Fig.. The actual ad the optimal heights of the geerated BSTs ad their differeces are plotted agaist the umber of records,. (The lower curve i Fig. (a) represets the optimal height). The plot i Fig. (a) shows the height deviatio of the actually geerated BST from the optimal oe. For the correspodig optimal BSTs, the height does ot chage from = 6 to =. If h opt = 8, the maximum umber of records that it may cotai is, 8+ = 5. Whereas, if h opt = 9, the maximum umber of records it may cotai is = 9+ =, 3. Therefore, for ay value of ragig from 6 to,, the optimal height is 9. The sparsity factor is defied as, sf = max max %. Therefore, sf is required to be as small as possible. Sice, max will be fixed for a particular value of h, the smaller the value of ( max ), will be closer to max, ad the tree will approach that of the optimal cofiguratio. This meas that the sparsity will decrease. Though sparsity factor sf is suppose to decrease with the icreasig value of, but almost costat sf is a idicator of the relatively steady BST structures. Costat values of sf idicate that the actual umber of odes, is relatively steady i compariso to the expoetial growth of, max = ( (h+) ) with the chagig values of h. The desity factor, df = ( mi) mi %. For a costat value of h, the higher the desity factor, df, will become relatively larger ad larger i compariso to mi, ad the tree will grow relatively deser. IV. MULTI-KEY BST SEARCH ALGORITHM Usig Multi-key Search, it is possible to idetify or more subtrees i the origial BST that starts at a particular record ad eds at aother oe. Sice such subtrees are just parts of the origial BST, operatios o these may be substatially faster tha origially costructig those subtrees from the scratch. Usig the proposed algorithm, it is possible at first to idetify the subtree structure, ad the applyig the memory move operatios, it is also possible to create a BST out of the subtree for further cosideratio. Algorithm fid record Purpose: This algorithm fids a record i the geerated BST. Require: ame supplied ad this ode as iputs. if ame supplied.compareto(this ode.ame)== the retur this ode if ame supplied.compareto(this ode.ame) < the if this ode.getleftchild() is ot NULL the retur fid record (ame supplied, this ode.getleftchild()) {recursive call to fid record} retur NULL if this ode.getrightchild() is ot NULL the retur fid record (ame supplied, this ode.getrightchild()) retur NULL The -key biary search tree search algorithm makes use of the classical -key versio. Algorithm fid record key Purpose: This algorithm performs -key biary search tree search. The supplied parameters are: array ames[], curret ode verified this ode. fid record key fids out two matchig odes if available for the array ames[] ad retur those as array search[]. Require: ames[].compareto(ames[]) < 4

3 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 Esure: a array of correct records or NULLs are retured if ames[].compareto(this ode.ame) < the if this ode.getleftchild() is ot NULL the search[] fid record (ames[], this ode.getleftchild()) search[] fid record (ames[], this ode.getleftchild()) {Make calls to fid record o the left subtree} search[] NULL search[] NULL retur search[] if ames[].compareto(this ode.ame) > the if this ode.getrightchild() is ot NULL the search[] fid record (ames[], this ode.getrightchild()) search[] fid record (ames[], this ode.getrightchild()) {Make calls to fid record o the right subtree} search[] NULL search[] NULL retur search[] if ames[].compareto(this ode.ame) < ad ames[].compareto(this ode.ame) > the if this ode.getrightchild() is ot NULL ad this ode.getleftchild() is ot NULL the search[] fid record (ames[], this ode.getleftchild()) search[] fid record (ames[], this ode.getrightchild()) {Make calls to fid record o two subtrees} if this ode.getrightchild() is ot NULL the search[] NULL search[] fid record (ames[], this ode.getrightchild()) if this ode.getleftchild() is ot NULL the search[] fid record (ames[], this ode.getleftchild()) search[] NULL search[] NULL search[] NULL retur search[] if ames[].compareto(this ode.ame) == the if this ode.getrightchild() is ot NULL the search[] this ode search[] fid record (ames[], this ode.getrightchild()) search[] this ode search[] NULL retur search[] if ames[].compareto(this ode.ame) == the if this ode.getleftchild() is ot NULL the search[] this ode search[] fid record (ames[], this ode.getleftchild()) search[] this ode search[] NULL retur search[] retur search[] A. Multi-key BST Search Aalysis For clarity, cosider the -key BST search i this aalysis. Suppose that the -st key is located at height h ad at k positio coutig from the left-most record at height h. Similarly, suppose that the d key is at height h ad at k positio coutig from the left-most record at height h. Followig are the possible scearios with this -key BST Search. The st key is o the left subtree, ad the d key is o the right subtree of the root record. I this case, the subtree startig at k ad edig at k icludes the root ode. Both k ad k are o the left subtree. The the subtree startig at k ad edig at k will ot iclude the root, ad cotais oly a part of the left subtree. Both k ad k are o the right subtree. The the subtree startig at k ad edig at k will ot iclude the root, ad cotais a part of the right subtree. k is the root ode ad k is o right subtree. The subtree spaig from k to k icludes a portio of the right subtree icludig the root. k is o the left subtree ad k is at the root. I this case, the subtree from k to k cotais a portio of the left subtree, which icludes the root. Followig aalysis is based o the assumptio that the BST is complete up to a height of maximum{h, h }. Suppose that the height of the BST is h ad the total umber of records is. Therefore, h h, ad h h. For the followig aalysis, the left ad the right subtrees coutig from the root record are cosidered as two separate subtrees, sice all calculatios begi at the root ad proceed either through the left subtree or alog the right subtree of the root. Suppose h < h, ad both key ad key are o the left subtree. The for key, it is complete up to the level (h ), ad there are k records at level h coutig from the left-most ode at the same height. Similarly, for key, it is complete up to the level (h ), ad there are k records at level h coutig from the leftmost ode. Sice, h < h, therefore, the total umber of odes i betwee key ad key, which are o the left subtree is, = ( h ) + k ( h ) k = (h + h + + h h ) + (k k ) = ( h h + + k k ) = h ( h h ) + (k k ). 43

4 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 Let h = h, ad both key ad key are o the left subtree. Sice the assumptio is that the keys are orgaized i ascedig order ad therefore, k < k. Hece, = (k k ). Suppose that h < h, ad k is o the left subtree ad k is o the right subtree. I this case, = ( h + k ) + ( h + h h ) + (k h ). Sice the tree is complete up to the level h, therefore of the total odes up to the h level lies o the left subtree, ad the rest are o the right subtree, ad k ad k are couted startig from the left-most ode o the left subtree. Hece, = (h ) + (h ) + k + k - (h ) = ( h + k + k ) = ( h + k + k ). Suppose that h > h, ad k is o the left subtree ad k is o the right subtree. I this case, = (h ) + (h ) + k +k - (h ) = ( h +k +k ) = ( h + k + k ). Suppose that h is equal to h, ad k is o the left subtree, ad k is o the right subtree. Here, = (h ) + (h ) + k + k - (h ) = ( h + k + k ) = ( h + k + k ). h < h, ad both key ad key are o the right subtree. For key, it is complete up to the level (h ), ad there are k records at level h coutig from the left. Similarly, for key, it is complete up to the level (h ), ad there are k records at level h coutig from the left. Sice h < h, therefore, the total umber of records i betwee key ad key, which are o the right subtree is, = ( h ) + (k (h )) ( h ) (k (h )) = ( h + h + h h +k k ) = ( h h )+(k k ). h = h, ad both key ad key are o the right subtree. Sice the assumptio is that the keys are orgaized i ascedig order, therefore, k < k. Hece, = k (h ) (k (h )) = k k. key is at the root ad key is o the right subtree. I that evet, key is at level ad the oly possible record. Assumig key is at level h, ad the BST is complete up to the level h, = + ( h )+(k ))) (iclusive) = + (h ) (h + k ) (h = k. key is o the left subtree ad key is the root ode. I that evet, key is at level ad the oly possible record. Assumig key is at level h, ad the BST is complete up to the level h, = + ( h )+k = + k + (h ) = k + h. Followig the aalysis of -key BST search, for the 3-key BST search, followig are the possible sceario: The first keys k ad k exist o the left subtree, ad the 3rd key, k 3 exists o the right subtree. I that evet, the subtree startig at k ad edig at k 3 (iclusive) icludes the root ode. The st key, k exists o the left subtree, ad the d ad the 3rd keys, k ad k 3, respectively, are o the right subtree. I that case, the subtree startig at k ad edig at k (iclusive) icludes the root, whereas the subtree startig at k ad edig at k 3 icludes oly a part of the right subtree. All 3 keys, k, k ad k 3 exist o the right subtree. I that evet, the subtree startig at k ad edig at k 3 (iclusive) does ot iclude the root. All 3 keys k, k ad k 3 exist o the left subtree. I this case also, the subtree startig at k ad edig at k 3 does ot iclude the root. k is o the left subtree, k is at the root ad k 3 is o the right subtree. I this case, the subtree startig at k ad edig at k 3 icludes the root (iclusive). k is at the root, k ad k 3 are o the right subtree. I this case also, the subtree startig at k ad edig at k 3 (iclusive) icludes the root ad a part of the right subtree oly. k ad k are o the left subtree ad k 3 is at the root. I that case, the subtree from k to k 3 (iclusive) icludes the root ode. B. Special Cosideratios st key is o the left subtree at level h h, ad the d key is at level h h o the right subtree coutig from the root ode. I this case, the subtree startig at k ad edig at k icludes the root. If k is the leftmost record ad k is the right-most record, the the total umber of records startig at k ad edig at k, = ( h )+ ( h ) = (h+ ) ( ) + (h+ ) ) = (h+ )+ (h+ ) = (h+ + h+ ) (sice from the assumptio, all the levels up to h ad h are complete o the left ad the right subtrees, respectively) = ( h + h ) = h + h = Maximum umber of records possible betwee k ad k (iclusive). If k is the right-most record o the left subtree at level h, ad k is the left-most record o the right subtree at level h. Assumig that all levels up to (h ) are complete o the left subtree, ad all the levels up to (h ) are complete o the right subtree as well. The = ( h ) + ) + ( h ) + ) = (h + ) + + ( h + ) ( ) + = h + + h + = h + h + = (h + h + ) = Miimum umber of odes (iclusive) possible betwee k ad k. Therefore, followig relatioship holds true for k i the left subtree ad k o the right oe: (h + h +) ( h + h ). Hece, ( max mi ) = ( h + h ) (h + h + ) = h + h. Let k is the left-most ode at level h i the left subtree ad k is the right-most ode at level h i the left subtree as well. Assumig all the itermediate levels icludig the levels at h ad h are complete, the total umber of odes (iclusive), = (h h ) = ( h + h h ) - ( h ) = ( (h + ) ( ) ) ( (h ) ( ) = h h + = ( h h ), which gives us the expressio for the maximum umber of records o the same subtree. Hece, 44

5 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 ( h h ). Let k be the right-most ode at level h, ad k is the left-most ode at level h o the same subtree. The h < h. Hece, the miimum umber of odes i betwee k ad k (iclusive) is = + (h h ) + = + ( h + h h ) - ( h ) = + ( h + ( ) ) ( (h+ ) ( ) = + (h ) (h+ ) = ( + h h ). Therefore, ( + h h ). If both the keys are o the same subtree, the the followig relatio holds true: ( + h h ) ( h h ). Hece, ( max mi ) = ( h h ) ( + h h ) = h + h. If key is at the root, ad key is o the right subtree, the k is at level, ad the oly possible ode. Assumig k is at level h, there are istaces possible. I oe istace, k is the right-most ode of the right subtree at level h. I that evet, max = + ( h ) (iclusive) = + (h+ ) = h. O the other had, if k is the left-most ode, ad the oly record available at level h, mi = + ( h ) + = + (h ) = + h = + h. With k at the root, ad k o the right subtree, followig is the restrictio: + h h. Also, ( max mi ) = ( h h ) = ( h ). If key is o the left subtree, ad key is at the root, the k is at level, ad the oly possible ode. Hece, max = + ( h ) (iclusive) = + (h+ ) = + h = h. Oce agai, mi = + ( h ) + (iclusive) = + (h ) = + h. Therefore, ( max mi ) = h h = h h = h. Next cosider a very special case of pruig the right subtree of the st key ad the left subtree of the d key i the two key BST Search together with the other odes from key to key. Further assume that key is o the left subtree ad key is o the right subtree. If key is at level h ad key is at level h with h h ad h h, where h is height of the BST, the the umber of odes i the right subtree of the st key = (h h ) = (h h +) = h h. Similarly, the total umber of odes i the left subtree of the d key = (h h ) = (h h +) = h h. These umbers may be computed by imagiig a BST subtree with root at the right child of the st key ad aother subtree havig the root at the left child of the d key. Off-course for this aalysis to hold true, the BST is required to be complete. If h < h, ad k is o the left subtree ad k is o the right subtree, = ( h + k + k ). Hece, total umber of odes i the prued subtree = + h h + h h = ( h + k + k ) + h h + h h Similarly, if h > h, total umber of odes i the prued subtree = ( h + k + k ) + h h + h h. Also if h = h, total umber of odes i the prued subtree = ( h + k + k ) + h h + h h. V. MULTI-KEY SEARCH PERFORMANCE I this sectio, the results pertaiig to multiple key-based searches i BSTs are cosidered. Theorem : The average cost of a usuccessful search is give by, C e = log e ( + ), ad the average cost C i for a successful search is = (log e -). Proof: Let E be the expected exteral path legth, ad I be the expected iteral path legth for a BST with odes. Therefore, followig recurrece relatio holds true: E o =, E = ( + ) + i= (E i + E i ). Here, ( + ) is to accout for the root ode cost for each exteral ode (there are ( + ) of them). i= (E i + E i ) accouts for the average exteral path legth of the left ad the right subtrees over with a arbitrary ith elemet at the i= E i). Hece, rewritig the root. But i= E i = expressio for E, E = (+)+ i= E i. The E = + i = E i, which provides: ( )E ( ) = i= E i. Now expadig the expressio for E, E = ( + ) + E + i= E i. From the previous expressio for E, i= E i = E. Hece, E = ( + ) + E + [( )E ( )]. From this last expressio, E = + (+) E. Expadig the recurrece relatioship for E, E = + (+) + (+) ( ) E = + (+) + (+) ( ) E = + (+) + (+) ( ) + (+) ( ) E 3 = + (+) i= i +(+)E = + (+) (+) i= i (+) (+) = (+) (+) i= i (as E = ) = (+)H +. Here, H + is the ( + )th Harmoic Fuctio. Usig the properties of Harmoic Fuctios, H + log e ( + ) + γ, where γ = Euler s costat.577. Hece, E ( + )(log e ( + E (+) ) + γ). The average cost for a usuccessful search is, = (log e ( + ) + γ) log e ( + ) (see []). The highest order term i this expressio is: log e ( + ). Therefore, C e log e. Agai, E = I +. This provides, I = (+)(log e (+)+γ). The average cost of a successful search is, I (+ )log e(+) (log e ( + ) + log e( + ) ). As,. Hece, C i log e (+). The highest order term i this expressio is, log e ( + ). As, log e ( + ) log e. Fially, C i (log e ). Hece, C i log e also. (a) o. of comparisos (+)(log e(+) o. of records, S() & U() curves differece i o. of comparisos, c-diff (b) o. of records, U() S() plot Fig.. Average umber of comparisos for successful (S()) ad usuccessful searches (U()) are plotted agaist the total umber of records,. (The lower curve i Fig. (a) represets the curve for successful searches). From the stadard DS literature, average umber of comparisos for a successful search, S() =.39log. Average umber of comparisos for a usuccessful search, U() = 45

6 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7.77log S(). Both S() ad U() depeds o log. The miimum value of is, mi =, ad the maximum value of is, max =,. For example, whe =, S() = 4.6, ad U() = 9. S(). Hece, the curve for average usuccessful search, U() follows almost exact patter to that of the successful search, S(). Agai, the differece betwee U() ad S() is, d() = U() S() =.77log -.39log =.38log S(). Therefore, the differece curve, d() i Fig. (b) has almost exactly the same patter as that of S(). VI. PERFORMANCE ISSUES IN PRACTICE Lemma 3: A m-key biary search tree search algorithm may be applied to ay BST cotaiig records, where >= m. Proof: A proof by cotradictio is adopted. Suppose that < m. Therefore, the total umber of keys to search for i the BST becomes greater tha the umber of records withi the BST. I the best possible case, differet keys may be idetified at the record positios, leavig (m-) keys udecided durig the computatio, for which, o records to look for may be available. This violates the objective of the m-key BST search, which is to idetify the BST records correspodig to the m- keys withi the BST. Hece, m, ad at most, m =. Theorem 4: A m-key BST search requires cosiderig (m+) differet cases i idetifyig the records correspodig to the m keys iside the BST. Here, m. Proof: Followig is a proof by mathematical iductio. Base Case: For the base case, m=. For P(), it is the classical, sigle key BST search. It cosiders 3-differet cases. These are: () key elemet = root value, () key elemet > root value, ad (3) key elemet < root value. Hece, ( + ) = 3 differet cases are beig cosidered. Iductio: Suppose that the k-key search algorithm requires cosiderig (k+) differet cases. Here, k. It is required to show that: [P() P(k)] P(k+), which is provig that for (k+) differet keys, ((k+) + ) = k+3 differet cases are required to be cosidered. For the (k + )th key, two more cases are required i additio to the (k +) cases for the first k keys. For the sorted keys, (k + )th key is the largest ad the last key withi the list. Therefore, it requires cosiderig oly additioal cases. First of all, verifyig whether the root value is equal to the (k + )th key value. If so, the (k + )th key is foud at the root, ad it is ecessary to use the k-key steps of the BST search to locate the first k-keys. Secodly, it is required to verify whether the (k + )th key is larger, ad the kth key is smaller tha the root ode. I that evet, cofie search for the (k + )th key to the right half of the BST usig a classical BST search, ad use the steps of the k-key BST search for the first k keys. Rest of the cases are idetical to the k-key versio except that it is required to cosider (k+) keys istead of k keys. Hece, altogether, for the (k+) key versio, we require cosiderig (k + + ) = (k + ) + differet cases. Coclusio: The theorem is true for m =. Assumig that the theorem holds true for m = k, it is proved that it also holds true for m = (k + ) differet keys. As it is true for m =, it is also true for m =. As it holds true for m =, it is also true for m = 3, ad so o. Hece, the theorem holds true for ay m with m. Average display time, Tavg i secods No. of records, Fig. 3. Average time to display the sorted tree, T i secods is plotted agaist the umber of records, iside the tree with data acquired usig the Borlad s C++ 5. compiler. Fig. 3 shows time, T required to display the odes i ascedig order usig i-order traversal of the BST, which is plotted agaist the size,. The curve is obtaied usig Borlad s C++ 5. compiler. The total time, T required to display the odes cotais two compoets. Oe is the fixed timig overhead, T o required by the program to ru o a platform. The other oe is the total time, T d to display the BST etries. Therefore, T = T o + T d. Iitially, from = to =, the time required to display the odes T d is isigificat compared to the timig overhead, T o. Therefore, T o domiates over T d, as proouced by the relatively flat ature of the curve withi this rage. For = to =,, T d becomes relatively much higher compared to T o, ad T d domiates over T o. Therefore, withi this rage, the total time cosumed depeds more o T d tha oly o T o, which may be realized by the icreasig ature of the curve. Fig. 4 shows the -key, the -key ad the 3-key BST iorder traversal times plotted agaist for usig the Java JDK 5. compiler ruig o Petium 4 machie. The total time take rapidly icreases with the icreasig umber of keys as the time to display the combiatios is approximately i the order of, O( m ). Here, is the umber of elemets ad m is the umber of keys. As m, m remais relatively costat with respect to, ad the curves display polyomial characteristic as expected. VII. CONCLUSION I this paper, some ew results o BST performace, ad the deviatio of the geerated BST structures from the correspodig optimal structures are also preseted. To search a array with speed, the array eeds to be sorted. Isertig ew odes i a ordered array is a pai. Agai, isertig ew odes i a liked list is easy; but searchig for a existig ode i a liked list is difficult. BSTs are data structures that combies the good properties of arrays ad liked lists, but has 46

7 INTERNATIONAL JOURNAL OF COMPUTERS AND COMMUNICATIONS Issue, Volume, 7 6 time, T i secods to search & display all key combiatios umber of odes, Fig. 4. Total time T total to search ad display all possible key combiatios for -key, -key, ad 3-key BST searches are plotted agaist the total umber of odes,. Topmost curve is for the 3-keys cosidered together. The middle oe is for possible -key combiatios, ad the lower most curve is for the casual -key BST search. Su Java s JDK 5 compiler was used i performace measuremet. oe of the bad parts. Hece, complete ad early complete BSTs draw special attetio to the data structure researchers. Efficiecy of a BST applicatio depeds o the depth of the tree, h. Therefore, a good umber of the results are based o the height, h-based performace of the BSTs. I the best possible sceario, the optimal depth is, h best = log (). If the keys are added at radom to a gradually growig BST structure, it results i a BST with a average height, h avg. For a average BST, h avg.39log (). Therefore, h avg is oly about 4% higher tha the best possible. I future, a dyamic programmig model for geeratig a optimal BST structure with the miimal iteral ad the exteral path legths will be developed, ad the related performace issues will be addressed. REFERENCES [] Ahmed Tarek, Height Size Performace of Complete ad Nearly Complete Biary Search Trees i Dictioary Applicatios, WSEAS Trasactios o Computers, 3 (7), 8, pp , ISSN: [] P. Scarfe ad E. Lidsay, Dyamic Memory Allocatio for CMAC usig Biary Search Trees, Proceedigs of the 8th WSEAS Iteratioal Coferece o Neural Networks, 7, pp

Analysis of Algorithms. Introduction. Contents

Analysis of Algorithms. Introduction. Contents Itroductio The focus of this module is mathematical aspects of algorithms. Our mai focus is aalysis of algorithms, which meas evaluatig efficiecy of algorithms by aalytical ad mathematical methods. We

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

4.3 Growth Rates of Solutions to Recurrences

4.3 Growth Rates of Solutions to Recurrences 4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.

More information

CS / MCS 401 Homework 3 grader solutions

CS / MCS 401 Homework 3 grader solutions CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of

More information

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary Recursive Algorithm for Geeratig Partitios of a Iteger Sug-Hyuk Cha Computer Sciece Departmet, Pace Uiversity 1 Pace Plaza, New York, NY 10038 USA scha@pace.edu Abstract. This article first reviews the

More information

Rank Modulation with Multiplicity

Rank Modulation with Multiplicity Rak Modulatio with Multiplicity Axiao (Adrew) Jiag Computer Sciece ad Eg. Dept. Texas A&M Uiversity College Statio, TX 778 ajiag@cse.tamu.edu Abstract Rak modulatio is a scheme that uses the relative order

More information

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES Peter M. Maurer Why Hashig is θ(). As i biary search, hashig assumes that keys are stored i a array which is idexed by a iteger. However, hashig attempts to bypass

More information

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ. 2 5. Weighted umber of late jobs 5.1. Release dates ad due dates: maximimizig the weight of o-time jobs Oce we add release dates, miimizig the umber of late jobs becomes a sigificatly harder problem. For

More information

Fortgeschrittene Datenstrukturen Vorlesung 11

Fortgeschrittene Datenstrukturen Vorlesung 11 Fortgeschrittee Datestruture Vorlesug 11 Schriftführer: Marti Weider 19.01.2012 1 Succict Data Structures (ctd.) 1.1 Select-Queries A slightly differet approach, compared to ra, is used for select. B represets

More information

Infinite Sequences and Series

Infinite Sequences and Series Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet

More information

Classification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)

Classification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc) Classificatio of problem & problem solvig strategies classificatio of time complexities (liear, arithmic etc) Problem subdivisio Divide ad Coquer strategy. Asymptotic otatios, lower boud ad upper boud:

More information

Information-based Feature Selection

Information-based Feature Selection Iformatio-based Feature Selectio Farza Faria, Abbas Kazeroui, Afshi Babveyh Email: {faria,abbask,afshib}@staford.edu 1 Itroductio Feature selectio is a topic of great iterest i applicatios dealig with

More information

Optimally Sparse SVMs

Optimally Sparse SVMs A. Proof of Lemma 3. We here prove a lower boud o the umber of support vectors to achieve geeralizatio bouds of the form which we cosider. Importatly, this result holds ot oly for liear classifiers, but

More information

CS161: Algorithm Design and Analysis Handout #10 Stanford University Wednesday, 10 February 2016

CS161: Algorithm Design and Analysis Handout #10 Stanford University Wednesday, 10 February 2016 CS161: Algorithm Desig ad Aalysis Hadout #10 Staford Uiversity Wedesday, 10 February 2016 Lecture #11: Wedesday, 10 February 2016 Topics: Example midterm problems ad solutios from a log time ago Sprig

More information

A Block Cipher Using Linear Congruences

A Block Cipher Using Linear Congruences Joural of Computer Sciece 3 (7): 556-560, 2007 ISSN 1549-3636 2007 Sciece Publicatios A Block Cipher Usig Liear Cogrueces 1 V.U.K. Sastry ad 2 V. Jaaki 1 Academic Affairs, Sreeidhi Istitute of Sciece &

More information

Polynomial identity testing and global minimum cut

Polynomial identity testing and global minimum cut CHAPTER 6 Polyomial idetity testig ad global miimum cut I this lecture we will cosider two further problems that ca be solved usig probabilistic algorithms. I the first half, we will cosider the problem

More information

Exponents. Learning Objectives. Pre-Activity

Exponents. Learning Objectives. Pre-Activity Sectio. Pre-Activity Preparatio Epoets A Chai Letter Chai letters are geerated every day. If you sed a chai letter to three frieds ad they each sed it o to three frieds, who each sed it o to three frieds,

More information

Linear chord diagrams with long chords

Linear chord diagrams with long chords Liear chord diagrams with log chords Everett Sulliva Departmet of Mathematics Dartmouth College Haover New Hampshire, U.S.A. everett..sulliva@dartmouth.edu Submitted: Feb 7, 2017; Accepted: Oct 7, 2017;

More information

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution EEL5: Discrete-Time Sigals ad Systems. Itroductio I this set of otes, we begi our mathematical treatmet of discrete-time s. As show i Figure, a discrete-time operates or trasforms some iput sequece x [

More information

Parallel Vector Algorithms David A. Padua

Parallel Vector Algorithms David A. Padua Parallel Vector Algorithms 1 of 32 Itroductio Next, we study several algorithms where parallelism ca be easily expressed i terms of array operatios. We will use Fortra 90 to represet these algorithms.

More information

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects

More information

Average-Case Analysis of QuickSort

Average-Case Analysis of QuickSort Average-Case Aalysis of QuickSort Comp 363 Fall Semester 003 October 3, 003 The purpose of this documet is to itroduce the idea of usig recurrece relatios to do average-case aalysis. The average-case ruig

More information

CALCULATION OF FIBONACCI VECTORS

CALCULATION OF FIBONACCI VECTORS CALCULATION OF FIBONACCI VECTORS Stuart D. Aderso Departmet of Physics, Ithaca College 953 Daby Road, Ithaca NY 14850, USA email: saderso@ithaca.edu ad Dai Novak Departmet of Mathematics, Ithaca College

More information

Probability, Expectation Value and Uncertainty

Probability, Expectation Value and Uncertainty Chapter 1 Probability, Expectatio Value ad Ucertaity We have see that the physically observable properties of a quatum system are represeted by Hermitea operators (also referred to as observables ) such

More information

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,

More information

CALCULATING FIBONACCI VECTORS

CALCULATING FIBONACCI VECTORS THE GENERALIZED BINET FORMULA FOR CALCULATING FIBONACCI VECTORS Stuart D Aderso Departmet of Physics, Ithaca College 953 Daby Road, Ithaca NY 14850, USA email: saderso@ithacaedu ad Dai Novak Departmet

More information

Lesson 10: Limits and Continuity

Lesson 10: Limits and Continuity www.scimsacademy.com Lesso 10: Limits ad Cotiuity SCIMS Academy 1 Limit of a fuctio The cocept of limit of a fuctio is cetral to all other cocepts i calculus (like cotiuity, derivative, defiite itegrals

More information

Algorithm Analysis. Algorithms that are equally correct can vary in their utilization of computational resources

Algorithm Analysis. Algorithms that are equally correct can vary in their utilization of computational resources Algorithm Aalysis Algorithms that are equally correct ca vary i their utilizatio of computatioal resources time ad memory a slow program it is likely ot to be used a program that demads too much memory

More information

Scheduling under Uncertainty using MILP Sensitivity Analysis

Scheduling under Uncertainty using MILP Sensitivity Analysis Schedulig uder Ucertaity usig MILP Sesitivity Aalysis M. Ierapetritou ad Zheya Jia Departmet of Chemical & Biochemical Egieerig Rutgers, the State Uiversity of New Jersey Piscataway, NJ Abstract The aim

More information

Principle Of Superposition

Principle Of Superposition ecture 5: PREIMINRY CONCEP O RUCUR NYI Priciple Of uperpositio Mathematically, the priciple of superpositio is stated as ( a ) G( a ) G( ) G a a or for a liear structural system, the respose at a give

More information

CS284A: Representations and Algorithms in Molecular Biology

CS284A: Representations and Algorithms in Molecular Biology CS284A: Represetatios ad Algorithms i Molecular Biology Scribe Notes o Lectures 3 & 4: Motif Discovery via Eumeratio & Motif Represetatio Usig Positio Weight Matrix Joshua Gervi Based o presetatios by

More information

Module 5 EMBEDDED WAVELET CODING. Version 2 ECE IIT, Kharagpur

Module 5 EMBEDDED WAVELET CODING. Version 2 ECE IIT, Kharagpur Module 5 EMBEDDED WAVELET CODING Versio ECE IIT, Kharagpur Lesso 4 SPIHT algorithm Versio ECE IIT, Kharagpur Istructioal Objectives At the ed of this lesso, the studets should be able to:. State the limitatios

More information

CSE 202 Homework 1 Matthias Springer, A Yes, there does always exist a perfect matching without a strong instability.

CSE 202 Homework 1 Matthias Springer, A Yes, there does always exist a perfect matching without a strong instability. CSE 0 Homework 1 Matthias Spriger, A9950078 1 Problem 1 Notatio a b meas that a is matched to b. a < b c meas that b likes c more tha a. Equality idicates a tie. Strog istability Yes, there does always

More information

Chapter 22 Developing Efficient Algorithms

Chapter 22 Developing Efficient Algorithms Chapter Developig Efficiet Algorithms 1 Executig Time Suppose two algorithms perform the same task such as search (liear search vs. biary search). Which oe is better? Oe possible approach to aswer this

More information

Problem Set 2 Solutions

Problem Set 2 Solutions CS271 Radomess & Computatio, Sprig 2018 Problem Set 2 Solutios Poit totals are i the margi; the maximum total umber of poits was 52. 1. Probabilistic method for domiatig sets 6pts Pick a radom subset S

More information

1 Hash tables. 1.1 Implementation

1 Hash tables. 1.1 Implementation Lecture 8 Hash Tables, Uiversal Hash Fuctios, Balls ad Bis Scribes: Luke Johsto, Moses Charikar, G. Valiat Date: Oct 18, 2017 Adapted From Virgiia Williams lecture otes 1 Hash tables A hash table is a

More information

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram.

Summary: CORRELATION & LINEAR REGRESSION. GC. Students are advised to refer to lecture notes for the GC operations to obtain scatter diagram. Key Cocepts: 1) Sketchig of scatter diagram The scatter diagram of bivariate (i.e. cotaiig two variables) data ca be easily obtaied usig GC. Studets are advised to refer to lecture otes for the GC operatios

More information

Problem Cosider the curve give parametrically as x = si t ad y = + cos t for» t» ß: (a) Describe the path this traverses: Where does it start (whe t =

Problem Cosider the curve give parametrically as x = si t ad y = + cos t for» t» ß: (a) Describe the path this traverses: Where does it start (whe t = Mathematics Summer Wilso Fial Exam August 8, ANSWERS Problem 1 (a) Fid the solutio to y +x y = e x x that satisfies y() = 5 : This is already i the form we used for a first order liear differetial equatio,

More information

Math 155 (Lecture 3)

Math 155 (Lecture 3) Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,

More information

A statistical method to determine sample size to estimate characteristic value of soil parameters

A statistical method to determine sample size to estimate characteristic value of soil parameters A statistical method to determie sample size to estimate characteristic value of soil parameters Y. Hojo, B. Setiawa 2 ad M. Suzuki 3 Abstract Sample size is a importat factor to be cosidered i determiig

More information

Disjoint set (Union-Find)

Disjoint set (Union-Find) CS124 Lecture 7 Fall 2018 Disjoit set (Uio-Fid) For Kruskal s algorithm for the miimum spaig tree problem, we foud that we eeded a data structure for maitaiig a collectio of disjoit sets. That is, we eed

More information

Resolution Proofs of Generalized Pigeonhole Principles

Resolution Proofs of Generalized Pigeonhole Principles Resolutio Proofs of Geeralized Pigeohole Priciples Samuel R. Buss Departmet of Mathematics Uiversity of Califoria, Berkeley Győrgy Turá Departmet of Mathematics, Statistics, ad Computer Sciece Uiversity

More information

1 of 7 7/16/2009 6:06 AM Virtual Laboratories > 6. Radom Samples > 1 2 3 4 5 6 7 6. Order Statistics Defiitios Suppose agai that we have a basic radom experimet, ad that X is a real-valued radom variable

More information

An Introduction to Randomized Algorithms

An Introduction to Randomized Algorithms A Itroductio to Radomized Algorithms The focus of this lecture is to study a radomized algorithm for quick sort, aalyze it usig probabilistic recurrece relatios, ad also provide more geeral tools for aalysis

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22 CS 70 Discrete Mathematics for CS Sprig 2007 Luca Trevisa Lecture 22 Aother Importat Distributio The Geometric Distributio Questio: A biased coi with Heads probability p is tossed repeatedly util the first

More information

SNAP Centre Workshop. Basic Algebraic Manipulation

SNAP Centre Workshop. Basic Algebraic Manipulation SNAP Cetre Workshop Basic Algebraic Maipulatio 8 Simplifyig Algebraic Expressios Whe a expressio is writte i the most compact maer possible, it is cosidered to be simplified. Not Simplified: x(x + 4x)

More information

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + 62. Power series Defiitio 16. (Power series) Give a sequece {c }, the series c x = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + is called a power series i the variable x. The umbers c are called the coefficiets of

More information

Lecture 9: Hierarchy Theorems

Lecture 9: Hierarchy Theorems IAS/PCMI Summer Sessio 2000 Clay Mathematics Udergraduate Program Basic Course o Computatioal Complexity Lecture 9: Hierarchy Theorems David Mix Barrigto ad Alexis Maciel July 27, 2000 Most of this lecture

More information

Intensive Algorithms Lecture 11. DFT and DP. Lecturer: Daniel A. Spielman February 20, f(n) O(g(n) log c g(n)).

Intensive Algorithms Lecture 11. DFT and DP. Lecturer: Daniel A. Spielman February 20, f(n) O(g(n) log c g(n)). Itesive Algorithms Lecture 11 DFT ad DP Lecturer: Daiel A. Spielma February 20, 2018 11.1 Itroductio The purpose of this lecture is to lear how use the Discrete Fourier Trasform to save space i Dyamic

More information

SINGLE-CHANNEL QUEUING PROBLEMS APPROACH

SINGLE-CHANNEL QUEUING PROBLEMS APPROACH SINGLE-CHANNEL QUEUING ROBLEMS AROACH Abdurrzzag TAMTAM, Doctoral Degree rogramme () Dept. of Telecommuicatios, FEEC, BUT E-mail: xtamta@stud.feec.vutbr.cz Supervised by: Dr. Karol Molár ABSTRACT The paper

More information

Quadratic Functions. Before we start looking at polynomials, we should know some common terminology.

Quadratic Functions. Before we start looking at polynomials, we should know some common terminology. Quadratic Fuctios I this sectio we begi the study of fuctios defied by polyomial expressios. Polyomial ad ratioal fuctios are the most commo fuctios used to model data, ad are used extesively i mathematical

More information

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING Lectures MODULE 5 STATISTICS II. Mea ad stadard error of sample data. Biomial distributio. Normal distributio 4. Samplig 5. Cofidece itervals

More information

REGRESSION (Physics 1210 Notes, Partial Modified Appendix A)

REGRESSION (Physics 1210 Notes, Partial Modified Appendix A) REGRESSION (Physics 0 Notes, Partial Modified Appedix A) HOW TO PERFORM A LINEAR REGRESSION Cosider the followig data poits ad their graph (Table I ad Figure ): X Y 0 3 5 3 7 4 9 5 Table : Example Data

More information

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo Coutig Methods CSE 191, Class Note 05: Coutig Methods Computer Sci & Eg Dept SUNY Buffalo c Xi He (Uiversity at Buffalo CSE 191 Discrete Structures 1 / 48 Need for Coutig The problem of coutig the umber

More information

TEACHER CERTIFICATION STUDY GUIDE

TEACHER CERTIFICATION STUDY GUIDE COMPETENCY 1. ALGEBRA SKILL 1.1 1.1a. ALGEBRAIC STRUCTURES Kow why the real ad complex umbers are each a field, ad that particular rigs are ot fields (e.g., itegers, polyomial rigs, matrix rigs) Algebra

More information

A PROOF OF THE TWIN PRIME CONJECTURE AND OTHER POSSIBLE APPLICATIONS

A PROOF OF THE TWIN PRIME CONJECTURE AND OTHER POSSIBLE APPLICATIONS A PROOF OF THE TWI PRIME COJECTURE AD OTHER POSSIBLE APPLICATIOS by PAUL S. BRUCKMA 38 Frot Street, #3 aaimo, BC V9R B8 (Caada) e-mail : pbruckma@hotmail.com ABSTRACT : A elemetary proof of the Twi Prime

More information

Mathematical Induction

Mathematical Induction Mathematical Iductio Itroductio Mathematical iductio, or just iductio, is a proof techique. Suppose that for every atural umber, P() is a statemet. We wish to show that all statemets P() are true. I a

More information

Mathematics review for CSCI 303 Spring Department of Computer Science College of William & Mary Robert Michael Lewis

Mathematics review for CSCI 303 Spring Department of Computer Science College of William & Mary Robert Michael Lewis Mathematics review for CSCI 303 Sprig 019 Departmet of Computer Sciece College of William & Mary Robert Michael Lewis Copyright 018 019 Robert Michael Lewis Versio geerated: 13 : 00 Jauary 17, 019 Cotets

More information

Lecture 20. Brief Review of Gram-Schmidt and Gauss s Algorithm

Lecture 20. Brief Review of Gram-Schmidt and Gauss s Algorithm 8.409 A Algorithmist s Toolkit Nov. 9, 2009 Lecturer: Joatha Keler Lecture 20 Brief Review of Gram-Schmidt ad Gauss s Algorithm Our mai task of this lecture is to show a polyomial time algorithm which

More information

Rademacher Complexity

Rademacher Complexity EECS 598: Statistical Learig Theory, Witer 204 Topic 0 Rademacher Complexity Lecturer: Clayto Scott Scribe: Ya Deg, Kevi Moo Disclaimer: These otes have ot bee subjected to the usual scrutiy reserved for

More information

Some examples of vector spaces

Some examples of vector spaces Roberto s Notes o Liear Algebra Chapter 11: Vector spaces Sectio 2 Some examples of vector spaces What you eed to kow already: The te axioms eeded to idetify a vector space. What you ca lear here: Some

More information

ACCESSIBLE INDEPENDENCE RESULTS FOR PEANO ARITHMETIC

ACCESSIBLE INDEPENDENCE RESULTS FOR PEANO ARITHMETIC ACCESSIBLE INDEPENDENCE RESULTS FOR PEANO ARITHMETIC LAURIE KIRBY AND JEFF PARIS Recetly some iterestig first-order statemets idepedet of Peao Arithmetic (P) have bee foud. Here we preset perhaps the first

More information

Lecture 19: Convergence

Lecture 19: Convergence Lecture 19: Covergece Asymptotic approach I statistical aalysis or iferece, a key to the success of fidig a good procedure is beig able to fid some momets ad/or distributios of various statistics. I may

More information

CS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2

CS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2 Geeral remarks Week 2 1 Divide ad First we cosider a importat tool for the aalysis of algorithms: Big-Oh. The we itroduce a importat algorithmic paradigm:. We coclude by presetig ad aalysig two examples.

More information

Polynomial Functions and Their Graphs

Polynomial Functions and Their Graphs Polyomial Fuctios ad Their Graphs I this sectio we begi the study of fuctios defied by polyomial expressios. Polyomial ad ratioal fuctios are the most commo fuctios used to model data, ad are used extesively

More information

Statistics 511 Additional Materials

Statistics 511 Additional Materials Cofidece Itervals o mu Statistics 511 Additioal Materials This topic officially moves us from probability to statistics. We begi to discuss makig ifereces about the populatio. Oe way to differetiate probability

More information

Double Stage Shrinkage Estimator of Two Parameters. Generalized Exponential Distribution

Double Stage Shrinkage Estimator of Two Parameters. Generalized Exponential Distribution Iteratioal Mathematical Forum, Vol., 3, o. 3, 3-53 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/.9/imf.3.335 Double Stage Shrikage Estimator of Two Parameters Geeralized Expoetial Distributio Alaa M.

More information

Commutativity in Permutation Groups

Commutativity in Permutation Groups Commutativity i Permutatio Groups Richard Wito, PhD Abstract I the group Sym(S) of permutatios o a oempty set S, fixed poits ad trasiet poits are defied Prelimiary results o fixed ad trasiet poits are

More information

Solutions for the Exam 9 January 2012

Solutions for the Exam 9 January 2012 Mastermath ad LNMB Course: Discrete Optimizatio Solutios for the Exam 9 Jauary 2012 Utrecht Uiversity, Educatorium, 15:15 18:15 The examiatio lasts 3 hours. Gradig will be doe before Jauary 23, 2012. Studets

More information

x a x a Lecture 2 Series (See Chapter 1 in Boas)

x a x a Lecture 2 Series (See Chapter 1 in Boas) Lecture Series (See Chapter i Boas) A basic ad very powerful (if pedestria, recall we are lazy AD smart) way to solve ay differetial (or itegral) equatio is via a series expasio of the correspodig solutio

More information

Basics of Probability Theory (for Theory of Computation courses)

Basics of Probability Theory (for Theory of Computation courses) Basics of Probability Theory (for Theory of Computatio courses) Oded Goldreich Departmet of Computer Sciece Weizma Istitute of Sciece Rehovot, Israel. oded.goldreich@weizma.ac.il November 24, 2008 Preface.

More information

Section 1 of Unit 03 (Pure Mathematics 3) Algebra

Section 1 of Unit 03 (Pure Mathematics 3) Algebra Sectio 1 of Uit 0 (Pure Mathematics ) Algebra Recommeded Prior Kowledge Studets should have studied the algebraic techiques i Pure Mathematics 1. Cotet This Sectio should be studied early i the course

More information

A CAT Algorithm for Generating Permutations with a Fixed Number of Inversions

A CAT Algorithm for Generating Permutations with a Fixed Number of Inversions A CAT Algorithm for Geeratig Permutatios with a Fixed Number of Iversios Scott Effler Frak Ruskey Departmet of Computer Sciece, Uiversity of Victoria, Caada Abstract We develop a costat amortized time

More information

CEE 522 Autumn Uncertainty Concepts for Geotechnical Engineering

CEE 522 Autumn Uncertainty Concepts for Geotechnical Engineering CEE 5 Autum 005 Ucertaity Cocepts for Geotechical Egieerig Basic Termiology Set A set is a collectio of (mutually exclusive) objects or evets. The sample space is the (collectively exhaustive) collectio

More information

Math 609/597: Cryptography 1

Math 609/597: Cryptography 1 Math 609/597: Cryptography 1 The Solovay-Strasse Primality Test 12 October, 1993 Burt Roseberg Revised: 6 October, 2000 1 Itroductio We describe the Solovay-Strasse primality test. There is quite a bit

More information

Topic 9: Sampling Distributions of Estimators

Topic 9: Sampling Distributions of Estimators Topic 9: Samplig Distributios of Estimators Course 003, 2016 Page 0 Samplig distributios of estimators Sice our estimators are statistics (particular fuctios of radom variables), their distributio ca be

More information

Posted-Price, Sealed-Bid Auctions

Posted-Price, Sealed-Bid Auctions Posted-Price, Sealed-Bid Auctios Professors Greewald ad Oyakawa 207-02-08 We itroduce the posted-price, sealed-bid auctio. This auctio format itroduces the idea of approximatios. We describe how well this

More information

Math 61CM - Solutions to homework 3

Math 61CM - Solutions to homework 3 Math 6CM - Solutios to homework 3 Cédric De Groote October 2 th, 208 Problem : Let F be a field, m 0 a fixed oegative iteger ad let V = {a 0 + a x + + a m x m a 0,, a m F} be the vector space cosistig

More information

Math 2784 (or 2794W) University of Connecticut

Math 2784 (or 2794W) University of Connecticut ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really

More information

Section 11.8: Power Series

Section 11.8: Power Series Sectio 11.8: Power Series 1. Power Series I this sectio, we cosider geeralizig the cocept of a series. Recall that a series is a ifiite sum of umbers a. We ca talk about whether or ot it coverges ad i

More information

2.4 - Sequences and Series

2.4 - Sequences and Series 2.4 - Sequeces ad Series Sequeces A sequece is a ordered list of elemets. Defiitio 1 A sequece is a fuctio from a subset of the set of itegers (usually either the set 80, 1, 2, 3,... < or the set 81, 2,

More information

Divide & Conquer. Divide-and-conquer algorithms. Conventional product of polynomials. Conventional product of polynomials.

Divide & Conquer. Divide-and-conquer algorithms. Conventional product of polynomials. Conventional product of polynomials. Divide-ad-coquer algorithms Divide & Coquer Strategy: Divide the problem ito smaller subproblems of the same type of problem Solve the subproblems recursively Combie the aswers to solve the origial problem

More information

Scenario Reduction Algorithm and Creation of Multi-Stage Scenario Trees

Scenario Reduction Algorithm and Creation of Multi-Stage Scenario Trees Fakulteta za Elektrotehiko Heike Brad, Eva Thori, Christoph Weber Sceario Reductio Algorithm ad Creatio of Multi-Stage Sceario Trees OSCOGEN Discussio Paper No. 7 Cotract No. ENK5-CT-2000-00094 Project

More information

Optimization Methods MIT 2.098/6.255/ Final exam

Optimization Methods MIT 2.098/6.255/ Final exam Optimizatio Methods MIT 2.098/6.255/15.093 Fial exam Date Give: December 19th, 2006 P1. [30 pts] Classify the followig statemets as true or false. All aswers must be well-justified, either through a short

More information

A New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem

A New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem This is the Pre-Published Versio. A New Solutio Method for the Fiite-Horizo Discrete-Time EOQ Problem Chug-Lu Li Departmet of Logistics The Hog Kog Polytechic Uiversity Hug Hom, Kowloo, Hog Kog Phoe: +852-2766-7410

More information

CS322: Network Analysis. Problem Set 2 - Fall 2009

CS322: Network Analysis. Problem Set 2 - Fall 2009 Due October 9 009 i class CS3: Network Aalysis Problem Set - Fall 009 If you have ay questios regardig the problems set, sed a email to the course assistats: simlac@staford.edu ad peleato@staford.edu.

More information

Analysis of Algorithms -Quicksort-

Analysis of Algorithms -Quicksort- Aalysis of Algorithms -- Adreas Ermedahl MRTC (Mälardales Real-Time Research Ceter) adreas.ermedahl@mdh.se Autum 2004 Proposed by C.A.R. Hoare i 962 Worst- case ruig time: Θ( 2 ) Expected ruig time: Θ(

More information

Topic 5: Basics of Probability

Topic 5: Basics of Probability Topic 5: Jue 1, 2011 1 Itroductio Mathematical structures lie Euclidea geometry or algebraic fields are defied by a set of axioms. Mathematical reality is the developed through the itroductio of cocepts

More information

6.3 Testing Series With Positive Terms

6.3 Testing Series With Positive Terms 6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial

More information

Design and Analysis of ALGORITHM (Topic 2)

Design and Analysis of ALGORITHM (Topic 2) DR. Gatot F. Hertoo, MSc. Desig ad Aalysis of ALGORITHM (Topic 2) Algorithms + Data Structures = Programs Lessos Leared 1 Our Machie Model: Assumptios Geeric Radom Access Machie (RAM) Executes operatios

More information

On Algorithm for the Minimum Spanning Trees Problem with Diameter Bounded Below

On Algorithm for the Minimum Spanning Trees Problem with Diameter Bounded Below O Algorithm for the Miimum Spaig Trees Problem with Diameter Bouded Below Edward Kh. Gimadi 1,2, Alexey M. Istomi 1, ad Ekateria Yu. Shi 2 1 Sobolev Istitute of Mathematics, 4 Acad. Koptyug aveue, 630090

More information

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018) Radomized Algorithms I, Sprig 08, Departmet of Computer Sciece, Uiversity of Helsiki Homework : Solutios Discussed Jauary 5, 08). Exercise.: Cosider the followig balls-ad-bi game. We start with oe black

More information

NUMERICAL METHODS FOR SOLVING EQUATIONS

NUMERICAL METHODS FOR SOLVING EQUATIONS Mathematics Revisio Guides Numerical Methods for Solvig Equatios Page 1 of 11 M.K. HOME TUITION Mathematics Revisio Guides Level: GCSE Higher Tier NUMERICAL METHODS FOR SOLVING EQUATIONS Versio:. Date:

More information

Complex Stochastic Boolean Systems: Generating and Counting the Binary n-tuples Intrinsically Less or Greater than u

Complex Stochastic Boolean Systems: Generating and Counting the Binary n-tuples Intrinsically Less or Greater than u Proceedigs of the World Cogress o Egieerig ad Computer Sciece 29 Vol I WCECS 29, October 2-22, 29, Sa Fracisco, USA Complex Stochastic Boolea Systems: Geeratig ad Coutig the Biary -Tuples Itrisically Less

More information

Model of Computation and Runtime Analysis

Model of Computation and Runtime Analysis Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map

More information

Advanced Course of Algorithm Design and Analysis

Advanced Course of Algorithm Design and Analysis Differet complexity measures Advaced Course of Algorithm Desig ad Aalysis Asymptotic complexity Big-Oh otatio Properties of O otatio Aalysis of simple algorithms A algorithm may may have differet executio

More information

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3 MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special

More information

Math F215: Induction April 7, 2013

Math F215: Induction April 7, 2013 Math F25: Iductio April 7, 203 Iductio is used to prove that a collectio of statemets P(k) depedig o k N are all true. A statemet is simply a mathematical phrase that must be either true or false. Here

More information

Properties and Hypothesis Testing

Properties and Hypothesis Testing Chapter 3 Properties ad Hypothesis Testig 3.1 Types of data The regressio techiques developed i previous chapters ca be applied to three differet kids of data. 1. Cross-sectioal data. 2. Time series data.

More information

Roger Apéry's proof that zeta(3) is irrational

Roger Apéry's proof that zeta(3) is irrational Cliff Bott cliffbott@hotmail.com 11 October 2011 Roger Apéry's proof that zeta(3) is irratioal Roger Apéry developed a method for searchig for cotiued fractio represetatios of umbers that have a form such

More information