Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You want to choose n classes for your next semester, for which you know the amount of hours (between 1 and 10) you will need

image text in transcribed
You want to choose n classes for your next semester, for which you know the amount of hours (between 1 and 10) you will need to spend on the class every week and the number of credits (between 1 and 3) you will earn after taking it all integers). You also calculated the "learning" number for each class, that represents how much you will learn in the course based on previous courses you have taken. Considering you want to work for at most 40 hours a week, and want to maximize the number of credits you can take in the semester, among all the course selections that maximize credit and have no more than 40 hours of work per week, you would like to choose one that maximizes "learning" for you. Solve for O(n) time using Dynamic programming with following steps: 1) Describe algorithm 2) Proof of correctness for algorithm 3) Running time of algorithm

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

Step: 3

blur-text-image

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

2. What do you believe is at the root of the problem?

Answered: 1 week ago