Question

Hello this needs to be a small write up with drawings. important bit is the second...

Hello this needs to be a small write up with drawings. important bit is the second part describe how the credits in the proof of Lemma 8.3 are used

Illustrate what happens when the sequence 1, 5, 2, 4, 3 is added to an empty ScapegoatTree, and show where the credits described in the proof of Lemma 8.3 go, and how they are used during this sequence of additions

Thanks

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Scapegoat Tree:

Scapegoat Tree is a self balancing binary search tree.

Insertion:

Insertion is implemented with the same basic ideas as an unbalanced binary search tree.

An entire subtree rooted at a scapegoat undergoes a balancing operation.

size(left) ≤ α*size(node)
size(right) ≤ α*size(node)
size[x+1] = size[x] + size(sibling) + 1

Where x = this node, x + 1 = parent and size(sibling) is the only function call actually required.

Algorithm Average Worst Case

space O(n) O(n)

Insert O(log n) amortized O(log n)

Delete O(log n) amortized O(log n)

5

/ \

3 4

/ \

1 2

5 = 5 is the root node.

5 have two child 3 & 4.

3 also contain the two child node 1 & 2.

1,2 & 4 is the leaf node.

In Scapegoat tree a counter 'i' always maintains an upper bound on the number of nodes and scapegoat tree is a binary search tree.

left part = left part<root node

right part = right part>root node

consider our sequence 1,5,2,4,3

first insert node "1" then counter i also equals to n or greater .i.e i=1 beccause n = first node i.e 1.n is the no of nodes in the tree.

1) i/2 <=n=""><=>

2) log3/2 i<= log 3/2 2n =""><>

initially i =0 because numbers of nodes are 0.

after inserting first node '1' i.....

Add a comment
Know the answer?
Add Answer to:
Hello this needs to be a small write up with drawings. important bit is the second...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • hello I need help with this i have to write a report about this The importance...

    hello I need help with this i have to write a report about this The importance of cell-cell contacts for cell function Professor Ellen Grandesco, principal investigator of the research group The Cell Contact Unit at the faculty of Medicine, LU, is in the process of writing a research proposal for a new project. The general aim of the proposal is to study the role of cell-cell contacts for the function of HEK293 cells, a human kidney cell line. Ellen...

  • please explain/ comment 3. Eight Queens Write a program that places eight queens on a chessboard...

    please explain/ comment 3. Eight Queens Write a program that places eight queens on a chessboard (8 x 8 board) such that no queen is "attacking" another. Queens in chess can move vertically, horizontally, or diagonally. How you solve this problem is entirely up to you. You may choose to write a recursive program or an iterative (i.e., non-recursive) program. You will not be penalized/rewarded for choosing one method or another. Do what is easiest for you. 3.1. Output Below...

  • Epigenetics Video: Please go to the link for the video on D2L on epigenetics and then answer the questions: Y...

    Epigenetics Video: Please go to the link for the video on D2L on epigenetics and then answer the questions: You may need to watch the video more than once to find the answers. Answer the following questions. Twins: 1. What is one reason why identical twins may not look or act the same? 2. Why would one twin having a disease make it more likely for the other twin to have the disease? 3. Why would they not always have...

  • LAB PROMPT: Lab 07 Hello future bakers and artisans of the fine gourmet. You love to...

    LAB PROMPT: Lab 07 Hello future bakers and artisans of the fine gourmet. You love to throw parties, and what goes better at a party than cake! The problem is that you only have enough flour to bake a limited number of cakes. In this lab, you will write a small program to figure out if you have enough flour to bake the number of cakes needed for the people attending. Step 1 - using final At the top of...

  • if applicacable, please write clear stepwise mechanism for all synthetic transformations, showing important internediates where appropriate....

    if applicacable, please write clear stepwise mechanism for all synthetic transformations, showing important internediates where appropriate. only do this if applicable for this lab. Experiment SD Column Chromatography Running the Reaction. Once sodium borohydride has been added to the reaction meture Isee next paragraph take samples at the times just indicated. Because this must be done in such a short time you must be well prepared before starting the reaction. One person should be the timekeeper, and the other person...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

  • Hello! Could you please write a 6 paragraph summary (5-6 sentences each paragraph) of the below?...

    Hello! Could you please write a 6 paragraph summary (5-6 sentences each paragraph) of the below? In the overview, if you could please describe the information in detail. Please have completed in 6 days if possible. Thank you! In 50 Words Or LesS .6TOC combines lean Six Sigma (LSS) and the theory of constraints (TOC) for bottom-line benefits . The method's metrics pyramids and communi- cations allow organiza- tions to retain gains and monitor benefits. · 6TOC goes beyond fac-...

  • hello there, i have to implement this on java processing. can someone please help me regarding...

    hello there, i have to implement this on java processing. can someone please help me regarding that? thanks War is the name of a popular children’s card game. There are many variants. After playing War with a friend for over an hour, they argue that this game must never end . However! You are convinced that it will end. As a budding computer scientist, you decide to build a simulator to find out for sure! You will implement the logic...

  • DISSONANCE BETWEEN EMPLOYEES Matt created his T-shirt business, T'd up, 30 years ago, building the company...

    DISSONANCE BETWEEN EMPLOYEES Matt created his T-shirt business, T'd up, 30 years ago, building the company up from a small, no-name brand that he ran out of his parents' garage while he was in school into a well-known local company that supplies custom T-shirts and other clothing and accessories for a wide variety of customers, both local and national. T'd up's big break came 20 years ago when a local band became famous and sourced all of their concert clothing...

  • Assignment Overview In Part 1 of this assignment, you will write a main program and several...

    Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT