Proving a set of requirements can be met with a set of values using LINQ
This is a subset of the question posted here . Given a set of buckets of volume B={x1, x2, ..., xn} and a set of vials with liquid of volumes V={v1, v2, ..., vn } what is the best way to prove that the number of buckets can be filled with the contents of the vials assuming that vials must be poured all into one bucket. Overflow is permitted. Some obvious invariants here are that the cardinality of the buckets |B| must be less than or equal to the cardinality of the vials |V| and that the combined volume of the buckets Sum(B) must be less than or equal to the combined volume of the vials Sum(V)