Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Priya has already started to plan a schedule for studying for finals. There arenhours left before Priya's first final, and Priya can study during any...

Priya has already started to plan a schedule for studying for finals. There are n hours left before Priya's first final, and Priya can study during any of those hours. However, before each hour of studying, Priya needs to first spend b hours procrastinating.

For example, if n = 5 and b = 1, then Priya has 5 hours to study, and needs to procrastinate for 1 hour before studying for 1 hour. Possible options include, studying for the third and fifth hour, studying for the second hour only, or not studying at all.

  1. Let B[n] be the number of possible schedules for the first n hours. It is needed to provide explanation a recurrence relation for B[n] and to write explicitly the base case.
  2. (Hint: At each hour n Priya can either study or not study. For each option, consider how she can spend her time before hour n.)
  3. What is algorithm that runs in time O(n) to compute the total number of study schedules for Priya.
  4. Depending on the hour, Priya might gain more utility from studying. In particular, assume that by studying in hour i, Priya will get p[i] more points on her final.
  5. Let C[n] be the maximum number of points Priya will get on her final if she only studies in the first n hours. It is needed to provide explanation a recurrence relation for C[n] and write explicitly the base case.
  6. It is needed to provide algorithm that prints the hours that Priya should study so that she can get the maximum number of points on her final.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question