Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only (e) 1. (18 marks) Consider the following scenario. A set of machines are to process jobs of varying priorities. Each machine has it's own

image text in transcribed

image text in transcribed

only (e)

1. (18 marks) Consider the following scenario. A set of machines are to process jobs of varying priorities. Each machine has it's own set of jobs stored in a priority queue. At times machines go down and we want to merge the priority queue of the down machine with one that is running. Once the dowin machine is up and running again, we'd like to split the priority queue of a machine to give the newly up and running machine a priority queue of jobs to complete. We will model this problem as special variation of a heap called a dangling-heap. A dangling-heap of height h is a tree consisting of a root with exactly one child, which is the root of a complete binary tree of the remaining 2h -1 nodes the root and (updated Feb. 14) and the complete binary tree satisfy a priority condition: the element at any node is the maximum of all the elements in the subtree rooted at that node (like a heap) . Note that a dangling-heap of height 0 consists of a single node. 4-for this question, things work out slightly more neatly with this definition of height Figure 1: The heap has 2h - 1 nodes, so the dangling-heap has 2h nodes A dangling-heap forest is a sequence of dangling-heaps Do, Di,.. . Dm such that height(Di-1)

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

Draw a schematic diagram of I.C. engines and name the parts.

Answered: 1 week ago