Supermarket
链接
Description
A supermarket has a set Prod of products on sale. It earns a profit p x p_x px for each product x ∈ P r o d x \in Prod x∈Prod sold by a deadline d x d_x dx that is measured as an integral number of time units starting from the moment the sale begins. Each product takes precisely one unit of time for being sold. A selling schedule is an ordered subset of products S e l l ≤ P r o d Sell \leq Prod Sell≤Prod such that the selling of each product x ∈ S e l l x \in Sell x∈Sell, according to the ordering of Sell, completes before the deadline dx or just when dx expires. The profit of the selling schedule is P r o f i t ( S e l l ) = ∑ x ∈ S e l l p x Profit(Sell)=\sum_{x∈Sell} px Profit(Sell)=∑x∈Sellpx. An optimal selling schedule is a schedule with a maximum profit.
For example, consider the products P r o d = { a , b , c , d } Prod=\left\{a,b,c,d\right\} Prod={ a,b,