Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
yes, f representation matter. lets simply assume it is continuous function and the number of sub-interval is fixed. actually I think that the problem can be thought as the knapsack problem in sense that we have k sub-intervals each with length and value of sub integral or as cost limited set cover problem in sense we have k subsets each with cost equals its length and want maximize coverage. However, I need to know more about the problem and if there is study about it.