Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question: Suppose that you have a number of boxes, each of which can hold total weight 1.0 and items i1, i2, i3, ..., iN, which weigh w1, w2, w3, ..., wN, respectively. The object is to pack all the items, using as few boxes as possible, without placing more weight in any box than its capacity. For instance, if the items have weights 0.4, 0.4, 0.6, and 0.6, you can solve the problem with two boxes. This problem is difficult, and no efficient algorithm is known. Several strategies give good, but not optimal, packings. Write programs to implement efficiently the following approximation strategies.

a. Scan the items in the order given; place each new item in the most-filled box that can accept it without overflowing. Use a priority queue to determine the box that an item goes in.

b. Sort the items, placing the heaviest item first; then use the strategy in part (a).

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92475947
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question suppose that 2n letters each have the same

Question : Suppose that 2 n letters each have the same frequency k . Describe an optimal Huffman code, justifying your answer with Huffman's algorithm. In addition, describe its tree, compute the total number of bits req ...

Question suppose you are tasked with designing the security

Question : Suppose you are tasked with designing the security system for a new web browser that supports rendering web pages with embedded web page scripts. What checks would you need to implement to ensure that executin ...

Security and network discussion questionsa discuss the pros

Security and Network Discussion Questions a) Discuss the pros and cons of an organization regularly engaging in penetration testing. b) What are the motivations of the ethical hacker?

Nbspa senior collected data concerning the amount of time

A senior collected data concerning the amount of time students had to wait when adding or dropping courses at the beginning of the semester. The student then built a model of the behavior and experimented different strat ...

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

Question you are required to sort a file containing

Question : You are required to sort a file containing integers between 0 and 999999. You cannot afford to use one million pigeon-holes, so you decide instead to use one thousand pigeon-holes numbered from 0 to 999. You b ...

Assignment week 5 user acceptance testinguser acceptance

Assignment: Week 5 User Acceptance Testing User acceptance testing, or UAT, is a round of testing in which the users who are expected to use the system after it goes live exercise the system. UAT differs from quality ass ...

System analysis and design1 explain the difference between

System Analysis and Design 1) Explain the difference between too much feedback and too little feedback and provide a scenario for each one (two scenarios are needed - one for a lot of feedback and one for too much) and w ...

C programminghelp with a program positivec that include the

***C PROGRAMMING*** Help with a program positive.c that include the following function: void extract(int *a, int n, int *positive, int *size); The function should use pointer arithmetic, not subscripting. The extract fun ...

Step 1 pick a home appliance with significant user controls

Step 1: Pick a home appliance with significant user controls (e.g. Microwave, Stove/Range, Refrigerator, etc.). Do NOT select things like a TV remote control, computers, etc. Also do not select equipment that lack signif ...

  • 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