I have to find a cost optimal solution for staying on campsites.
It is kind of weigthed interval scheduling with a given number of intervals (nights).
I wonder how to tackle it, dynamic programmic will work for cost optimizatation gernerally but how to build in the restriction on the number of intervalls?
katisss
0
Newbie Poster
Recommended Answers
Jump to PostNot sure what the issue is. Just limit the dynamic method to n items in the proposed solution. If it's over n, you reject it as a failed solution.
Jump to PostStill not getting the problem. Set up your dynamic solver. Have it run. If it ever gets to a solution that has more than n parts, reject that as a solution. If it ever gets to a point where there are no more choices and it is less than n, …
All 8 Replies
katisss
0
Newbie Poster
Momerath
1,327
Nearly a Senior Poster
Featured Poster
katisss
0
Newbie Poster
Momerath
1,327
Nearly a Senior Poster
Featured Poster
katisss
0
Newbie Poster
katisss
0
Newbie Poster
katisss
0
Newbie Poster
katisss
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.