Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Accounting Basics Expert

 

1. Is it possible to sort a set of n circles (instead of rectangles), by area, in linear time, using a similar argument as Part(a)? For that, we assume centers are point in the n n-grid and radii are integers bounded by n. Briey justify your answer.

Problem 2 [ 5 marks] Let X = f x1; : : : ; xn g be a set of n integers, satisfying xi n3 for all i, 1 i n. Describe an O(n) time algorithm that nds the minimal absolute value of the di erence between
elements of xi. That is, we are looking for some pair xi; xj such that xi  xj is closest to 0.
Problem 3 [2+4+2=8 marks]

We denote by leftheight(u) and rightheight(u) the heights of the left and the right subtrees of a node u. Which of the following trees must be of height O(log n)? Show your work.
a) There is a constant c > 0 such that for all nodes u in a tree T1 leftheight(u) rightheight(u) + c.
b) There is a constant c > 0 such that for all nodes u in a tree T2, leftheight(u) c rightheight(u) leftheight(u) + c.
c) Every internal node u in a tree T3 has exactly two children.

In this question we assume that all keys in an AVL tree are distinct positive integers. Suppose that the root node of an AVL tree T holds the key n. Estimate the largest possible number of nodes in T. Provide as exact estimate as possible.

Describe a data structure that supports the following operations in O(log n) time:
- search(x) nds the element with key x
- insert(x) and delete(x) insert and remove an element with a key x
- deleteLast() removes the most recently inserted element

Show how the B+-tree with M = 3 can be extended to support the oracle queries de ned below. In this question we assume that the data structure is static and it is not necessary to update the B+-tree. Recall that all key-value pairs are stored in the leaves of the B+-tree. Internal nodes contain copies of keys stored in the leaves. We assume for simplicity that an internal node with d children holds d keys; the i-th key stored in the node u is the smallest key stored in the i-th child of u. See Fig. 1 for an example.
12 21 24 31 43 49 51 57 62 67 79 81 82
12 21 24 43 51 57 62 67 79 82
12 43 57 79
12 57

Figure 1: Example of a B+-tree. In an oracle query osearch(x; ef ), we are given a pointer to a leaf that holds the key ef > x and we search for the key x. Let x denote the largest key stored in the tree that is smaller than x. Let df denote the number of elements between xand ef ; if x is smaller than all keys in the tree, then df is the total number of keys that do not exceed ef . Describe an algorithm that answers queries osearch(x; f) in O(log df ) time. That is, the time to answer a query osearch(x; f) must be logarithmic in the number of elements between ef and x.
Hint: You need to augment the B+-tree with additional pointers stored in nodes of the
B+-tree.

Accounting Basics, Accounting

  • Category:- Accounting Basics
  • Reference No.:- M91591194
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Accounting Basics

Question - larkspur inc reported the following in its 2017

Question - Larkspur, Inc. reported the following in its 2017 and 2016 income statements.   2017 2016 Net sales $183,000 $146,400 Cost of goods sold 109,750 87,750 Operating expenses 39,000 19,500 Income tax expenses 22,0 ...

Question - kramer corp reported the following sale and

Question - Kramer Corp. reported the following sale and purchase transactions related to a specific product in January 2017: Date Transaction Quantity Unit Cost Unit Sales Price Jan 01 Beginning inventory 5 $90 Jan 03 Sa ...

Question as a financial consultant you have contracted with

Question: As a financial consultant, you have contracted with Wheel Industries to evaluate their procedures involving the evaluation of long term investment opportunities. You have agreed to provide a detailed report ill ...

Question - hardcastle ltd had sales of 3 000 000 and net

Question - Hardcastle Ltd. had sales of $3 000 000 and net operating income of $900 000. Operating assets during the year averaged $1 500 000. The manager of Hardcastle is considering the purchase of a new machine which ...

Question review the course project guidelinesin the last

Question: Review the Course Project Guidelines. In the last module, you completed your estimate of cash flows for your project. In this module, you will calculate the break-even point for the project and the expected fin ...

Question - randolph company has two departments department

Question - Randolph Company has two departments (Department A and Department B) for Job #111. As cost drivers used to apply overhead to products, the Department A uses machine-hours and the Department B uses direct labor ...

Question - santana rey created business solutions on

Question - Santana Rey created Business Solutions on October 1, 2015. The company has been successful, and Santana plans to expand her business. She believes that an additional $86,000 is needed and is investigating thre ...

Question requirement 1 read the article in below attachment

Question: Requirement: 1. Read the article in below attachment, and answer the questions in a paper format. Read below requirements before your writing! 2. Not to list the answers, and you should write as a paper format. ...

Question - weston company has these data at december 31

Question - Weston Company has these data at December 31, 2017, the end of its first year of operations. Securities Cost Fair Value Trading $110,000 $122,000 Available-for-sale100,000 96,000 The available-for-sale securit ...

Question - walton computer services inc has been in

Question - Walton Computer Services, Inc. has been in business for six months. The following are basic operating data for that period: Month July Aug. Sept. Oct. Nov. Dec. Service hours 116 138 260 426 314 324 Revenue $ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As