Is a Knapsack Problem with only Color Constraints NP-Complete? I have a knapsack problem that has been frustrating me for weeks, in which we consider a set of n items, described by their integer value, and being of one of C colors.

There exists a constraint on the number of different colors of objects in the knapsack (but no "weight" constraint), and the goal is to maximize the value of the knapsack.

It's basically the same setting as in this model http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.22.9533&amp;rep=rep1&amp;type=pdf except that there is only one knapsack and the items are "weightless".

Is this problem hard, easy, yet to be classified? I would really appreciate any pointers. Please and thank you in advance.
So, items have only 2 parameters:


Color. I assume that each item has one color ("one of C colors"). If not, this problem is probably $\mathsf{NP}$-hard.
Price.


Now we need to pack a knapsack to maximize the price. Knapsack can have at most $k$ colors.

Algorithm:


For each color count the total price of items that are colored by color $C_i$. Call these values $P_i$. Takes linear time.
Find $k$ maximal values of $P$. Takes polynomial (linear?) time. Can be done using sorting.


This is the answer.