Question

dynamic program ship tas port each ship tke hom ber of conterns and the oe iejd o P tes candems ust be less thn W. the lar vave of carlems Cewherns Valk 12- 3 40 3 lo 60 hole : the weigt increace by lo ?urile the Condition to end optimal sout ion? 2 find the optine) ? ww? uniny time?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Let's calculate the effective profit first

P1= 12/40 = 0.3

P2= 3/20 = 0.15

P3= 4/10= 0.4

P4= 20/60= 0.333

First, we will pick the most profitable item

that is P3

but we can see any combination of P1 P2 and P3 won't be as effective as if P4 is selected alone

so P4 with the value 20 will be loaded

The optimal solution is P4 with the value 20

The running time is O(n^2)

If W= 70

then the optimal solution will be

P4, and P3, with the value 20+4 = 24

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Add a comment
Know the answer?
Add Answer to:
dynamic program ship tas port each ship tke hom ber of conterns and the oe iejd...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT