I need the answer for high level for this question, if you answer too short and not by detail, please skip this question
Posted: Tue May 24, 2022 7:56 am
I need the answer for high level for this question, if
you answer too short and not by detail, please skip this
question
You have a long trip and stop at n hotels, assum the value of hotel like V₁,....,Vn. We want to go a set of hotel for max total value, but cause of some problems so I just skip 3 hotel in row. a) Is first hotel that I skip in the first, or the second or the third? Give simple backtracking style algorithm for that. b) for your algorithm, identify sub problem? c) for your algorithm above, identify base case of sub problem and what is formula value of that? d) time analysis for our dynamic program algorithim? e) for example v[1,...,8] = 3, 7, 6, 6, 3, 15, 8, 10 give the array matrix algorithm produces on that?
you answer too short and not by detail, please skip this
question
You have a long trip and stop at n hotels, assum the value of hotel like V₁,....,Vn. We want to go a set of hotel for max total value, but cause of some problems so I just skip 3 hotel in row. a) Is first hotel that I skip in the first, or the second or the third? Give simple backtracking style algorithm for that. b) for your algorithm, identify sub problem? c) for your algorithm above, identify base case of sub problem and what is formula value of that? d) time analysis for our dynamic program algorithim? e) for example v[1,...,8] = 3, 7, 6, 6, 3, 15, 8, 10 give the array matrix algorithm produces on that?