TREES. General Binary Trees The Search Tree ADT Binary Search Trees AVL Trees Threaded trees Splay Trees B-Trees. UNIT -II

Size: px
Start display at page:

Download "TREES. General Binary Trees The Search Tree ADT Binary Search Trees AVL Trees Threaded trees Splay Trees B-Trees. UNIT -II"

Transcription

1 UNIT -II TREES General Binary Trees Te Searc Tree DT Binary Searc Trees VL Trees Treaded trees Splay Trees B-Trees. 2MRKS Q& 1. Define Tree tree is a data structure, wic represents ierarcical relationsip Between individual data item. tree is a finite set one or more nodes suc tat Tere is a specially designated node called root. Te remaining nodes are partitioned into n>= 0 disjoint sets a, b, c, d. n Were a, b, c, d are called te s te root tree is sown in te following fig. T L R a b c d 2.Define Non-linear data structure. (OR) Give two examples non-linear data structures, wic are widely used. (pr/may2004) Data structure, wic is capable expressing more complex relationsip tan tat pysical adjacent, is called non-linear data structure. Example: Trees, grap, lists 1

2 3.Wat is meant by Binary tree? (pr/may2004) binary tree is a finite set nodes wic is eiter empty or consists a root and two disjoint binary trees called te left sub-tree and rigt sub-tree.(or)in an m-ary tree, if m=2, ten it is a binary tre Eac node as not more tan 2 cild nodes, eac wic may be a Leaf node. pplication: Binary tree is used in data processing. File index scemes Hierarcical database management systems. 4. Wat are te various operations performed on binary tree using linked representation? Te operation binary tree tat use linked list representation are, Insertion Insert a given item into a tree. Traversal Processing te nodes te tree one by one. Searc Searc for te specified item. Copying To obtain te exact copy te given tree. Deletion Delete an item from te tree. 5. Wat are te two metods binary tree implementation? Two metods to implement binary tree are, Linear representation. Linked representation. 6. Wat are te different types tree traversal tecnique? (pr/may2004) Te different types tree traversal tecnique are, Pre-order traversal yields prefix form expression. In-order traversal - yields Infix form expression. Post- order traversal - yields Postfix form expression. 7. Define Pre-order traversal. Pre-order traversal entains te following steps: Process te root node. Process te left. Process te rigt. E.g. + B O/P: +B 2

3 8.Define Post- order traversal. Post- order traversal entrains te following steps: Process te left. Process te rigt. Process te root node. E.g. + O/P: B+ B 9. Define In-order traversal. In-order traversal entains te following steps: Process te left. Process te root node. Process te rigt. E.g. + O/P: +B B 10.Define complete binary tree. binary tree is said to be a complete binary tree, if all its level, except possibly te last level, ave te maximum number possible nodes, all te nodes at te last level appear as far left as possible. T L R B C 11.Define Full binary tree. binary tree is a full binary tree, if it contains maximum possible number nodes in all level. 3

4 T L R B C D 12. Sow te postorder traversal te following binary searc tree: 13. For te following code fragment, use summations to calculate te exact number times te inner for loop executes, and give a tigt upper bound (Big-O analysis) te running time. Include an evaluation te summations. for ( int i = 0; i < n * n; i++ ) for ( int j = 0; j < i; j++ ) sum ++; 14. Te following algoritm determines if an integer i exists suc tat [i] = i in an array increasing integers; it returns i if it exists and -1 if not. Give te recurrence relation tat represents te running time te algoritm. Solve te recurrence relation using one te metods sown in class and give a tigt upper bound (Big-O analysis) te running time. Do NOT include te pro tat te solution to your recurrence relation is correct. int findmatc (, p, q ) if p < q m ( p + q ) / 2; 4

5 if [ m ] = m return m; else if m < [ m ] return findmatc(, p, m-1 ); else return findmatc(, m+1, q ); return -1; 15. Wat is meant by eigt balanced trees or VL trees? tree is said to be eigt balanced if all its nodes ave a balance factor 1, 0 or 1.Heigt balancing, attempts to maintain trees tat posses te ordering property in a form close to fullness. VL dulation VelsKii and Landis. 16. Wat is a balance factor in VL trees? Balance factor a node is defined to be te difference between te eigts te node s left and te eigt te node s rigt. 17. Define VL rotation. Manipulation tree pointers is centered at te pivot node to bring te tree into eigt balance. Te visual effect tis pointer manipulation is to rotate te wose root is te pivot node. Tis operation is referred as VL rotation. 18. Wat are te four-different cases pointer manipulations done in VL rotation? Te four-different cases pointer manipulations are, Insertion occurred in te left te left cild te pivot node. Insertion occurred in te rigt te rigt cild te pivot node. Insertion occurred in te rigt te left cild te pivot node. Insertion occurred in te left te rigt cild te pivot nod 19. Define Binary Searc tree. Binary Searc tree t is a binary tree; eiter it is empty or eac node in te tree contains an identifier and ll identifier in te left t are less (numerically or alpanumerically) tan te identifier in te root Node +. ll identifier in te rigt t are greater tan te identifier in te root Node +. 5

6 Te left and rigt s t are also binary searc trees. 20. Write all te Tree Terminologies? 1. Root: Tis is te unique node in te tree to wic furter sub-trees are attaced. In te Fig 1 is te root node. 2. degree te node Te total number sub-trees attaced to tat node is called te degree te node. For node te degree is 3, for node E te dgree is Leaves Tese are te terminal nodes te tree. Te nodes wit degree 0 are always te leaves. Here in our example E, F, C, G, H are te leaf nodes. B C D E F G Fig 1 4. Parent node Te node wic is aving furter sub-brances is called te parent node tose sub-brances. In te above fig te node B is parent node E, F, G nodes. nd E, F, G are called te cildren te parent B. 5. Siblings Nodes wit te same parent are siblings. Here node B is parent E, F, G called siblings. 21. Wat is meant by Level te tree? Te root node is always considered at level zero, ten its adjacent cildren are supposed to be at level 1 and so on. To understand te concept level, Fig 1 te node is at level 0, te nodes B, C, D are at level 1. te nodes E, F, G, H are at level 2. H 22. Wat is te Heigt te Tree? B C D E F G H 6

7 Te maximum level is te eigt te tree. Here te eigt te tree is 4. Te oter terminology used for eigt te tree is dept te tree. B C D E F G H I 23. Traverse te given tree using Inorder, Preorder and Postorder traversals. Given tree: B C D E F G H I J Inorder : D H B E F C I G J Preorder: B D H E C F G I J Postorder: H D E B F I J G C 24. Wat are te operations preformed in te Binary Searc Trees? Binary searc trees store collections items tat can be ordered, suc as integers. Binary searc trees support te following standard operations. searc(x): determines is an item x contained in te tree (and if so returns te item). 7

8 insert(x): adds item x to te collection stored in te tree, if it is not already tere. delete(x): removes item x from te collection stored in te tree. Data structures supporting tese operations are called Dictionaries. simple implementation is to store te items in sorted order in an array. Searc(x) is simply a binary searc. However, insert(x) and delete(x) are inefficient as, in general, tey may require many items to be sifted. 25. Draw a binary Tree for te expression: * B - (C + D) * (P / Q) - * * B + / C D P Q 26. Wat is meant by ancestor and descendant? B C D E F G H I J Wile displaying te tree, if some particular node occurs previous to some oter node ten tat node is called te ancestor te oter node. In our example te node J is ancestor te node G. 8

9 Te node wic occurs next to some oter node. In our example Node D is descendant te node H. 27. Wat is meant by Heigt-Balanced Trees? Heigt-balanced trees are also called VL trees. In a binary searc tree, te balance factor a node is te dept its left subtree minus te dept its rigt subtree. ny binary searc tree in wic te balance factor every node is -1, 0, or +1 is an VL tree. Te empty tree is an VL tree. Terefore, an VL tree as te following properties: 1. Te sub-trees every node differ in eigt by at most one. 2. Every sub-tree is an VL tree. For example, 28. For te tree Fig : a. Wic node is te root node? b. Wic node are leaves? 9

10 c. Compute te eigt. d. Compute te dept. B C D E F G H I J Fig a. Te unique node in te tree. Root node is node b. Tese are te terminal nodes te tree. Leaves are Node H, E, F, I, and J. c. Heigt te tree is 4. d. Dept te tree is 4. Because dept is equal to eigt. 29. Wat are te applications trees? pplications trees are, Trees are used in te representation sets. Decision-making. E.g.: Eigt coins problem. Computer-games suc as cess, tic-tac-toe, ceckers etc., are created and executed using trees. Manipulation aritmetic expression. Symbol table construction. Syntax-analysis. 30. Sow te result inserting 3, 2, 5, 6, 9 and 4 into an initially empty VL tree. Sow te tree after eac insertion. 10

11 31. Starting wit te following VL tree, sow te tree after deleting 20.Sow eac step. 32. Define VL Trees? n VL (delson-velskii and Landis)tree is a binary searc tree wit a balance condition. Te balance condition must be easy to maintain, and it ensures tat te dept te tree is O(logN).Te simplest idea require tat te left and rigt subtrees ave te same eigt. 33. Define B-Trees? B-tree order M is a tree wit te following structural properties: Te root is a leaf or as been 2and M cildren. ll nonleaf nodes (except te root) ave between [M/2] and M cildren. ll leaves are at te same dept. 11

