Advanced Functional Prog.


Packages' Builder

E. Application

  1. All the defined programs can now be used to attain the objective of the exercise.
    a. compute all the possible combination of products (power)
    b. keep the ones whose the total weigth is inferior to wmax=1.0 (filter/sum). This defines the set of possible packages.
    c. compute all the possible combination of packages (power)
    d. keep the ones such as all the elements of a set of packages are disjoint (allDisjoint) and they correspond to the set of products (bigUnion/equal).
    e. finally, define a function that returns from the preceding result the one having the minimum size.

answers