Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop your own algorithm and implement the C code for the following problem and compare single and multi threaded program performances: You have a set

Develop your own algorithm and implement the C code for the following problem and compare single and multi threaded program performances:
You have a set of n books with weights w1, w2,..., wn (in grams). You must pack them into k boxes. The capacity of each of these boxes (in kilograms) is c1, c2,..., ck. Our goal is to pack all of the n books in the k boxes without exceeding the capacity of any of the boxes.
Rules:
No group work
You will compile and execute your code (you should bring laptop, tablet, mobile phone etc.) and defend your project in class (13-17 May week will be evaluated out of 120,20-24 May week will be evaluated out of 100)
Draw flow chart of your algorithm by hand and bring it to the defence
User will input n and k values
c and w values will be generated randomly
You will check user input and randomly generated data integrity, no book can be larger than boxes, no box can carry all books.
You will calculate wasted storage capacitiy in grams
You will calculate how many boxes used out of k boxes
You will calculate efficiency of algorithm by (wasted_storage)*(#used_boxes/k)
Clearly display the result
You will upload both code together as a text into this assignment
Codes will go through similarity check
Similar codes will be evaluated as cheating

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

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

=+2. What functions can be localized in particular areas of cortex?

Answered: 1 week ago