12 34. Define splay tree? splay tree is a self-adjusting searc algoritm for placing and locating files (called records or keys) in a database. Te algoritm finds data by repeatedly making coices at decision points called nodes. 12

13 16 MRKS Q& 1)a)Explain ow to convert general tree into Binary tree. (pr/may2004)(or) b) Write an algoritm to convert general tree into Binary tree. Conversion general tree to Binary tree lgoritm 1. ssign Head node. LLINK=NULL RLINK=connect to itself LEVEL=0 LOC=HED. 2.Read level no, name from general tree 3.Create node structure for new i/p DT=NME LLINK=RLINK=NULL 4.Comparision b/w te previous level wit current level If (previous node level < current node level) LLINK (previous node) = current node Else a) Wile (previous node level > current node level) Move previous End wile b) [Previous node level = current node level] RLINK (previous node)= current node. 5.Repeat from step 2 for all i/p s. 6.End E.g. {Use Rigt eavy general tree} Level no name 1) 1 2 B 2 C 3 D B C 3 E 3 F E.G. D Level no E F name 2) G 1 G 2 H 2 I 2 J H I J 13

14 Explanation for above algoritm: 1.ssign Head node NULL HED. 2. New i/p, read level no, name 1, Previous node level =0 Current node level = 1 1 > 0 link previous to current node N N Head N N 3. Read level no, name 2,B N B N Previous node level =1 Current node level = 2 2 > 1 link previous to current node Head N N B N 4. Read level no, name 2,C N C N Previous node level =2 Current node level = 2 2 = 2 Rigt Link previous to current node HED N N 5. Read level no, name 3,D B N D N N C N 14

15 Previous node level =2 Current node level =3 3 > 2 Link previous to current node HED N N B C N N D N 6. Read level no, name 3,E N E N Previous node level =3 Current node level = 3 3 = 3 Rigt Link previous to current node HED N N B C N N D E N 7. Read level no, name 3,F N F N Previous node level =3 Current node level =3 3 = 3 Rigt Link previous to current node HED 15

16 N N B C N N D E F N LEFT 8. Read level no, name 1,G Previous node level =3 Current node level =1 3 >1 (find up to same level) Move previous up to it reac level 1. 1 = 1 Rigt Link previous to current node N G N HED N G N LEFT 9. Read level no, name 2,H N H N Previous node level =1 Current node level =2 2 > 1 Link previous to current node HED G N 16

17 LEFT N H N 10. Read level no, name 2,I N I N Previous node level =2 Current node level =2 2 = 2 Rigt Link previous to current node HED G N LEFT N H N I N 11. Read level no, name 2,J N J N Previous node level =2 Current node level =2 2 > 1 Rigt Link previous to current node HED G N LEFT N H N I N J N 17

18 FULL BINRY TREE HED G N N H N I N J N N B C N N D E F N 2) a)explain Binary Tree Traversal in C. (OR) b)give and explain te various tree traversal algoritms wit example. (Nov/Dec 2003). c)wat are te different tree traversals? Explain wit examples. (Nov/Dec 2005) Traversing te tree means visiting eac node exactly once. Because tere are six ways to traverse a tree. For tese tree traversals we will use some notations as follows: 1. L means move to te Cild. 2. R means move to te Rigt Cild. 3. D means te Root/Parent node. Now, wit tis L, R, D one can ave six different combinations L, R, and D nodes. Suc as LDR, LRD, DLR, DRL, RLD, RDL. But from computing point view we will ave tree different ways to traversing a tree. Tese tree combinations will be LDR, LRD, and DLR. Tose are called In order; Post order, Pre order traversal respectively. In order traversal: Print 3 rd 18

19 Print 2 nd B D Print 4 t Print 1 st C E Print tis node at last In order traversals are tracing te sequence LDR tis type traversal is called in order traversal. Te basic principal is to traverse left sub-tree ten root and ten te rigt sub-tree. C B D E is te in order traversal (ie). 1 st we go towards te left most node. (ie) C. So print tat te node C. Ten go back to te node B and print B. Ten root node ten move towards te rigt print D and finally E. lgoritm for In order traversal INORDER (Root) 1. [Start from root] ptr=root 2. [Ceck te ptr value] If (ptr! =NULL) ten i) INORDER (Ptr. Lc) /*Traverse te left sub-tree ii) VISIT (ptr) /* visit te node iii) INORDER (Ptr. Rc) /* Traverse te rigt sub-tree 3. End if 4. Stop Pre order traversal: Print 1 st Print 2 nd Print 4 t B D C E 19

20 Print 3 rd Print tis node at last B C D E is te preorder traversal te above figure. We are following DLR pat (ie) data at te root node will be printed first, ten we move on te left sub-tree and go on printing te data at te node & ten to te rigt subtree. Follow te same DLR principal at eac sub-tree & go on printing te data accordingly. lgoritm for Pre order traversal PREORDER (Root) 1. [Start from root] ptr=root 2. [Ceck te ptr value] If (ptr! =NULL) ten i) VISIT (ptr) /* visit te node ii) PREORDER (Ptr. Lc) /*Traverse te left sub-tree iii) PREORDER (Ptr. Rc) /* Traverse te rigt sub-tree 3. End if 4. Stop Post order traversal: Print tis node at last Print 3 rd B E Print 4 t Print 1 st C D Print 2 nd From te figure post order sequence is C D B E. In post order traversal we are following te LRD principle (ie) move to te left most node ceck if rigt sub-tree is tere or not ten print te left most, if rigt sub-tree is tere move towards te rigt most node. Te key idea ere is tat at eac sub-tree we are following te LRD principal and print te data according. 20

21 lgoritm for Post order traversal POSTORDER (Root) 1. [Start from root] ptr=root 2. [Ceck te ptr value] If (ptr! =NULL) ten i) POSTORDER (Ptr. Lc) /*Traverse te left sub-tree ii) POSTORDER (Ptr. Rc) /* Traverse te rigt sub-tree iii) VISIT (ptr) /* visit te node 3. End if 4. Stop 3)a)Wat are te different ways Binary Tree representations? (OR) b) How is a binary tree represented using an array? Give example. (Nov/Dec 05) Tere are two ways represent ting te Binary Tree. Sequential Representation Linked Representation. Sequential Representation Eac node is sequentially arranged from top to bottom & front left to rigt. Let us understand tis matter by numbering eac node. Te numbering will start from root node and ten remaining nodes will give ever-increasing numbers in level wise direction. Te nodes on te same level will be numbered from left to rigt. Te numbering will us sown below in figure. 21

22 B C D E F G H I J K L M N O You will get a point tat a binary tree dept n aving 2 n-1 number nodes. In te figure te tree is aving te dept 4 and total number nodes are 15. Tus remember tat is a binary tree dept n tere will be a maximum 2 n-1 nodes. nd so if we know te maximum dept te tree tan we can represent binary tree using arrays data structure. We can use array size n. Te root will be at position 1. Its left cild will be at position 2; its rigt cild will be at position 3 and so on. Te way placing te elements in te array is by applying te formula is as below. Parent (n) = floor [(n-1)/2] were n>0 wen n is equal to 0 te root node will be placed at tat location & root node is not aving any parent. (n) =(2n +1) Rigt (n) = (2n+2) Root = =index 0 cild i.e.; n =0 B will be at 2*0+1=1 st location Similarly left rigt cild wic will be C C will be at 2*0+2=2 nd location I is at te 8 t location 2n + 2 =8 2n = 8 2 =6 2n = 6 n = 6/2 = 3 22

23 Tat means parent I is at te 3 rd location and i.e. P B C D E F G H I 0 B 1 C 2 D 3 E 4 F 5 G 6 H 7 I 8 : 23

24 dvantages Disadvantages Te only advantages wit tis type representation is tat te direct access to any node can be possible & finding te parent or left, rigt cild any particular node is fast because te random access. Te major disadvantage wit tis type representation is wastages memory. In tis type representation te maximum dept te tree as to be fixed, because we ave decide te array size. Te insertion and deletion any node in te tree will be costlier as oter nodes ave to be adjusted at appropriate positions. So tat te meaning binary tree can be preserved. Linked Representation In linked list eac node will be look like tis Rigt cild Data cild In binary tree eac node will ave left cild, rigt cild and data field. Te left cild is noting but te left link wic points to some address left sub tree were as rigt cild is also a rigt link wic points to some address rigt Sub tree. nd te data field gives te information about te node. Let us see te C structure te node to a binary tree. Type def struct node { int data; struct node *left; struct node *rigt; } bin; B C D E 24

25 dd node B dd node C dd node B dd node D E Null C Null Null D Null Null E Null dvantages: Using tis array representation as tere is no wastage memory & so tere is no need to ave prior knowledge dept te tree. Insertion & deletion, wic are te most common operation, can be done witout moving te oter nodes. Disadvantages: Tis representation does not provide direct access to a node and special algoritms are required. Tis representation needs additional space in eac node for storing te left and rigt sub-trees. 4)a)Wat is te use Find-min and Find-max procedures? Explain te Find operation for binary searc trees wit example.(or) b) Write algoritm to locate an element from binary searc tree.(nov/dec05) Find Tis operation generally requires returning a pointer to te node in tree T tat as key X or NULL if tere is no suc node. Te public routine tat returns nonzero if te Find succeeded, and sets Last Find. If te find failed, zero is returned, and Last Find point to NULL. Te structure te tree makes tis simple. If T is NULL, ten we return 0. Oterwise, if te key stored at T is X, we can return T oter wise, we make a recursive call on a T, eiter left or rigt, depending on te relationsip X to te key stored in T. Find operation for binary searc trees algoritm is given below: 25

26 Find_Min and Find_Max: Template < class Etype> Tree_Node<Etype>* Binary_Searc_Tree<Etype> Find (const Etype & X, Tree-Node<Etype>* T) const { If (T==NULL) Return NULL; Else If (x<t Element) Return Find (X, T ); /* Find te element at */ Else If (x > T Element) Return Find (X, T Rigt); /* Find te element at Rigt */ Else Return T; } To perform a Find_Min, start at te root and go left, as tere is a left cild. Te stopping point is te smallest element. Te Find_Max routine is te same; expect tat brancing be to te rigt cild. Te public interface is similar to tat te Find routine. lgoritm for Find_Min for binary Searc trees Template < class Etype> Tree_Node<Etype>* Binary_Searc_Tree<Etype> Find_Min (Tree Node < Etype>* T) const { If (T==NULL) Return NULL; Else If (T ==NULL) Return T; Else Return Find_Min (T ); } Tis is so easy tat many programmers do not boter using recursion. We will code te routines bot ways by doing Find_Min recursively and Find_Max non-recursively. Notice ow we carefully andle te degenerate case o an empty tree; altoug tis is always important to do, it is recursive programs. lgoritm for Nonrecursive implementation Find_Max for binary Searc trees 26

