Question: List of forms of expression under combination of its variables


Suppose I have a triplet a[5], a[6], a[7]and an expression given as below:

V[5]*a[5]+V[6]*a[6]+V[7]*a[7]+V[2]+V[9]

How I can list all possible forms of above expression for triplet "(a[5], a[6], a[7])->(a[5], a[6], a[7]), (a[5], a[6], 0), (a[5], 0, a[7]), (0, a[6], a[7]), (a[5], 0, 0), (0, a[6], 0 ), (0, 0, a[7]), (0, a[6], 0), (0, 0, 0) "etc


Download triplet.mw

Regards

Please Wait...