Singular Manual: multidimensional_knapsack

| #### D.12.2.46 multidimensional_knapsack Procedure from library `crypto.lib` (see crypto_lib). Usage: multidimensional_knapsack(m,capacities,profits) Return: binary list of the positions of the elements included in the optimal selection Example:
    LIB "crypto.lib";
    ring r = 0,x,lp;
    matrix m[3][3] = 1,4,10,7,8,3,1,9,7;
    list c = 12,17,10;
    list p = 3,2,5;
    multidimensional_knapsack(m,c,p);
    ==> [1]:
    ==>    1
    ==> [2]:
    ==>    0
    ==> [3]:
    ==>    1

User manual for Singular version 4.4.1, 2025, generated by texi2html.