27 Template < class Etype> Void Binary_Searc_Tree<Etype> Find_Max (Tree_Node < Etype>* T) const { If (T! =NULL) Wile (T Rigt! = NULL) T = T Rigt; Return T; } INSERT To insert X into tree T, process down te tree as you would wit a FIND procedure. If X is found, do noting; oterwise, insert X at last position on te pat traversed Insert 5 27

28 lgoritm to insert into a binary searc tree template<class type> Void Binary_searc_Tree<Etype>:: Insert (Const Etype &X, Tree-Node<Etype> * & T) { If (T==NULL) { T=new Tree_Node<Etype>(X); If (T==NULL) Error ( out space ); } Else If (X < T ->Element) Insert (X, T->); Else If(X > T ->Element) Insert (X, T->Rigt); } 28

29 5.a) ow do you insert an element into an VL tree? (May/Jun 05) (OR) b) Write a function to generate te VL tree eigt H wit fewest nodes. (May/Jun 2005) (OR) c) Explain te single rotation and double rotation in an VL tree. (OR) d) Write te routine to perform single rotation and double rotation. VL TREES: Invented by Russian scientists G.M.delson-velsky and E.M.Landis in Definition: n VL tree is a binary tree in wic te balance factor every node is eiter 0 or 1, wic is defined as difference between te eigts te nodes left &rigt sub trees. Heigt is maintained more or less in balanced tree so maintaining anoter factor called balancing factor. Heigt for eac node is calculated by Heigt left Heigt rigt. It may ave values 0, 1 for VL tree. Heigt tree differs almost by 1. If it becomes 2 ten we ave to adjust to become 1,te node aving balance factor as 2 is called pivot node, wose balance factor 2. If te node is more tan one ( 1), ten selected as pivot node at lowest level. INSERTION General algoritm for insertion 1. Insert similarly to binary searc tree 2. Ceck for balancing factor 3. If balancing factor any node = 2 i. Find pivot node ii. Do rotation at pivot node. Insertion can be done in, 1) cild pivot node SINGLE RIGHT ROTTION 2) Rigt Rigt cild pivot node SINGLE LEFT ROTTION 3) Rigt cild pivot nod LEFT RIGHT ROTTION 29

30 4) Rigt cild pivot node RIGHT LEFT ROTTION SINGLE RIGHT ROTTION SINGLE LEFT ROTTION Mirror image eac oter SINGLE RIGHT ROTTION Wen insertion in left left cild pivot node. Before insertion: S bf (S) = +1 - = 1 bf (M) = = 0 sub tree M M Rigt sub tree M Rigt sub tree S In te given above tree, te balancing factor eac and every node in te tree is in balanced condition. So, tere is no cange.if we add or insert a new node in te left left cild, ten it becomes unbalanced so you ave rotate te nodes to become balanced tree. Tis can be done troug Single rigt rotation in te following paragraps. fter insertion: S K1 bf (S)=+1+1- = 2 pivot node bf (M)=+1-=1 M K2 Rigt S +1 M Rigt sub tree M Insertion 30

31 In te above tree, if we insert node in te left left cild, it becomes unbalanced, node S balance factor is 2 and it sould be noted as pivot node and make te rigt rotation to bring as balanced tree. Te balanced tree after single rigt rotation as given below. Here te pointer rotation can be mentioned in te box below. fter rotation bf (M)=+1 - ( + 1) = 0 M +1 M Insertion Older Rigt sub tree M S bf (S)=-=0 Rigt S So te rotation can be mentioned as K2 = K1 K1 = K2 Rigt K2 Rigt = K1 SINGLE LEFT ROTTION Wen insertion is done in rigt rigt cild pivot node In te given below tree, te balancing factor eac and every node in te tree is in balanced condition. So, tere is no cange.if we add or insert a new node in te rigt rigt cild, ten it becomes unbalanced so you ave rotate te nodes to become balanced tree. Tis can be done troug Single left rotation in te following paragraps. 31

32 Before insertion M bf (M)= - ( + 1) = - 1 M Q Q bf (Q)=-=0 Rigt Q fter insertion: M K1 bf (M)= - ( + 1+1) = - 2 pivot node M bf (Q)=- (+1) = -1 K2 Q Rigt sub tree Q +1 Q Insertion In te above tree, if we insert node in te rigt rigt cild, it becomes unbalanced, node M balance factor is 2 and it sould be noted as pivot node and make te left rotation to bring as balanced tree. Te balanced tree after single left rotation as given below. Here te pointer rotation can be mentioned in te box below. 32

33 fter rotation: Q bf (Q) = +1 ( +1) = 0 bf (M) = = 0 M M Older Q Rigt Q Insertion +1 So te rotation can be mentioned as K2 = K1 Rigt K1 Rigt = K2 K2 = K1 DOUBLE ROTTION Double rotation can be classified into two types, namely LEFT RIGHT ROTTION (L R) RIGHT LEFT ROTTION(R L) Mirror image eac oter LEFT RIGHT ROTTION (L R) Wen insertion is done in left rigt cild pivot node.to understand Rigt Rotation (LR), we can consider te given tree; te balancing factor eac and every node in te tree is in balanced condition. So, tere is no cange.if we add or insert a new node in te, left rigt cild ten it becomes unbalanced so you ave rotate te nodes to become balanced tree. Te insertion may be eiter in left cild or rigt cild left only. 33

34 Before insertion: S K1 bf (S)=(+1)- (+2) = S T T K2 V bf (T) = - = 0 Rigt T bf (V)=(+1) =1 Rigt V fter insertion: S K1 bf (S)= + 1- (+3) = -2 pivot node +1 S +1 T T K2 V bf (T) = +1- = 1 Rigt T bf (V)=(+2) =2 pivot node Rigt V Insertion 34

35 Consider Rigt sown below can be rotated in single rigt rotation tis is as follows. Before insertion: bf (V) = = 2 V T T +1 bf (T)=+1- =1 Rigt T Rigt V Insertion (RIGHT) fter rigt rotation: T T Insertion +1 Older Rigt T V Rigt V 35

36 fter rigt rotation, you ave to make left rotation to get balanced tree. Tis is given as below S bf (S)= (+2) = -2 pivot node S T Insertion +1 T bf (T) =+1 - (+1) =0 Older Rigt T V bf (V) = =0 Rigt V (LEFT) T bf (T) =+1 - (+1) =0 S bf(s)=-(+1)=-1 V bf (V) = =0 S Older T Insertion +1 Older Rigt T Rigt V 36

37 RIGHT LEFT ROTTION (R L) Wen insertion is done in Rigt cild pivot nodeto understand Rigt Rotation (RL), we can consider te given tree; te balancing factor eac and every node in te tree is in balanced condition. So, tere is no cange.if we add or insert a new node in te, rigt left cild ten it becomes unbalanced so you ave rotate te nodes to become balanced tree.te insertion may be eiter in left cild or rigt cild rigt only. Before insertion: bf (S)=+2-(+1) S M bf(m)=+1-(+1) Q bf (Q)=- =0 Rigt S M Q Rigt Q fter insertion: S bf (S)=+3-(+1)=2 bf(m)=+1-(+2)=-1 M bf(q)=+1-=1 Q Rigt S M +1 Rigt Q Q Insertion 37

38 Consider sown below can be rotated in single rigt rotation tis is as follows. Before insertion: M Bf(M)=--2=-2 T +1 Rigt Q Q bf(q)=+1-=1 Rigt Q Insertion fter rigt rotation: (LEFT) Q M M Older Q Insertion +1 Rigt Q fter left rotation, you ave to make rigt rotation to get balanced tree. Tis is given as below 38

39 fter left rotation: S Q M M Older Q Insertion +1 Rigt Q Rigt Sub tree S +1 (RIGHT) Q bf (Q) =+2 - (+1) =1 M bf(m)=-(+1)=-1 S bf (S) = =0 M Older Q Insertion +1 Older Rigt Q Rigt S 39

40 6) Explain B-Tree. B-tree order m is a tree wit te following structural properties: o Te root is eiter a leaf or as between 2 and M cildren. o ll nonleaf nodes (except te root) ave between M/2 and M cildren. o ll leaves are at te same dept. ll data is stored at te leaves. Contained in eac interior node are pointers P 1, P 2,..., P M to te cildren, and values k 1, k 2,..., k m - 1, representing te smallest key found in te subtrees P 2, P3,..., P M respectively. For every node, all te keys in subtree P 1 are smaller tan te keys in subtree P 2, and so on. Te leaves contain all te actual data, wic is eiter te keys temselves or pointers to records containing te keys. Te number keys in a leaf is also between M/2 and M. Te tree in te following figure is an example a B-tree order 4. B-tree order 4. B-tree order 4 is more popularly known as a tree, and a B-tree order 3 is known as a 2-3 tree. Te following is te 2-3 tree. 2-3 tree 40

41 Te interior nodes (nonleaves) are in ellipses, wic contain te two pieces data for eac node. das line as a second piece information in an interior node indicates tat te node as only two cildren. Leaves are drawn in boxes, wic contain te keys. Te keys in te leaves are ordered. To perform a find, we start at te root and branc in one (at most) tree directions, depending on te relation te key we are looking for to te two (possibly one) values stored at te node. To perform an insert on a previously unseen key, x, we follow te pat as toug we were performing a find. Wen we get to a leaf node, we ave found te correct place to put x. Tus, to insert a node wit key 18, we can just add it to a leaf witout causing any violations te 2-3 tree properties. If we now try to insert 1 into te tree, we find tat te node were it belongs is already full. Placing our new key into tis node would give it a fourt element wic is not allowed. Tis can be solved by making two nodes two keys eac and adjusting te information in te parent. If we insert 19 into te current tree, we make two nodes two keys eac, we obtain te following tree. 41

42 Tis tree as an internal node wit four cildren, but we only allow tree per node. So split tis node into two nodes wit two cildren. Of course, tis node migt be one tree cildren itself, and tus splitting it would create a problem for its parent (wic would now ave four cildren), but we can keep on splitting nodes on te way up to te root until we eiter get to te root or find a node wit only two cildren. If we now insert an element wit key 28, we create a leaf wit four cildren, wic is split into two leaves two cildren: 42

43 Tis creates an internal node wit four cildren, wic is ten split into two cildren. Wat we ave done ere is split te root into two nodes. Wen we do tis, we ave a special case, wic we finis by creating a new root. Tis is ow (te only way) a 2-3 tree gains eigt. Wen a key is inserted, te only canges to internal nodes occur on te access pat. Tese canges can be made in time proportional to te lengt tis pat, Te dept a B-tree is at most log [M/2] N. t eac node on te pat, we perform O(log M) work to determine wic branc to take (using a binary searc), but an insert or delete could require O(M) work to fix up all te information at te node. Te worst-case running time for eac te insert and delete operations is tus O(M log M N) = O( (M / log M ) log N), but a find takes only O(log N ). 7) Explain Treaded Trees. Te linked representation any binary tree consists more null links tan actual pointers, tere are n + 1 null links and 2n total links. clever way to make use tese null links as been devised by. J. Perlis and C. Tornton. Teir idea is to replace te null links by pointers, called treads, to oter nodes in te tree. If te RCHILD(P) is normally equal to zero, we will replace it by a pointer to te node wic would be printed after P wen traversing te tree in inorder. null LCHILD link at node P is replaced by a pointer to te node wic immediately precedes node P in inorder. 43

44 Binary tree Te binary tree wit its new treads (drawn as dotted lines). Te tree T as 9 nodes and 10 null links wic ave been replaced by treads. If we traverse T in inorder te nodes will be visited in te order H D I B E F C G. For example node E as a predecessor tread wic points to B and a successor tread wic points to. In te memory representation we must be able to distinguis between treads and normal pointers. Tis is done by adding two extra one bit fields LBIT and RBIT. LBIT(P) =1 LBIT(P) = 0 RBIT(P) = 1 RBIT(P) = 0 if LCHILD(P) is a normal pointer if LCHILD(P) is a tread if RCHILD(P) is a normal pointer if RCHILD(P) is a tread Two treads ave been left dangling in LCHILD(H) and RCHILD(G). In order tat we leave no loose treads we will assume a ead node for all treaded binary trees. Ten te complete memory representation for te above tree is sown in te following figure. Te tree T is te left subtree te ead node. We assume tat an empty binary tree is represented by its ead node as 44

45 First, we observe tat for any node X in a binary tree, if RBIT(X) = 0, ten te inorder successor X is RCHILD(X) by definition treads. If RBIT(X) = 1, ten te inorder successor X is obtained by following a pat left cild links from te rigt cild X until a node wit LBIT = 0 is reaced. Te algoritm INSUC finds te inorder successor any node X in a treaded binary tree. Memory Representation Treaded Tree procedure INSUC(X) //find te inorder succcesor X in a treaded binary tree// S RCHILD(X) //if RBIT(X) = 0 we are done// if RBIT(X) = 1 ten [wile LBIT(S) = 1 do //follow left// S LCHILD(S) //until a tread// end] return (S) end INSUC If we wis to list in inorder all te nodes in a treaded binary tree, ten we can make repeated calls to te procedure INSUC. Since te tree is te left subtree te ead node and because te coice RBIT= 1 for te ead node, te inorder sequence nodes for tree T is obtained by te procedure TINORDER. procedure TINORDER (T) //traverse te treaded binary tree, T, in inorder// HED T loop T INSUC(T) if T = HED ten return print(dt(t)) 45

46 forever end TINORDER Te computing time is still O(n) for a binary tree wit n nodes. Te insertions into a treaded tree will give us a procedure for growing treaded trees. We sall study only te case inserting a node T as te rigt cild a node S. If S as an empty rigt subtree, ten te insertion is simple and diagrammed in te following figure a. If te rigt subtree S is non-empty, ten tis rigt subtree is made te rigt subtree T after insertion. Wen tis is done, T becomes te inorder predecessor a node wic as a LBIT = 0 and consequently tere is a tread wic as to be updated to point to T. Te node containing tis tread was previously te inorder successor S. Figure b illustrates te insertion for tis case. In bot cases S is te inorder predecessor T. Te details are spelled out in algoritm INSERT_RIGHT. Insertion T as a Rigt Cild S in a Treaded Binary Tree procedure INSERT_RIGHT (S,T) 46

47 //insert node T as te rigt cild S in a treaded binary tree// RCHILD(T) RCHILD(S); RBIT(T) RBIT(S) LCHILD(T) S; LBIT(T) 0 //LCHILD(T) is a tread// RCHILD(S) T; RBIT(S) 1 //attac node T to S// if RBIT (T) = 1 ten [W INSUC(T)//S ad a rigt cild// LCHILD(W) T] end INSERT_RIGHT 8) Explain Splay Trees. Splay trees are binary searc trees tat acieve our goals by being self-adjusting in a quite remarkable way: Every time we access a node te tree, weter for insertion or retrieval, we perform radical surgery on te tree, lifting te newly accessed node all te way up, so tat it becomes te root te modified tree. Oter nodes are pused out te way as necessary to make room for tis new root. Nodes tat are frequently accessed will frequently be lifted up to become te root, and tey will never drift too far from te top position. Inactive nodes, on te oter and, will slowly be pused farter and farter from te root. It is possible tat splay trees can become igly unbalanced, so tat a single access to a node te tree can be quite expensive. Over a long sequence accesses, splay trees are not at all expensive and are guaranteed to require not many more operations even tan VL trees Te analytical tool used is called amortized algoritm analysis, amortized analysis since, like insurance calculations, te few expensive cases are averaged in wit many less expensive cases to obtain excellent performance over a long sequence operations. We perform te radical surgery on splay trees by using rotations a similar form to tose used for VL trees, but now wit many rotations done for every insertion or retrieval in te tree. In fact, rotations are done all along te pat from te root to te target node tat is being accessed. Te key idea splaying is to move te target node two levels up te tree at eac step. Consider some simple terminology: Consider te pat going from te root down to te accessed node. Eac time we move left going down tis pat, zig and zag we say tat we zig, and eac time we move rigt we say tat we zag. move two steps left (going down) is ten called zig-zig, two steps rigt zag-zag, left ten rigt zig-zag, and rigt ten left zag-zig. Tese four cases are te only possibilities in moving two steps down te pat. If te lengt te pat is odd, owever, tere will be one more step needed at its end, eiter a zig (left) move, or a zag (rigt) move. Te rotations done in splaying for eac zig-zig, zig-zag, and zig moves are sown in Figure Te oter tree cases, zag-zag, zag-zig, and zag are mirror images tese. 47

48 Splay rotations Te zig-zag case in above figure is identical to tat an VL double rotation and te zig case is identical to a single rotation. Te zig-zig case, owever, is not te same as would be obtained by lifting te target node twice wit single rotations. 48

