Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started