Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are hired to do quality control at a distribution warehouse. Your job is to inspect boxes before they go on a truck to make

You are hired to do quality control at a distribution warehouse. Your job is to inspect boxes before they go on a truck to make sure the box contains all the correct items. However, the boxes will arrive at the truck too fast for you to inspect them all. There will be n boxes loaded today, and you know the order that each box will arrive at the truck. Each box i has a value vi (the cost of the goods in the box), and a size: small, medium, or large. If you inspect a small box, then the next box to arrive will be loaded on the truck uninspected. If you inspect a medium size box, then the next two boxes that arrive will be loaded on the truck uninspected. If you inspect a large box, then the next ten boxes that arrive will be loaded on the truck uninspected. You want to know which boxes you should inspect in order to maximize the total value of the inspected boxes.

This problem MUST export the LIST OF SELECTED BOXES not just the maximum value.

Please provide FULL PYTHON PSEUDOCODE.

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_2

Step: 3

blur-text-image_3

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

The World Wide Web And Databases International Workshop Webdb 98 Valencia Spain March 27 28 1998 Selected Papers Lncs 1590

Authors: Paolo Atzeni ,Alberto Mendelzon ,Giansalvatore Mecca

1st Edition

3540658904, 978-3540658900

More Books

Students also viewed these Databases questions