Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

algorithms and complexities 2. On-line median In class, we discussed the on-line kth largest problem. We solved it, using an augmented AVL-tree structure, with the

image text in transcribed

algorithms and complexities

2. On-line median In class, we discussed the on-line kth largest problem. We solved it, using an augmented AVL-tree structure, with the following characteristics: Insert(x) i e. the number of Insert operations, minus the number of Delete operations, up until now) in time and space O(logan) where n is the number of elements in the structure at this time Delete(x) in time and space O(log,n) where n is the number of elements in the structure at this time (i e. the number of Insert operations, minus the number of Delete operations, up until now). Findk) in time O(log,n) and space O(1) where n is the number of elements in the structure at this time (i e, the number of Insert operations, minus the number of Delete operations, up until now) Suppose that instead of doing the Find(k) operation, with k an arbitrary positive integer that can vary from one Find to the next, we replace it by Findi n/3) where n is the number of all elements that are currently stored in the structure Can you devise a data structure and algorithms for Insert(x) Delete(x) Find n3) which improve over the Find(k) approach discussed in class. (Obviously, that approach will still apply, so we know that all three operations can certainly be done in time and space O(logan); however, the question for you to solve is: Can you do better). Carefully formulate your data structure, outline the three algorithms in some detail, and determine with care the time and space complexities of your three algorithms different Do not repeat everthing)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

What is meant by LIBOR and LIBID. Which is higher? AppendixLO1

Answered: 1 week ago

Question

Describe the concept of corporate social responsibility.

Answered: 1 week ago

Question

Explore the concept of business ethics.

Answered: 1 week ago

Question

Discuss human resource management issues for small businesses.

Answered: 1 week ago