Okay, so in BST we identified a problem of skewness and of course just giving a quick review that BST follow this order that is left will always less than the root which is always less than the right. So this is the, you can say property or this is the thing that the binary search tree follows. And this, for maintaining this property, you do need not to bother about anything, just bother about three nodes, let us say root, this is left and this is right. If we find this property is holding everywhere, then there is nothing to worry, automatically the entire tree that is formed will hold this property. just pick any three node if it is following left less than root less than right then we can easily say that the tree becomes the binary search tree starting from the root to the leaf then we were discussing about the difference between left height and right height that is defined as the balance factor okay and here the if you see here so it indicates the value could be zero or one but if you remove the mod value okay or we when we do a difference between tree left height minus difference between tree right height so it could be max zero one or minus one that is there okay now when we talk about the operations that is performed over the tree so they are insertion deletion searching and traversal okay so traversal where we have to widget the node and in searching we have to identify a specific item of interest. Okay. So, if you compare the searching criteria, so we are not actually modifying the structure of the tree. So, whatever the searching criteria that we adopt in binary search tree will be same for the AVL as well. Similarly, for traversal, it is similar to that of BST. But when we do insertion and deletion, so there will be change the balance factor that is the difference in left height and right height will disturb for example here if you can see when we are inserting a new element e in the existing tree then what we find we find the balance factor of node g and c changes okay so to overcome such changes we have to perform certain rotations that we have already covered in the last class okay and one important thing is that the rotation point will be the first node from the point of insertion okay here it is also written the rotation will happen on the first node who is violating the balance factor property will be act as the cent then we discuss about different type of rotations when we insert a node on the left of left sub tree then we have to perform LL rotation. When we insert on the right of right subtree, then it is called as RR. And similarly, when we insert on the left of right subtree or when we insert on the right of left subtree, so LR and RL rotations are performed. So, these rotations we have already seen. So, LL if you see when we are inserting into the left of left subtree, so we have to identify the node that violated and do the rotation around it so a goes down b comes up and this one then we have also seen one example so when we try to insert let's say 36 here so 85 will go up 96 come down 85 right child becomes the left child of a or 96 okay so what are the three steps that is being performed 85 goes up 96 becomes 85 right child and third thing is the right child of 85 become the left child of 96 right child of 85 becomes left child of 96. Okay, so this already we have done then in the you can see in a mirror image fashion there is another thing that is called rr rotation where we are trying to insert on the right of right sub tree on the right of right sub tree. So what will basically happen? So now here the a and b node will be opposite. Earlier in ll rotation the b node was the left child but in rr rotation the b node become the right child and in this case also b goes up and a become the left child of b and left child of b become the right child of a so three step again there will be okay or just summarizing in a slide and then we will see the deletion or what type of rotation that are being perform while doing the deletion okay so just giving you a ll rotation trick or what actually we are performing so ll rotation if insertion is happening on the left of left subtree. Then second step is designate the first node from point of insertion, first node from the point of insertion, which is violating AVL tree property against him, that is a balance factor property as A. So, who is node A? So, node A is nothing but the first node from the point of the insertion, which is violating the AVL tree or that balance factor property. So, we have to designate that node as A. Then the left child, child of A will be marked as B. Then what will happen? Make B as parent of A and A becomes right child of B. Further, the right child of A, if they exist, if any, if any, right child of A, if any, will become left child of E. So, this is the simple instruction you can remember. So LL, when we are inserting on the left of left subtree, then we will perform LL rotation. So we have to designate the first node from the point of the insertion who is violating the balance factor as A, its left child as B, perform the rotation. Okay, B goes up, A comes down, B's right child becomes the A's left child. Okay, and that's done. Similarly, if you perform the RR rotation, so when the insertion was happen in the right of right subtree, so designate a node from point of insertion as A which violates the AVL tree property, then the left child of A, the right child of A will be marked as B if you talk about RR rotation. So RR rotation is nothing but mirror image, RR is mirror image of L. So where I have put A, B other things will be repeated. Okay. So this was the RR when we were inserting 65 here. So the 44 become the first node, sorry, 34 become the first node that is violating the AVLT property. So, we designate as A and its right child will be designated as B. Then other things will be performed accordingly. Okay. So, just remember these three, four steps. So, this will surely help in doing the LL and RR. Okay. Then the next rotation or I just summarize the rr rotation if insertion of new node is on the right of right subtree then designate a node as A, which is first node from point of insertion violating A via free property. Its A's A's right child will be marked as B rotation, A become left child of B and B's left child becomes the right child of A. So, this is the summary. Why we are, I am writing this summary? Because we have to again consider A and B node in deletion or in R0, R minus 1 and R1 rotation. Okay. So, there this, this what we have summarized will be definitely helpful. Then we talk about the LR rotation and RL rotation. So, we have also concluded when we are doing the insertion on the right of left subtree or when we are doing the insertion on the left of right subtree. So, these are the four possibility we can insert into the left of left, right of right, left of right or right of left. So, these are the rotations insertion point we can perform. So, then we also discussed that this LR rotation I am considering is or RL rotation will have double rotations or LR is nothing but RR followed by LL. So, this means that if we well understood the concept of RR and LL, so we can perform LR. So, in LR rotation, rather than identifying A and B, we have to identify three node A, B and C and the point of insertion is the left of C. Now, the first node that violates the abl tree property here if you witness is A, but the insertion has happened on the left of right subtree, left of right subtree. So, sorry, the insertion was happened on the right of left subtree because this is the left subtree and B and in the B we are inserting it. Okay, so left of, so right of left subtree, this is left subtree. Then either there is a direct method, we identify A, B, C, C will become the root, A become the right child of C and left child of C is the right child of B and right child of C becomes the left child of A. So, that is the, you can say summary of this LR rotation and similarly RL rotation is just a mirror image as we have seen LL and RR, okay. So just giving a summary of this one, LR rotation, when the insertion of new node happens on the right of left subtree, when insertion is happening on the right of left subtree, And what we have to do, identify the first node from point of insertion which is violating balance factor property designate as A. Then C, A, left child becomes P and B, right child becomes C and if you see basically here A is left child B L L resemblance and B right child C are our resemblance okay so that is interesting thing you can of zone and then what we will do fourth position c is parent of b and a that is the now right child c is left and right child's are distributed among b and a that is the okay so that becomes the lr notation now and then in the previous class we have uh do a raw insertion in the uh empty avian tree okay so So now we will talk about the deletion in the avial tree. So deletion in the avial tree also violates or also changes the property of the avial tree. Therefore, we perform three types of rotation that is r minus 1, r 0 and r 1. So r 0, r 1 and r minus 1. So what is this r 0, r 1 or r minus 1? It is the balance factor of the node B. So, if the balance factor of node B is 0, then we will perform R0. If balance factor of node B is 1, then we will perform R0. If balance factor of node B is minus 1, then we will perform R0. So, important thing in this scenario is that the identification of node B. So, let us start with the R0 rotation, where it is applicable and what else the things. So, let us say we have a tree A, B. So, B is nothing but the left child of A or we can say that the first node that is violating the balance factor property become A and its left child is becoming B. Here we are not considering the right child. Here I am saying only the left child. So, b so if you see the b b is having now the balance factor of 0 and a is having the balance factor of 2 because we have removed something from right in the other way what we can say that if we insert left of left it is as equivalent to deletion from right of right Okay, so line I will write here, the insertion on LL is equivalent to deletion on RR. Okay, so just keep in the mind. Now, if you see here, basically here what rotation we are performing, B is going up, A is coming down and other things. So, this is simple LL rotation. LL rotation y? So, insertion on the left of left is equivalent to the deletion from right of right. So, just taking a 2, 3 minute break, then again we will resume. Now, if you can see, basically what we are doing, we are removing something from right, then it is as equivalent to insertion on the left. So, here if you see R0 rotation, So, R0 rotation, R0 means that the 0 is the balance factor of left child of A. So, A is the first node who is violating the avial tree property. And if the left child of A that is designated as B is having the balance factor of 0, then what we can do? We can say the rotation is R0 and this is equivalent to the LL rotation. Because you know LL, so R0 is easy for So, now if you see an example, if we in this example, okay. So, first calculate the balance factor 7, leaf node 0, 24, leaf node 0, 60, leaf node 0. Now coming on to the 18, left child 1, right child 0. So, 1 minus 0, 1. For 20, left child 2, right child 2, balance factor is 2 minus 2 that is 0, for 24 it is 0 and for 23 it is minus 1 because there is no left child and only one right child. So, 0 minus 1 minus 1. Now, if you go ahead for 54 it is again 0 minus 1 minus 1 and for 46 it is plus 1. Now, if we want to remove 60, so now we have removed it because we know that the BST says first identified the node then deleted. So, we have deleted 60. Then what will happen? 54 will have balance factor 0 as you can see here. And this 46 will have become the balance factor of how much? 1, 2, 3 and 1. So, 3 minus 1 that is plus 2. So, this is the first node from the point of deletion and designate its left child as B. Now see the balance factor, it is what? 0. So the rotation will be R0 and that is as equivalent to the LL rotation. And then we do a rotation and afterward if you calculate the balance factor, so we are witnessing that it is now in the range of 0, 1 or minus 1. So this is R0 rotation. So R0 is nothing but the balance factor of the left child of the A, which is the first node that is violating the avial tree property. One important thing here is A is not always the root node, A is the first node that is violating the property of the avial tree from the point of insertion or deletion. So, that is important consideration. This root scenario that every time we are considering A as root is not applicable when your tree is very large okay this is though we are considering very small example let's say we want to remove 24 okay let's say we want to remove 24 in it so what will happen the balance factor of node 20 will not change because it is 18 17 23 okay and thus there will be no change if we again remove after 24 reboot 23. So, what will happen? Balance factor of 20 becomes 2. 2 minus 0 that is 2. But here the left child B is having a balance factor of what? 1. So, here the rotation that will be performed that will be R1. So, that we will consider. One important note I will write here that a is not always the root node it can be any intermediate node which is violating AVL tree property which is violating the AVL tree property. Now coming on to the R1. R1 means that against the balance factor of the node B is 1 rather than 0. So, if we remove something from here, so A becomes the node that is having the balance factor 2 and B is the node that is having balance factor of 1. So, we will now perform R1 rotation. And if you see here, what is happening? B is going up, A is coming down. So, again, this is a resemblance of LL rotation. Again, it is a resemblance. And why we are calling R1? Because the balance factor of the left child of the node A is 1. So, simple. So, you need not to panic. Just if you remember LL rotation applied, you will get back the result. So here, if we want to remove 39, so what will happen? 37 will have a balance factor of what? 2. Then what will happen? 26 will go up, 36, 37 comes down and right child of 26 become the left child of 37. So here is the rotation tree. So basically, this is LL. Why we called R1? Because the balance factor of node B is 1. If it is 0, then we will call it as R0. So, I hope deletion is clear because it is simply you can say a variant of LL rotation. Now, coming on to the last rotation that we perform that is R minus 1. So, of course, the node B will have the balance factor of minus. So, this rotation is as equivalent to LR that we have studied. So, here the balance factor of node B is minus 1 if you can see and A is now 2. So, we have to identify the another node C that is right side of B and then perform the LR rotation, simple LR rotation what we have did and we will get back our result. So, here is the thing when we want to remove 52. So, what will happen? The balance factor of this one is minus 1. So, this is A that is violating B and C. C goes up, A comes down and left child of T become the right child of B and right child of C become the left child of A, that is the rotation. So, in summary, if you write, before starting the new tree, in summary, what I can write R0 is equivalent to LL, where node B is having a balance factor of 0. R1 is also equivalent to LL, where node B is having a balance factor of 1 and R minus 1 is equivalent to LR where node B is having the balance factor of minus 1. So, this you have to remember. So, deletion becomes very easy because we already had a function or we already know how LL rotation and LR rotations are being performed. Now, Now, if I ask a question, why sir, you are always constructing a tree that is having only two child? Why not we can construct a tree that is having more than two child? So, the question is, yes, we can have such kind of tree. So, in this part we will target trees that is basically called as M-Way rather than two-way tree. So, two-way tree is binary tree and other than it is called as the M-Way tree. Now, let me talk about the practicality where this M-Way tree or its variants. So, in this part, we will cover two important trees that is M-Way tree and M-Way tree and to balance M-Way tree, there is another tree that is called as the B tree and there is one more variant of B tree that is called as the B plus tree. So, there is a light difference between these two, but this is the balance M way tree. So now, let us talk about one important concept. In secondary storage, primarily when we consider the hard disk, in secondary storage, what basically we are doing we are adopting the mechanism of indexing or we can say even sometime we have multi level indexing and for because this this batch is full of diverse background people so what i can say that if i have to search for a specific topic in your book then what i will do i will first go to the index page and search okay the chapter number four is having this topic at this page number then we will directly go to that page number and fetch the data okay if let's say this index space was not there in the book then what we will do we will search entire book and identify a specific topic when a very large time so this this basically what is happening with indexing thing we can get direct access to the data or frequent access to the data or in other term we can say that the the search or traversal search time is easy because when we ask some question and if its result is coming in a longer duration then no one is going to use our website or web browser so it should be limited so therefore if we do this indexing similarly if this index is very large as well okay so we can have another index that is having only the information about the chapters. And inside the chapter, it is having the detailed information about what are the topic covered and what are the page number. Similarly, we can do another label. So, what this is, this is called as the multi-label indexing. So, the data that is being stored in the secondary storage can be referred from a index, okay, and which can be further referred from another index, okay. So, suppose if I want to search something, then what we will do? We will first refer to the first label index, second, third, fourth, fifth and last label, we will find our data. So, this is how, so when we store data in the hard disk in form of sectors, blocks, so what we will do? We will also maintain one index, which could be multi-label, which could be multi-label, further index, index, index and so on, so that the retrieval can be easy. Now, what is the situation? We have to maintain multiple value on different labels. So, we cannot say that a single element likewise in binary search tree could be stored to facilitate it. So, for this we have to make a node that is having m child rather than two child. m could be 5, could be 7, could be 3, could be 4, could be 2, whatever we want will be the m number of child will be there. So now how to control what type of information are being stored. So now a node will look like this one. We are having multiple values and multiple child information. So this type of tree is called as the mv tree. So how mv tree is formed, how that values are stored and how other deletion and insertion happen that we will see in detail. One more thing now I hope mv tree is the tree that is having the possibility of m child and each node will hold not a single value like BST but could be a set of element or array or even you can say entire index thing can be stored in a single node. So before studying the property or what is the thing? Let us say I had two nodes, 17, 16 and 21. So, this is also BST, this is also BST, binary search tree, binary search tree. Now, what I did, I merged them or even let us say I have another binary search tree, 22, 23, 21 and 27. So, these are binary search tree. I hope everyone will agree because it is following the property that is left less than right root which is further less than right. So, all three are BST. Now, do one thing. So, this is totally off the topic means I do not claim this is part of book but to let you know how mv tree looks like. So, there this will help. Now, I want merging. i want merging all stuff so what will happen 13 left child no worries then i merge with 17 and here is one will be pointer that will hold two values that is 15 and 16. similarly we have 23 where two values will be stored that is 21 and let it let it be 22 because we know that binary tree don't allow duplicate element and here we have 27 okay so what this means now this tree is not two way it is two way means two now the childs are one two three and four four child so this is a four-way tree where maximum allowed child could be four and the number of element maximum number of element that could reside on any node will be three okay and here order is what increasing order 13 17 23 and if you see here one interesting thing this 7 is less than 13 and in between node is what in between is in between so it it should be greater than 13 and less than 17 15 and 16 here the nodes are 17 23 So, greater than 17 and less than 23 and here the greater than 23 is stored. So, basically mv tree is nothing, you can assume it is a merger where the common point hold the property of BHT where root is less than those value on the left side and root on the right side will be greater than that one. So, this is how we are forming a mv tree. So, let us consider some property and example okay then we will take the query now so mv search tree all the data structure discussed so far like bst and other uh in the internal memory stored in the internal memory hence support internal information retrieval okay so bst and other things are primarily using the rant to favor the retrieval and manipulation of the data stream into the external memory via storing device such as hard disk it is required to have some specialized data structure as i was discussing okay just give me a minute just give me one minute okay so mway tree so mway search tree b tree b plus tree are example of such data structure that allowed different retrieval pattern for the secondary storage. And here of course, the height of the tree is close to the log of n. So of course, the search and other things will be accordingly managed. So now let me take your queries, then we will see one example and how this property are maintained in that we will check it out okay so uh ohm you can start providing access to one by one on for anuja i am doing others you can see okay sir yes good morning sir good morning uh sir if you can go to the deletion slide very well explaining uh which deletion r0 r1 any one thing yes we can do with r0 also that is going to find uh so the example that you were giving right uh the numbers uh yeah yeah so here uh does this 60 when you said delete 60 is it going to be provided in the question uh that is it will be provided okay and in the real time scenario when uh when this has been implemented I mean, in terms of the RAM, right, it is being used, you said. So here, I mean, the question was how this deletion part that is 60 is being deleted or 60 is a position where we need to do the rotation is supposed to be taken up as a part of implementation I'm trying to understand. I mean, I know the lab will be going to explain it, but as a theoretical concept, how this 60 is being chooses so that the thought process can be cleared. there is a no so so 60 could be one some record some specific record okay which we want to remove from our this okay so maybe this 46 is a um you can say index stuff or uh or this 60 is an index and stuff that we want to simply remove okay so that is now target is given so if we remove because we are making a logical structure of the tree like structure and if 60 removes then our logic will fail because the access time will will increase because we are having left branch more longer than right branch so to balance out those things we have to perform so again i'm saying this avl bst other things are the logical organization of the memory and we try to keep the balance factor 0 1 or minus 1 so that the log of n search time will be maintained okay so if i just say as a understanding the the kind of property which we are going to use here is uh just because we are trying to balance the indexing part is it sir yeah left height and right of the height of the tree or primarily it is so 46 20 54 could be the index or uh location of some of the data that we want to fetch okay let's say i want to delete some data that is stored at some location y and that is pointed by this 60 so simply removal of the 60 indicate what there will be no pointer to the data and automatically the data will be removed sure so sir just to extend this question so uh i mean in a implementation or in a user's point of view uh if i say any application which is being uh utilizing the ram as a as a primary storage when it's loading so like any any model is being loaded is being loaded in the ram at the first place yeah when it actually has a kind of environment which is a cpu kind of environment does the cpu shares the processing area and the ram shares the actual storage part right there right there does this uh indexing process when we say this right uh like deletion as well as the insertion position is being logically applicable there too if we just say because uh that modeling will also be happening over there as a part of yes yes yes as a part of ram to utilize the space or to ensure that the faster access these policies are already there and beyond this we will see b plus three that is already there in modern hard disk as well b plus okay our b plus in also using uh this dv dvms very very highly that are used for faster access okay and does this also extend with the vram processor uh yeah yes yes yes so the what the concept of vram is also coming so the because it is also the part of hard disk so this logical arrangements uh help so if these kind of things were not there so we never able to get the vram thing in our pc yes absolutely so i'm just summarizing the part of vram also so does this vram covers the m-way assembled with this uh logical structure of the ram which we just talked about yes yes okay so it's an ensemble approach okay yes yes to provide the extra space we are now creating one logical arrangement so that we can get more ram in our memory okay so it's a combined process where combined process and and those data that are less so kind of cast and so if let's say some data that need to be loaded in a while or we can say that that that immediate requirement is not there so we will push toward the vram and then it is pulled toward the ram so sir one more question so does the caching also follows the same approach here i mean uh because caching happens in the real time movement only and uh uh i just take an example like we do currently the llm caching right we just don't go with the inference directly at times we go with the caching approach too so the inference can be faster faster so so does that also follows the same uh concept of this uh you can say so caching and the the logical organization and other stuff of course there is but but it is managed by uh different other properties so it is primarily aligning with the scheduling and other stuff so rather than going toward the tree another structure so this is how the faster access to of the data is stored in the secondary devices and caching is the key what are the frequency of the data that we are witnessing so the two different things but if i found some tree that are primarily emphasizing on the cache logical organization then i will discuss in class someday okay in some day okay okay sir thank you so much sir thank you so much hello sir good morning good morning hi sir i have a question like um how does the avl tree's height constraint mathematically guarantees a complexity of o log n search time where we can derive the minimum number of nodes required for the tree for the height in so um uh if you see uh if you see when we have started avl and we were talking about the skewness if a bht that is totally in the leftward direction okay so it become a linear search for identifying any element so avl say that whenever a new insertion or deletion will happen i will try to restore the height in the range of 0 1 or minus 1 means that the left tree is having a difference of either 0 1 or minus 1 so that is allowed okay so in that way when you want to search something so you will not reach to order of and it will be somewhere order of n or n plus one or n plus two so that that that is strategy that this basically avl tree is adopting by by using the balance factor thing okay okay thank you sir i guess ohm we are good to go no more hand raised okay thank you thank you so either i am teaching very good or people are not getting the concept okay but these topics are little little tricky uh that i assume because those people who are seeing first time. So, of course, that is difficult. So, just go through my PTs and this, you can say video lectures. So, definitely that will be helpful. Now, starting the m way tree. So, I am just closing this. I had new slides. Now, before reading the property, let us see one example. So, here we have five way tree. So, five way tree means the maximum allowed child is 5. So, minimum is always 2. Maximum, so if any tree is given and this 5 way, 6 way or 3 way is not given, so identify any node that is having the maximum child. So, here what is here? 1, 2, 3, 4, 5. Here there is another node that is 1, 2, 3, 4, 5. This means that this tree is a 5 way. So, if no information is provided, then what we can say? We can identify any node that is having the maximum number of child and if what is the number will be the way of the tree. So, this tree is a 5 way means that maximum allowed child is 5. Now, on each node we have two fields. One is address pointer and another one is the key field and we know that addresses could be 5 because it is 5 way. So, key could be 4. So, there is a relation that key equal to m minus 1 and address equal to m that is the m way tree okay and second thing is that in all the node key are arranged in ascending order if you see here okay now one can see why some some nodes are having less tree why some nodes are having so this this is a resultant tree after performing multiple insertion and deletion okay and when we draw a tree from very much scratch so we will try to fill all the nodes on one level then we will go down okay so that the formation will be different but here this tree is arising from multiple insertion and deletion so we are seeing this kind of structure so maximum allowed child is five minimum allowed child is two so if you see here 262 is a node that is having two child so this is equivalent to bs3 okay this is having three three key four child this is having one key two child this is having two key three child so So, child could vary from 2 to 5 and key could vary from 1 to 4 and all the keys are arranged in ascending order. Okay, second thing is that if you see here, the left is having the child that are less than 18, there is no right child, here there is no left and right child. If you foresee 198, the left child are less than 198 and greater than 76 and right child are greater than 198. this property that we have to maintain okay so what we can say I hope you people are clear so key could be 1 2 3 4 addresses could be 1 2 3 4 5 okay and node can have 5 2 2 2 5 child he will be 1 2 4 okay so let us check out the properties then we will see the how insertion deletion and other steps are being performed. Now, the M way tree may be an empty tree, T is not empty, maybe empty means that there is no key and no address or child pointer. So that will be an empty tree because nothing will be an empty tree of course that we know. Second thing if it is not empty then what are the property? So for some integer m known as order of the tree each node is of degree which can reach a maximum of n degree means that maximum number of child could be five in other word each node has at least at most m child node that most means that maximum node will be max will be m a node may be represented as a 0 k1a1 k2a2 k-1 a-1 where ki are the keys and a0 are the pointer to the subtree so that we know if a node has k child node where k is less than or equal to m then the node can have k-1 key getting if it is having k child node or five child node so maximum key could be what four second thing is that contain the node is such that k of i th node is less than k of i plus 1 that we know with that ascending order ascending third if node a 0 k 1 a 1 k 2 a 2 all the key value in the subtree pointed by a of i is less than k plus 1 okay and all the key in the subtree pointed by a m minus 1 are greater than a m minus 1. So that is the same property if the tree being pointed by 18 in the left is less than 18 in the right greater than 18 but less than 44. That is just remember this the merger what we have told okay. BST two trees were there then another two trees were there. So while merging what we will do we will insert here here and middle one will have the values that is greater than this but less than this. So, this property is node. So all values in the subtree pointed by a i, a i is here if you can see, is less than key k i plus 1. And for each node a i 0 to i minus 1 also known as m-way search tree. So key will be m minus 1, okay. So if you see here, this is the 5-way search tree. I hope you people can connect what I am saying. On each node maximum allowed key is m minus 1, maximum allowed child is m, minimum allowed child is 2, minimum allowed key is 1 and extreme ends for left and right, there is no worries. But for what we can say the common end. So, the range of value that is being stored on the address A1 is in between 18 and 44. On address A2 should be in between 44 and 76. On A3, the address that is stored value will be in between 76 and 198. So, if you see here, it is following. So, all the values, even 186 others are less than 198. And here on the extreme is, we have to put the higher factor, okay. So I hope the property of mbit is little bit clear to you all, okay. And now talking about the searching thing. So searching, because we know that all the keys are stored on the, each node are in ascending order. So let us say we want to search something. we will directly get a part from any node or maximum number of comparison that we have to perform on each node will be the m minus 1. And that is much, much less than that of the total number of node in the tree. And therefore, the searching time will be again tends towards log of n. Now, one question arises, sir, on each node we are having number of keys. So, how the searching time is log of n, because on each node, of course, I am agreeing that it is having number of node, but that is far less than that of the total node in the tree. So searching is easy, we can start with the root as we were doing in the binary search tree, fetch out the element in the root and accordingly we will get a direction key where we have to move. Let us say we want to search 186. on this node 80 44 76 and what is the value 186 so it will be in between 76 and 90 so here we get an address so we reach here so what we found 144 greater value so 186 and here we identified 186 so searching in m-way trees as similar as BST but on each node we have to do a searching of maximum of m minus 1 maximum of m minus 1 so searching is in this way insertion and deletion aspects is a little bit tricky okay so in any Any tree that I have discussed before in binary search tree or in AVL tree, similarly in MVA tree. So MVA tree you can say is an extended variant of binary search tree. There will be no duplicate element. So before inserting a new node, we have to first search whether it is available or not. If it is not available, then we will add otherwise we will deny. So now I want to insert something here. I want to insert 6 in this node. this tree if I want to insert 6, so 18 says 6 could be placed on my left, here we go. So this say 6 could be placed on my left because 7 is the value. So what we will do? We will insert 6 because we know that each node can have the key count of 4 and here the key count is only two so six can be directly injected or inserted okay now if i want to insert 146 in this tree okay so insertion and deletion i will cover in detail in the next class okay okay so insertion can be happen on a node up till we have sufficient space and there is no downwards key if let's say there was some downward key from the seven so we will first explore that path if we don't find then we will add 6 there. Since 7 is not having any left child, so 6 was inserted here. So this all discussion of insertion and deletion we will cover in the next class. Then we will see one of the interesting and famous tree that is called as the B tree and afterward there is the last topic in the tree that we will cover that will be the heap. Then we will start the graph little bit and afterward dynamic programming and other aspect we will try to cover. okay so i am stopping here for today because insertion will require another thing and i have already covered some complex things so just requesting after this class i will upload the ppt do refer it okay and in lab we will try to also cover the mv3 insertion and deletion okay so at least insertion i will ask my tier to cover in the upcoming lab okay i am stopping here and if someone has any query then then will it happen to be yes uh anuja your mic is already enabled yes sir if you can go to the slide again uh where you explaining the example of five way tree actually kind of lost how the tree is structured okay let me draw a bare hand okay so the so the one question has started it's this 1844 76 198 no no so this is the five way tree so it was 18. so is it a merge tree already sir so like uh it has some bsts which has merged to 18. yes yes why i am feeling that now there is no such kind of concept in any literature but you can visualize how the things are happening so that's yeah that's where yeah yeah so how it has been started from there i'm just kind of lost actually yeah how empty tree is formed like this yes yes yeah so uh basically um let's say i have some set of values okay i'm just putting 17 17 okay so so this is good for everyone 17 32 45 73 29 44 48 47 41 unique value because they do not allow duplicate it now i want i say that form a three-way tree so the tree that you people have witnessed is the tree that is resultant after multiple insertion and deletion okay and when we try to draw a tree that will not look like that so three-way first node is 17 second second node is 32 that is formed and there will be three pointer one two and three now 45 comes so it will go in the this directions then come 73 so it will be accumulated with here because maximum allowed node is maximum loud um keys are two so one one question here uh so when you selected 17 and 32 does it anyhow have to have a sorting firstly so first 17 17 is added if let's say first node was 32 then 17 so we will insert it and sort it because 29 is already there in the list but but first note that we encountered is 17 so we are not okay okay okay okay okay then then 29 comes so it will be placed here then comes 44 so 44 will try to accommodate but it say i am full so you can be my left child then 48 comes so it is saying 45 is saying what you could be on my right so it is 48 then 47 comes so 47 says 45 says you can go to my right 73 say you can go to my left so 47 is added here so here what we are having 48 but 47 is inserted just before then comes 41 so 41 will be inserted here so this is the tree how it will look like other value will come so so we will try to fill in one label then we change the label so that a compact structure is formed okay so it's like uh firstly we go ahead with this uh uh routing point which is like 17 and then then we will put 32 now that label is full so we will come down to another level so i mean so just to confirm so when we selected this 29 29 is selected uh via the logical answer that this is lesser than 32 uh that has to come with the left yeah and higher than 17 is it sir yeah yes yes that is the okay and the same with then 32 is like uh showing across the right so it's like giving 45 but again it's a higher number uh it's from 32 it's not the lesser one yeah yeah uh so sir how it is being just to confirm because 17 yeah i understand 29 is higher than 17 but uh 7 but 32 which is like the 40 45 45 is higher than we are doing insertion from the beginning now so first i encountered put it to the root second element i encountered put it into the root because space was there now root is freezed then 45 comes so it will go beyond 32 or in the the right of 32 so 45 comes here okay okay okay okay in that way okay okay understood sir okay yes mohit good morning sir good morning yes doubt is in the same example what you have explained just now yeah so you have taken two notes 17 and 32 because we are having two places here or just two will come i mean how we decided i have i have considered about three way trena so maximum key could be two maximum child could be three okay thank you thank you okay so we are good to close thank you everyone for joining and tomorrow the class will be important because i will try to start b plus b tree so that is important concept so do join okay thank you thank you everyone thank you thank you sir thank you thank you sir bye thank you for your support