| #### D.12.2.62 three_elements Procedure from library `crypto.lib` (see crypto_lib). Usage: three_elements(out, iterations) Return: Injective_knapsack created with the three elements method Example:
    LIB "crypto.lib";
    //this is fix-injective because 17=10+2+4+1 with different numbers of addens.
    list super_increasing = 1,2,4,10,20;
    list a = three_elements(super_increasing,2);
    a;
    ==> [1]:
    ==>    1529
    ==> [2]:
    ==>    1147
    ==> [3]:
    ==>    764
    ==> [4]:
    ==>    153
    ==> [5]:
    ==>    115
    ==> [6]:
    ==>    76
    ==> [7]:
    ==>    20
    ==> [8]:
    ==>    10
    ==> [9]:
    ==>    4
    ==> [10]:
    ==>    2
    ==> [11]:
    ==>    1
    set_is_injective(a);
    ==> 1

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