49 Zig-zig incorrectly replaced by single rotations To avoid te error sown in above Figure, always tink lifting te target two levels at a time (except wen only a single zig or zag step remains at te end). lso, note tat it is only te nodes on te pat from te target to te root wose relative positions are canged, and tat only in te ways sown by colored dased curves in previous figure. None te subtrees f te pat (sown as T1, T2, T3, and T4 in tat figure canges its sape at all, and tese subtrees are attaced to te pat in te only places tey can possibly go to maintain te searc-tree ordering all te keys. Let us work troug an example, We start wit te top left tree and splay at c. Te pat from te root to c goes troug, f, b, e, d, c. Frome to d to c is zig-zig (leftleft, as sown by te dased oval), so we perform a zig-zig rotation on tis part te tree, obtaining te second tree in te following Figure. Note tat te remainder te tree as not canged sape, and te modified subtree is ung in te same position it originally occupied. 49

50 Example splaying For te next step, te pat from f to b to c (sown inside te dased curve in te second tree) is now a zig-zag move, and te resulting zig-zag rotation yields te tird tree. Here te subtree d, e (f te pat) does not cange its sape but moves to a new position, as sown for T3 in Splay rotation figure. In tis tird tree, c is only one step from te root, on te left, so a zig rotation yields te final tree te above figure. Here, te subtree rooted at f does not cange sape but does cange position. In tis example, we ave performed bottom-up splaying, beginning at te target node and moving up te pat to te root two steps at a time. In working troug examples by and, tis is te natural metod, since, after searcing from te top down, one would expect to turn around and splay from te bottom back up to te top te tree. Hence, being done at te end te process if necessary, a single zig or zag move occurs at te top te tree. Bottom-up splaying is essentially a two-pass metod, first searcing down te tree and ten splaying te target up to te root. In fact, if te target is not found but is ten inserted, bottom-up splaying migt even be programmed wit tree passes, one to searc, one to insert, and one to splay. In writing a computer algoritm, owever, it turns out to be easier and more efficient to splay from te top down wile we are searcing for te target node. Wen we find te target, it is immediately moved to te root te tree, or, if te searc is unsuccessful, a new root is created tat olds te target. In top-down splaying, a single zig or zag move occurs at te bottom te splaying process. 50

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE Data Structures and Algoritms Capter 4: Trees (AVL Trees) Text: Read Weiss, 4.4 Izmir University of Economics AVL Trees An AVL (Adelson-Velskii and Landis) tree is a binary searc tree wit a balance

More information

Announcements. Lilian s office hours rescheduled: Fri 2-4pm HW2 out tomorrow, due Thursday, 7/7. CSE373: Data Structures & Algorithms

Announcements. Lilian s office hours rescheduled: Fri 2-4pm HW2 out tomorrow, due Thursday, 7/7. CSE373: Data Structures & Algorithms Announcements Lilian s office ours resceduled: Fri 2-4pm HW2 out tomorrow, due Tursday, 7/7 CSE373: Data Structures & Algoritms Deletion in BST 2 5 5 2 9 20 7 0 7 30 Wy migt deletion be arder tan insertion?

More information

AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic

AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic 1 AVL Trees Outline and Required Reading: AVL Trees ( 11.2) CSE 2011, Winter 2017 Instructor: N. Vlajic AVL Trees 2 Binary Searc Trees better tan linear dictionaries; owever, te worst case performance

More information

CSE 332: Data Structures & Parallelism Lecture 8: AVL Trees. Ruth Anderson Winter 2019

CSE 332: Data Structures & Parallelism Lecture 8: AVL Trees. Ruth Anderson Winter 2019 CSE 2: Data Structures & Parallelism Lecture 8: AVL Trees Rut Anderson Winter 29 Today Dictionaries AVL Trees /25/29 2 Te AVL Balance Condition: Left and rigt subtrees of every node ave eigts differing

More information

CS 234. Module 6. October 16, CS 234 Module 6 ADT Dictionary 1 / 33

CS 234. Module 6. October 16, CS 234 Module 6 ADT Dictionary 1 / 33 CS 234 Module 6 October 16, 2018 CS 234 Module 6 ADT Dictionary 1 / 33 Idea for an ADT Te ADT Dictionary stores pairs (key, element), were keys are distinct and elements can be any data. Notes: Tis is

More information

Lecture 7. Binary Search Trees / AVL Trees

Lecture 7. Binary Search Trees / AVL Trees Lecture 7. Binary Searc Trees / AVL Trees T. H. Cormen, C. E. Leiserson and R. L. Rivest Introduction to Algoritms, 3rd Edition, MIT Press, 2009 Sungkyunkwan University Hyunseung Coo coo@skku.edu Copyrigt

More information

Data Structures and Programming Spring 2014, Midterm Exam.

Data Structures and Programming Spring 2014, Midterm Exam. Data Structures and Programming Spring 2014, Midterm Exam. 1. (10 pts) Order te following functions 2.2 n, log(n 10 ), 2 2012, 25n log(n), 1.1 n, 2n 5.5, 4 log(n), 2 10, n 1.02, 5n 5, 76n, 8n 5 + 5n 2

More information

CS 234. Module 6. October 25, CS 234 Module 6 ADT Dictionary 1 / 22

CS 234. Module 6. October 25, CS 234 Module 6 ADT Dictionary 1 / 22 CS 234 Module 6 October 25, 2016 CS 234 Module 6 ADT Dictionary 1 / 22 Case study Problem: Find a way to store student records for a course, wit unique IDs for eac student, were records can be accessed,

More information

1 Copyright 2012 by Pearson Education, Inc. All Rights Reserved.

1 Copyright 2012 by Pearson Education, Inc. All Rights Reserved. CHAPTER 20 AVL Trees Objectives To know wat an AVL tree is ( 20.1). To understand ow to rebalance a tree using te LL rotation, LR rotation, RR rotation, and RL rotation ( 20.2). To know ow to design te

More information

each node in the tree, the difference in height of its two subtrees is at the most p. AVL tree is a BST that is height-balanced-1-tree.

each node in the tree, the difference in height of its two subtrees is at the most p. AVL tree is a BST that is height-balanced-1-tree. Data Structures CSC212 1 AVL Trees A binary tree is a eigt-balanced-p-tree if for eac node in te tree, te difference in eigt of its two subtrees is at te most p. AVL tree is a BST tat is eigt-balanced-tree.

More information

Wrap up Amortized Analysis; AVL Trees. Riley Porter Winter CSE373: Data Structures & Algorithms

Wrap up Amortized Analysis; AVL Trees. Riley Porter Winter CSE373: Data Structures & Algorithms CSE 373: Data Structures & Wrap up Amortized Analysis; AVL Trees Riley Porter Course Logistics Symposium offered by CSE department today HW2 released, Big- O, Heaps (lecture slides ave pseudocode tat will

More information

Binary Search Tree - Best Time. AVL Trees. Binary Search Tree - Worst Time. Balanced and unbalanced BST

Binary Search Tree - Best Time. AVL Trees. Binary Search Tree - Worst Time. Balanced and unbalanced BST AL Trees CSE Data Structures Unit Reading: Section 4.4 Binary Searc Tree - Best Time All BST operations are O(d), were d is tree dept minimum d is d = log for a binary tree N wit N nodes at is te best

More information

When a BST becomes badly unbalanced, the search behavior can degenerate to that of a sorted linked list, O(N).

When a BST becomes badly unbalanced, the search behavior can degenerate to that of a sorted linked list, O(N). Balanced Binary Trees Binary searc trees provide O(log N) searc times provided tat te nodes are distributed in a reasonably balanced manner. Unfortunately, tat is not always te case and performing a sequence

More information

Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number

Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number Bounding Tree Cover Number and Positive Semidefinite Zero Forcing Number Sofia Burille Mentor: Micael Natanson September 15, 2014 Abstract Given a grap, G, wit a set of vertices, v, and edges, various

More information

15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes

15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes 15-122: Principles of Imperative Computation, Summer 2011 Assignment 6: Trees and Secret Codes William Lovas (wlovas@cs) Karl Naden Out: Tuesday, Friday, June 10, 2011 Due: Monday, June 13, 2011 (Written

More information

MATH 5a Spring 2018 READING ASSIGNMENTS FOR CHAPTER 2

MATH 5a Spring 2018 READING ASSIGNMENTS FOR CHAPTER 2 MATH 5a Spring 2018 READING ASSIGNMENTS FOR CHAPTER 2 Note: Tere will be a very sort online reading quiz (WebWork) on eac reading assignment due one our before class on its due date. Due dates can be found

More information

Haar Transform CS 430 Denbigh Starkey

Haar Transform CS 430 Denbigh Starkey Haar Transform CS Denbig Starkey. Background. Computing te transform. Restoring te original image from te transform 7. Producing te transform matrix 8 5. Using Haar for lossless compression 6. Using Haar

More information

Advanced Tree. Structures. AVL Tree. Outline. AVL Tree Recall, Binary Search Tree (BST) is a special case of. Splay Tree (Ch 13.2.

Advanced Tree. Structures. AVL Tree. Outline. AVL Tree Recall, Binary Search Tree (BST) is a special case of. Splay Tree (Ch 13.2. ttp://1...0/csd/ Data tructure Capter 1 Advanced Tree tructures Dr. atrick Can cool of Computer cience and Engineering out Cina Universit of Tecnolog AVL Tree Recall, Binar earc Tree (BT) is a special

More information

Design Patterns for Data Structures. Chapter 10. Balanced Trees

Design Patterns for Data Structures. Chapter 10. Balanced Trees Capter 10 Balanced Trees Capter 10 Four eigt-balanced trees: Red-Black binary tree Faster tan AVL for insertion and removal Adelsen-Velskii Landis (AVL) binary tree Faster tan red-black for lookup B-tree

More information

Numerical Derivatives

Numerical Derivatives Lab 15 Numerical Derivatives Lab Objective: Understand and implement finite difference approximations of te derivative in single and multiple dimensions. Evaluate te accuracy of tese approximations. Ten

More information

More on Functions and Their Graphs

More on Functions and Their Graphs More on Functions and Teir Graps Difference Quotient ( + ) ( ) f a f a is known as te difference quotient and is used exclusively wit functions. Te objective to keep in mind is to factor te appearing in

More information

Section 2.3: Calculating Limits using the Limit Laws

Section 2.3: Calculating Limits using the Limit Laws Section 2.3: Calculating Limits using te Limit Laws In previous sections, we used graps and numerics to approimate te value of a it if it eists. Te problem wit tis owever is tat it does not always give

More information

Design Patterns for Data Structures. Chapter 10. Balanced Trees

Design Patterns for Data Structures. Chapter 10. Balanced Trees Capter 10 Balanced Trees Capter 10 Four eigt-balanced trees: Red-Black binary tree Faster tan AVL for insertion and removal Adelsen-Velskii Landis (AVL) binary tree Faster tan red-black for lookup B-tree

More information

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree Chapter 4 Trees 2 Introduction for large input, even access time may be prohibitive we need data structures that exhibit running times closer to O(log N) binary search tree 3 Terminology recursive definition

More information

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology Introduction Chapter 4 Trees for large input, even linear access time may be prohibitive we need data structures that exhibit average running times closer to O(log N) binary search tree 2 Terminology recursive

More information

Multi-Stack Boundary Labeling Problems

Multi-Stack Boundary Labeling Problems Multi-Stack Boundary Labeling Problems Micael A. Bekos 1, Micael Kaufmann 2, Katerina Potika 1 Antonios Symvonis 1 1 National Tecnical University of Atens, Scool of Applied Matematical & Pysical Sciences,

More information

CSCI2100B Data Structures Trees

CSCI2100B Data Structures Trees CSCI2100B Data Structures Trees Irwin King king@cse.cuhk.edu.hk http://www.cse.cuhk.edu.hk/~king Department of Computer Science & Engineering The Chinese University of Hong Kong Introduction General Tree

More information

4.2 The Derivative. f(x + h) f(x) lim

4.2 The Derivative. f(x + h) f(x) lim 4.2 Te Derivative Introduction In te previous section, it was sown tat if a function f as a nonvertical tangent line at a point (x, f(x)), ten its slope is given by te it f(x + ) f(x). (*) Tis is potentially

More information

2 The Derivative. 2.0 Introduction to Derivatives. Slopes of Tangent Lines: Graphically

2 The Derivative. 2.0 Introduction to Derivatives. Slopes of Tangent Lines: Graphically 2 Te Derivative Te two previous capters ave laid te foundation for te study of calculus. Tey provided a review of some material you will need and started to empasize te various ways we will view and use

More information

4.1 Tangent Lines. y 2 y 1 = y 2 y 1

4.1 Tangent Lines. y 2 y 1 = y 2 y 1 41 Tangent Lines Introduction Recall tat te slope of a line tells us ow fast te line rises or falls Given distinct points (x 1, y 1 ) and (x 2, y 2 ), te slope of te line troug tese two points is cange

More information

Linear Interpolating Splines

Linear Interpolating Splines Jim Lambers MAT 772 Fall Semester 2010-11 Lecture 17 Notes Tese notes correspond to Sections 112, 11, and 114 in te text Linear Interpolating Splines We ave seen tat ig-degree polynomial interpolation

More information

An Anchor Chain Scheme for IP Mobility Management

An Anchor Chain Scheme for IP Mobility Management An Ancor Cain Sceme for IP Mobility Management Yigal Bejerano and Israel Cidon Department of Electrical Engineering Tecnion - Israel Institute of Tecnology Haifa 32000, Israel E-mail: bej@tx.tecnion.ac.il.

More information

2.8 The derivative as a function

2.8 The derivative as a function CHAPTER 2. LIMITS 56 2.8 Te derivative as a function Definition. Te derivative of f(x) istefunction f (x) defined as follows f f(x + ) f(x) (x). 0 Note: tis differs from te definition in section 2.7 in

More information

19.2 Surface Area of Prisms and Cylinders

19.2 Surface Area of Prisms and Cylinders Name Class Date 19 Surface Area of Prisms and Cylinders Essential Question: How can you find te surface area of a prism or cylinder? Resource Locker Explore Developing a Surface Area Formula Surface area

More information

Trees. (Trees) Data Structures and Programming Spring / 28

Trees. (Trees) Data Structures and Programming Spring / 28 Trees (Trees) Data Structures and Programming Spring 2018 1 / 28 Trees A tree is a collection of nodes, which can be empty (recursive definition) If not empty, a tree consists of a distinguished node r

More information

4. Trees. 4.1 Preliminaries. 4.2 Binary trees. 4.3 Binary search trees. 4.4 AVL trees. 4.5 Splay trees. 4.6 B-trees. 4. Trees

4. Trees. 4.1 Preliminaries. 4.2 Binary trees. 4.3 Binary search trees. 4.4 AVL trees. 4.5 Splay trees. 4.6 B-trees. 4. Trees 4. Trees 4.1 Preliminaries 4.2 Binary trees 4.3 Binary search trees 4.4 AVL trees 4.5 Splay trees 4.6 B-trees Malek Mouhoub, CS340 Fall 2002 1 4.1 Preliminaries A Root B C D E F G Height=3 Leaves H I J

More information

Chapter K. Geometric Optics. Blinn College - Physics Terry Honan

Chapter K. Geometric Optics. Blinn College - Physics Terry Honan Capter K Geometric Optics Blinn College - Pysics 2426 - Terry Honan K. - Properties of Ligt Te Speed of Ligt Te speed of ligt in a vacuum is approximately c > 3.0µ0 8 mês. Because of its most fundamental

More information

Announcements SORTING. Prelim 1. Announcements. A3 Comments 9/26/17. This semester s event is on Saturday, November 4 Apply to be a teacher!

Announcements SORTING. Prelim 1. Announcements. A3 Comments 9/26/17. This semester s event is on Saturday, November 4 Apply to be a teacher! Announcements 2 "Organizing is wat you do efore you do someting, so tat wen you do it, it is not all mixed up." ~ A. A. Milne SORTING Lecture 11 CS2110 Fall 2017 is a program wit a teac anyting, learn

More information

[ DATA STRUCTURES ] Fig. (1) : A Tree

[ DATA STRUCTURES ] Fig. (1) : A Tree [ DATA STRUCTURES ] Chapter - 07 : Trees A Tree is a non-linear data structure in which items are arranged in a sorted sequence. It is used to represent hierarchical relationship existing amongst several

More information

MAC-CPTM Situations Project

MAC-CPTM Situations Project raft o not use witout permission -P ituations Project ituation 20: rea of Plane Figures Prompt teacer in a geometry class introduces formulas for te areas of parallelograms, trapezoids, and romi. e removes

More information

3.6 Directional Derivatives and the Gradient Vector

3.6 Directional Derivatives and the Gradient Vector 288 CHAPTER 3. FUNCTIONS OF SEVERAL VARIABLES 3.6 Directional Derivatives and te Gradient Vector 3.6.1 Functions of two Variables Directional Derivatives Let us first quickly review, one more time, te

More information

PLK-B SERIES Technical Manual (USA Version) CLICK HERE FOR CONTENTS

PLK-B SERIES Technical Manual (USA Version) CLICK HERE FOR CONTENTS PLK-B SERIES Technical Manual (USA Version) CLICK ERE FOR CONTENTS CONTROL BOX PANEL MOST COMMONLY USED FUNCTIONS INITIAL READING OF SYSTEM SOFTWARE/PAGES 1-2 RE-INSTALLATION OF TE SYSTEM SOFTWARE/PAGES

More information

Binary Trees, Binary Search Trees

Binary Trees, Binary Search Trees Binary Trees, Binary Search Trees Trees Linear access time of linked lists is prohibitive Does there exist any simple data structure for which the running time of most operations (search, insert, delete)

More information

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Spring

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Spring Has-Based Indexes Capter 11 Comp 521 Files and Databases Spring 2010 1 Introduction As for any index, 3 alternatives for data entries k*: Data record wit key value k

More information

4.2 Binary Search Trees

4.2 Binary Search Trees Binary trees 4. Binary earc Trees Definition. BT is a binary tree in symmetric order. root a left link a subtree binary tree is eiter: mpty. rigt cild of root Two disjoint binary trees (left and rigt).

More information

AVL Trees. CSE260, Computer Science B: Honors Stony Brook University

AVL Trees. CSE260, Computer Science B: Honors Stony Brook University AVL Trees CSE260, Computer Science B: Honors Stony Brook University ttp://www.cs.stonybrook.edu/~cse260 1 Objectives To know wat an AVL tree is To understand ow to rebalance a tree using te LL rotation,

More information

13.5 DIRECTIONAL DERIVATIVES and the GRADIENT VECTOR

13.5 DIRECTIONAL DERIVATIVES and the GRADIENT VECTOR 13.5 Directional Derivatives and te Gradient Vector Contemporary Calculus 1 13.5 DIRECTIONAL DERIVATIVES and te GRADIENT VECTOR Directional Derivatives In Section 13.3 te partial derivatives f x and f

More information

12.2 Investigate Surface Area

12.2 Investigate Surface Area Investigating g Geometry ACTIVITY Use before Lesson 12.2 12.2 Investigate Surface Area MATERIALS grap paper scissors tape Q U E S T I O N How can you find te surface area of a polyedron? A net is a pattern

More information

NOTES: A quick overview of 2-D geometry

NOTES: A quick overview of 2-D geometry NOTES: A quick overview of 2-D geometry Wat is 2-D geometry? Also called plane geometry, it s te geometry tat deals wit two dimensional sapes flat tings tat ave lengt and widt, suc as a piece of paper.

More information

, 1 1, A complex fraction is a quotient of rational expressions (including their sums) that result

, 1 1, A complex fraction is a quotient of rational expressions (including their sums) that result RT. Complex Fractions Wen working wit algebraic expressions, sometimes we come across needing to simplify expressions like tese: xx 9 xx +, xx + xx + xx, yy xx + xx + +, aa Simplifying Complex Fractions

More information

SORTING 9/26/18. Prelim 1. Prelim 1. Why Sorting? InsertionSort. Some Sorting Algorithms. Tonight!!!! Two Sessions:

SORTING 9/26/18. Prelim 1. Prelim 1. Why Sorting? InsertionSort. Some Sorting Algorithms. Tonight!!!! Two Sessions: Prelim 1 2 "Organizing is wat you do efore you do someting, so tat wen you do it, it is not all mixed up." ~ A. A. Milne SORTING Tonigt!!!! Two Sessions: You sould now y now wat room to tae te final. Jenna

More information

1.4 RATIONAL EXPRESSIONS

1.4 RATIONAL EXPRESSIONS 6 CHAPTER Fundamentals.4 RATIONAL EXPRESSIONS Te Domain of an Algebraic Epression Simplifying Rational Epressions Multiplying and Dividing Rational Epressions Adding and Subtracting Rational Epressions

More information

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Fall

Hash-Based Indexes. Chapter 11. Comp 521 Files and Databases Fall Has-Based Indexes Capter 11 Comp 521 Files and Databases Fall 2012 1 Introduction Hasing maps a searc key directly to te pid of te containing page/page-overflow cain Doesn t require intermediate page fetces

More information

Areas of Triangles and Parallelograms. Bases of a parallelogram. Height of a parallelogram THEOREM 11.3: AREA OF A TRIANGLE. a and its corresponding.

Areas of Triangles and Parallelograms. Bases of a parallelogram. Height of a parallelogram THEOREM 11.3: AREA OF A TRIANGLE. a and its corresponding. 11.1 Areas of Triangles and Parallelograms Goal p Find areas of triangles and parallelograms. Your Notes VOCABULARY Bases of a parallelogram Heigt of a parallelogram POSTULATE 4: AREA OF A SQUARE POSTULATE

More information

Fault Localization Using Tarantula

Fault Localization Using Tarantula Class 20 Fault localization (cont d) Test-data generation Exam review: Nov 3, after class to :30 Responsible for all material up troug Nov 3 (troug test-data generation) Send questions beforeand so all

More information

Fast Calculation of Thermodynamic Properties of Water and Steam in Process Modelling using Spline Interpolation

Fast Calculation of Thermodynamic Properties of Water and Steam in Process Modelling using Spline Interpolation P R E P R N T CPWS XV Berlin, September 8, 008 Fast Calculation of Termodynamic Properties of Water and Steam in Process Modelling using Spline nterpolation Mattias Kunick a, Hans-Joacim Kretzscmar a,

More information

Materials: Whiteboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector.

Materials: Whiteboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector. Adam Clinc Lesson: Deriving te Derivative Grade Level: 12 t grade, Calculus I class Materials: Witeboard, TI-Nspire classroom set, quadratic tangents program, and a computer projector. Goals/Objectives:

More information

Analysis of Algorithms

Analysis of Algorithms Analysis of Algorithms Trees-I Prof. Muhammad Saeed Tree Representation.. Analysis Of Algorithms 2 .. Tree Representation Analysis Of Algorithms 3 Nomenclature Nodes (13) Size (13) Degree of a node Depth

More information

PYRAMID FILTERS BASED ON BILINEAR INTERPOLATION

PYRAMID FILTERS BASED ON BILINEAR INTERPOLATION PYRAMID FILTERS BASED ON BILINEAR INTERPOLATION Martin Kraus Computer Grapics and Visualization Group, Tecnisce Universität Müncen, Germany krausma@in.tum.de Magnus Strengert Visualization and Interactive

More information

ANTENNA SPHERICAL COORDINATE SYSTEMS AND THEIR APPLICATION IN COMBINING RESULTS FROM DIFFERENT ANTENNA ORIENTATIONS

ANTENNA SPHERICAL COORDINATE SYSTEMS AND THEIR APPLICATION IN COMBINING RESULTS FROM DIFFERENT ANTENNA ORIENTATIONS NTNN SPHRICL COORDINT SSTMS ND THIR PPLICTION IN COMBINING RSULTS FROM DIFFRNT NTNN ORINTTIONS llen C. Newell, Greg Hindman Nearfield Systems Incorporated 133. 223 rd St. Bldg. 524 Carson, C 9745 US BSTRCT

More information

CESILA: Communication Circle External Square Intersection-Based WSN Localization Algorithm

CESILA: Communication Circle External Square Intersection-Based WSN Localization Algorithm Sensors & Transducers 2013 by IFSA ttp://www.sensorsportal.com CESILA: Communication Circle External Square Intersection-Based WSN Localization Algoritm Sun Hongyu, Fang Ziyi, Qu Guannan College of Computer

More information

Lec 17 April 8. Topics: binary Trees expression trees. (Chapter 5 of text)

Lec 17 April 8. Topics: binary Trees expression trees. (Chapter 5 of text) Lec 17 April 8 Topics: binary Trees expression trees Binary Search Trees (Chapter 5 of text) Trees Linear access time of linked lists is prohibitive Heap can t support search in O(log N) time. (takes O(N)

More information

The Euler and trapezoidal stencils to solve d d x y x = f x, y x

The Euler and trapezoidal stencils to solve d d x y x = f x, y x restart; Te Euler and trapezoidal stencils to solve d d x y x = y x Te purpose of tis workseet is to derive te tree simplest numerical stencils to solve te first order d equation y x d x = y x, and study

More information

Cubic smoothing spline

Cubic smoothing spline Cubic smooting spline Menu: QCExpert Regression Cubic spline e module Cubic Spline is used to fit any functional regression curve troug data wit one independent variable x and one dependent random variable

More information

Section 1.2 The Slope of a Tangent

Section 1.2 The Slope of a Tangent Section 1.2 Te Slope of a Tangent You are familiar wit te concept of a tangent to a curve. Wat geometric interpretation can be given to a tangent to te grap of a function at a point? A tangent is te straigt

More information

Chapter 22 Splay Trees

Chapter 22 Splay Trees Chapter 22 Splay Trees Introduction Splay trees support all the operations of binary trees. But they do not guarantee Ο(log N) worst-case performance. Instead, its bounds are amortized, meaning that although

More information

When the dimensions of a solid increase by a factor of k, how does the surface area change? How does the volume change?

When the dimensions of a solid increase by a factor of k, how does the surface area change? How does the volume change? 8.4 Surface Areas and Volumes of Similar Solids Wen te dimensions of a solid increase by a factor of k, ow does te surface area cange? How does te volume cange? 1 ACTIVITY: Comparing Surface Areas and

More information

TREES. Trees - Introduction

TREES. Trees - Introduction TREES Chapter 6 Trees - Introduction All previous data organizations we've studied are linear each element can have only one predecessor and successor Accessing all elements in a linear sequence is O(n)

More information

12.2 Techniques for Evaluating Limits

12.2 Techniques for Evaluating Limits 335_qd /4/5 :5 PM Page 863 Section Tecniques for Evaluating Limits 863 Tecniques for Evaluating Limits Wat ou sould learn Use te dividing out tecnique to evaluate its of functions Use te rationalizing

More information

CMPE 160: Introduction to Object Oriented Programming

CMPE 160: Introduction to Object Oriented Programming CMPE 6: Introduction to Object Oriented Programming General Tree Concepts Binary Trees Trees Definitions Representation Binary trees Traversals Expression trees These are the slides of the textbook by

More information

Unit III - Tree TREES

Unit III - Tree TREES TREES Unit III - Tree Consider a scenario where you are required to represent the directory structure of your operating system. The directory structure contains various folders and files. A folder may

More information

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F))

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F)) DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING EC6301 OBJECT ORIENTED PROGRAMMING AND DATA STRUCTURES UNIT IV NONLINEAR DATA STRUCTURES Part A 1. Define Tree [N/D 08]

More information

MAPI Computer Vision

MAPI Computer Vision MAPI Computer Vision Multiple View Geometry In tis module we intend to present several tecniques in te domain of te 3D vision Manuel Joao University of Mino Dep Industrial Electronics - Applications -

More information

THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM

THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM THE POSSIBILITY OF ESTIMATING THE VOLUME OF A SQUARE FRUSTRUM USING THE KNOWN VOLUME OF A CONICAL FRUSTRUM SAMUEL OLU OLAGUNJU Adeyemi College of Education NIGERIA Email: lagsam04@aceondo.edu.ng ABSTRACT

More information

Symmetric Tree Replication Protocol for Efficient Distributed Storage System*

Symmetric Tree Replication Protocol for Efficient Distributed Storage System* ymmetric Tree Replication Protocol for Efficient Distributed torage ystem* ung Cune Coi 1, Hee Yong Youn 1, and Joong up Coi 2 1 cool of Information and Communications Engineering ungkyunkwan University

More information

ROOT: A node which doesn't have a parent. In the above tree. The Root is A.

ROOT: A node which doesn't have a parent. In the above tree. The Root is A. TREE: A tree is a finite set of one or more nodes such that there is a specially designated node called the Root, and zero or more non empty sub trees T 1, T 2...T k, each of whose roots are connected

More information

Investigating an automated method for the sensitivity analysis of functions

Investigating an automated method for the sensitivity analysis of functions Investigating an automated metod for te sensitivity analysis of functions Sibel EKER s.eker@student.tudelft.nl Jill SLINGER j..slinger@tudelft.nl Delft University of Tecnology 2628 BX, Delft, te Neterlands

More information

Redundancy Awareness in SQL Queries

Redundancy Awareness in SQL Queries Redundancy Awareness in QL Queries Bin ao and Antonio Badia omputer Engineering and omputer cience Department University of Louisville bin.cao,abadia @louisville.edu Abstract In tis paper, we study QL

More information

Trees. R. J. Renka 10/14/2011. Department of Computer Science & Engineering University of North Texas. R. J. Renka Trees

Trees. R. J. Renka 10/14/2011. Department of Computer Science & Engineering University of North Texas. R. J. Renka Trees Trees R. J. Renka Department of Computer Science & Engineering University of North Texas 10/14/2011 4.1 Preliminaries Defn: A (rooted) tree is a directed graph (set of nodes and edges) with a particular

More information

CHAPTER 7: TRANSCENDENTAL FUNCTIONS

CHAPTER 7: TRANSCENDENTAL FUNCTIONS 7.0 Introduction and One to one Functions Contemporary Calculus 1 CHAPTER 7: TRANSCENDENTAL FUNCTIONS Introduction In te previous capters we saw ow to calculate and use te derivatives and integrals of

More information

An Algorithm for Loopless Deflection in Photonic Packet-Switched Networks

An Algorithm for Loopless Deflection in Photonic Packet-Switched Networks An Algoritm for Loopless Deflection in Potonic Packet-Switced Networks Jason P. Jue Center for Advanced Telecommunications Systems and Services Te University of Texas at Dallas Ricardson, TX 75083-0688

More information

Efficient Content-Based Indexing of Large Image Databases

Efficient Content-Based Indexing of Large Image Databases Efficient Content-Based Indexing of Large Image Databases ESSAM A. EL-KWAE University of Nort Carolina at Carlotte and MANSUR R. KABUKA University of Miami Large image databases ave emerged in various

More information

Tree: non-recursive definition. Trees, Binary Search Trees, and Heaps. Tree: recursive definition. Tree: example.

Tree: non-recursive definition. Trees, Binary Search Trees, and Heaps. Tree: recursive definition. Tree: example. Trees, Binary Search Trees, and Heaps CS 5301 Fall 2013 Jill Seaman Tree: non-recursive definition Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every node (except

More information

Notes: Dimensional Analysis / Conversions

Notes: Dimensional Analysis / Conversions Wat is a unit system? A unit system is a metod of taking a measurement. Simple as tat. We ave units for distance, time, temperature, pressure, energy, mass, and many more. Wy is it important to ave a standard?

More information

March 20/2003 Jayakanth Srinivasan,

March 20/2003 Jayakanth Srinivasan, Definition : A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Definition : In a multigraph G = (V, E) two or

More information

You Try: A. Dilate the following figure using a scale factor of 2 with center of dilation at the origin.

You Try: A. Dilate the following figure using a scale factor of 2 with center of dilation at the origin. 1 G.SRT.1-Some Tings To Know Dilations affect te size of te pre-image. Te pre-image will enlarge or reduce by te ratio given by te scale factor. A dilation wit a scale factor of 1> x >1enlarges it. A dilation

More information

THANK YOU FOR YOUR PURCHASE!

THANK YOU FOR YOUR PURCHASE! THANK YOU FOR YOUR PURCHASE! Te resources included in tis purcase were designed and created by me. I ope tat you find tis resource elpful in your classroom. Please feel free to contact me wit any questions

More information

Binary Trees. Height 1

Binary Trees. Height 1 Binary Trees Definitions A tree is a finite set of one or more nodes that shows parent-child relationship such that There is a special node called root Remaining nodes are portioned into subsets T1,T2,T3.

More information

Classify solids. Find volumes of prisms and cylinders.

Classify solids. Find volumes of prisms and cylinders. 11.4 Volumes of Prisms and Cylinders Essential Question How can you find te volume of a prism or cylinder tat is not a rigt prism or rigt cylinder? Recall tat te volume V of a rigt prism or a rigt cylinder

More information

Optimal In-Network Packet Aggregation Policy for Maximum Information Freshness

Optimal In-Network Packet Aggregation Policy for Maximum Information Freshness 1 Optimal In-etwork Packet Aggregation Policy for Maimum Information Fresness Alper Sinan Akyurek, Tajana Simunic Rosing Electrical and Computer Engineering, University of California, San Diego aakyurek@ucsd.edu,

More information

All truths are easy to understand once they are discovered; the point is to discover them. Galileo

All truths are easy to understand once they are discovered; the point is to discover them. Galileo Section 7. olume All truts are easy to understand once tey are discovered; te point is to discover tem. Galileo Te main topic of tis section is volume. You will specifically look at ow to find te volume

More information

Density Estimation Over Data Stream

Density Estimation Over Data Stream Density Estimation Over Data Stream Aoying Zou Dept. of Computer Science, Fudan University 22 Handan Rd. Sangai, 2433, P.R. Cina ayzou@fudan.edu.cn Ziyuan Cai Dept. of Computer Science, Fudan University

More information

Areas of Parallelograms and Triangles. To find the area of parallelograms and triangles

Areas of Parallelograms and Triangles. To find the area of parallelograms and triangles 10-1 reas of Parallelograms and Triangles ommon ore State Standards G-MG..1 Use geometric sapes, teir measures, and teir properties to descrie ojects. G-GPE..7 Use coordinates to compute perimeters of

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

CSCE476/876 Spring Homework 5

CSCE476/876 Spring Homework 5 CSCE476/876 Spring 2016 Assigned on: Friday, Marc 11, 2016 Due: Monday, Marc 28, 2016 Homework 5 Programming assignment sould be submitted wit andin Te report can eiter be submitted wit andin as a PDF,

More information

UNIT III BALANCED SEARCH TREES AND INDEXING

UNIT III BALANCED SEARCH TREES AND INDEXING UNIT III BALANCED SEARCH TREES AND INDEXING OBJECTIVE The implementation of hash tables is frequently called hashing. Hashing is a technique used for performing insertions, deletions and finds in constant

More information

Operations on Heap Tree The major operations required to be performed on a heap tree are Insertion, Deletion, and Merging.

Operations on Heap Tree The major operations required to be performed on a heap tree are Insertion, Deletion, and Merging. Priority Queue, Heap and Heap Sort In this time, we will study Priority queue, heap and heap sort. Heap is a data structure, which permits one to insert elements into a set and also to find the largest

More information

MAP MOSAICKING WITH DISSIMILAR PROJECTIONS, SPATIAL RESOLUTIONS, DATA TYPES AND NUMBER OF BANDS 1. INTRODUCTION

MAP MOSAICKING WITH DISSIMILAR PROJECTIONS, SPATIAL RESOLUTIONS, DATA TYPES AND NUMBER OF BANDS 1. INTRODUCTION MP MOSICKING WITH DISSIMILR PROJECTIONS, SPTIL RESOLUTIONS, DT TYPES ND NUMBER OF BNDS Tyler J. lumbaug and Peter Bajcsy National Center for Supercomputing pplications 605 East Springfield venue, Campaign,

More information

Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson

Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson Reading: Carrano, Chapter 15 Introduction to trees The data structures we have seen so far to implement

More information

HW 2 Bench Table. Hash Indexes: Chap. 11. Table Bench is in tablespace setq. Loading table bench. Then a bulk load

HW 2 Bench Table. Hash Indexes: Chap. 11. Table Bench is in tablespace setq. Loading table bench. Then a bulk load Has Indexes: Cap. CS64 Lecture 6 HW Benc Table Table of M rows, Columns of different cardinalities CREATE TABLE BENCH ( KSEQ integer primary key, K5K integer not null, K5K integer not null, KK integer

More information