Question: Code this into Python please 2. (20 pts) Now, consider the following practical problem. Suppose that you're in charge of picking a set of experiments

Code this into Python please 2. (20 pts) Now, consider the followingCode this into Python please

2. (20 pts) Now, consider the following practical problem. Suppose that you're in charge of picking a set of experiments to be launched into space. Each experiment has an ID number, an associated equipment mass in kilograms, and a "value rating" that approximates how important to science the collected data will be. The following table lists the set E of all experiments ID# Experiment Title How rats behave in the absence of oxygen Solar radiation study X-ray observator Solar flare observation device Low-gravity bear wrestling gear CLASSIFIED TOP SECRET Solid propellant behavior in microgravity Cloaking field generator Prototvpe handheld stun phaser Laminar fluid flow study Low Earth orbit race of African vs. European swallows Hyper-efficient RCS thruster Mass (kg)Value Rating 36 264 188 203 104 4. 92 65 25 170 80 10 12 Unfortunately, not all of the experiments can be flown due to mass constraints - there's only 700 kg of payload available for the experiments. Launching stuff into orbit is expensive! Thus, the challenge is to pick the subset of E whose elements have the highest possible combined value rating but at the same time have a combined mass of 700 kg or less One way to solve this problem is to use a "brute force" approach. Consider ALL subsets of E. For each subset determine its overall mass and value rating. Keep track of the highest-valuc subsct with a combined mass of 700 or less. Once all the subsets are considered, this highest-value subset will be the one that you want to fly! Write a program that uses your function from #1 and the brute force technique to find and display the optimal solution. Which experiments should be chosen? What is the total mass and value rating of the optimal solution? Even though it works fine for this problem, why would this brute force approach be terribly inefficient if you had a large number of experiments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!