Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) A student has been asked to put some parcels on a shelf. The parcels all weigh different amounts, and the shelf has a maximum

image text in transcribed
image text in transcribed
image text in transcribed
(a) A student has been asked to put some parcels on a shelf. The parcels all weigh different amounts, and the shelf has a maximum safe loading weight capacity of 100Kg. The weight of parcels are as follows (in Kg ): The student has been asked to load the maximum weight possible parcels on the shelf subject to the maximum safe loading weight. State two possible approaches for a greedy algorithm solution to solve this problem. In each case, state clearly the result you would get from applying that approach to this problem, stating whether the solution is optimal or not. If your answer does not produce an optimal solution, what algorithm could be employed to find one? [10 marks] (b) One example of a greedy algorithm is the Kruskal algorithm for finding a Minimum Spanning Tree. The algorithm is shown below. Kruskal(G,w) 1 Let Q be the edges in E order ordered by increasing weight Initialise E to the empty set For each vertex vV Let C(v) be the singleton set containing v While E

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

=+country competitive advantages? Why? Support your point of view.

Answered: 1 week ago