This problem is to obtain the maximum amount of fun Bessie can have when riding a roller coaster without getting sick, in which case without exceeding her dizziness limit.
The constraints of the problem include:
a. The roller coaster has a distinct number of sections that Bessie rides in order.
b. Bessie’s fun and dizziness levels are both at 0 at the beginning of the ride.
c. For each section, Bessie has two options either to keeps her eyes open or close and she must keep them that way for the whole section.
d. At any section, when Bessie keeps her eyes open, her total dizziness increases by a dizziness factor and her total fun also increases by a fun factor. *
e. At any section, when Bessie keeps her eyes …show more content…
Now, we want to get the maximum total fun she could have without making her too dizzy (maximum total fun = maximum total value in her sack) (limit of dizziness = weight limit for the sack).
The key idea to solve this problem is by adapting the Knapsack solution in which total amount of dizziness as the total weight she carries in her sack without exceeding the given limit and maximum fun as the maximum total value carries in that sack. To obtain the most optimal solution, we have to select the most maximum of total fun. However, in selecting the maximum total fun, we need to consider the total amount of dizziness because if it exceeds the limit, Bessie will get sick and thus we should avoid it.
Furthermore, this problem is tied with another tricky constraints in which it affected the dizziness level and fun level at each distinct section, in which case Bessie has two options either to open or close her eyes during riding that roller coaster (in Knapsack problem, whether an item is in the sack or not). If she keeps her eyes open, both dizziness and fun level will increase. Meanwhile, if she keeps her eyes close, her fun level will remain the same as with the previous section, but her dizziness level will …show more content…
The first condition fails because Bessie’s dizziness level exceeds her limit even though she got so much fun.
Eyes’ Condition Level of Fun Dizziness Initial 0 0
Open Section 1 2 1 0 + 2 = 2 0 + 1 = 1
Open Section 2 3 1 2 + 3 = 5 1 + 2 = 3
Open Section 3 5 2 5 + 5 = 10 3 + 2 = 5
Table 2 First condition
The second condition also fails because her dizziness level exceeds her limit.
Eyes’ Condition Level of Fun Dizziness Initial 0 0
Close Section 1 2 1 0 0
Open Section 2 3 1 0 + 3 = 3 0 + 1 = 1
Open Section 3 5 2 3 + 5 = 8 1 + 2 = 3
Table 3 Second condition
The third condition is a success because of her dizziness level does not exceed her limit and she got so much fun.
Eyes’ Condition Level of Fun Dizziness Initial 0 0
Open Section 1 2 1 0 + 2 = 2 0 + 1 = 1
Close Section 2 3 1 2 1 – 1 = 0
Open Section 3 5 2 5 + 2 = 7 0 + 2 = 2 Table 4 Third condition
Even though this condition can be considered as a success because of Bessie’s dizziness level does not exceed her limit but the fun she got is not much.
Eyes’ Condition Level of Fun Dizziness Initial 0 0
Open Section 1 2 1 0 + 2 = 2 0 + 1 = 1
Open Section 2 3 1 2 + 3 = 5 1 + 1 =