Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The constraints are as follows If you conduct a basic course in week x, then you get an instructor fee of bx > 0 dollars;

image text in transcribed

The constraints are as follows If you conduct a basic course in week x, then you get an instructor fee of bx > 0 dollars; if you conduct an advanced course, you get an instructor fee of ax > 0 dollars However, if you conduct an advance course in week x, you are required to spend a week for the course preparation. Therefore, you do not conduct any course in week x1 Consider a sequence of n weeks, you are given a choice of "basic," "advanced," or "none" for each of the n weeks, with the constraint that if "advanced" is chosen for week x > 1, then "none has to be chosen for week x-1. You are allowed to choose an advanced course to conduct in week 1. The total instructor fees that you earn for a duration of n weeks is determined as follows for each x, you add bx to your instruction fee if you choose "basic" in week x, and you add a to your instruction fee if you choose "advanced" in week x. You add 0 if you choose "none" in week Given sets of instructor fees b1, b2, , bn and al, az, , an, your task is tofind an optimal course selection that maximises the total instruction fee for a duration ofn weeks Week 1 S 1000 S 2000 Table 1 Week 2 $ 800 S 4000 Week 3 S 500 1000 Week 4 S 1000 S 800 al For example, Table l shows a 4-week courses and the corresponding instructor fees b1, b2, b3,b4 and a1, a2, ??, a4. The optimal selection would be "none" (week 1), "advanced" (week 2), "basic (week 3), and "basic" (week 4). The maximum total instruction fees would be 04000500 + 1000 5500 dollars. . Design an efficient algorithm that solves this problem. Your algorithm should output the selection for each week and the maximum total instruction fees. Write pseudocode of the algorithm. Analyse time efficiency of the algorithm . .Implement your designed algorithm in C/C++. Specify your assumptions, data structure used in the implementation

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions