Hi everyone
Lets say I have these two lists
v = {31,39,39,39,41,39,43,45,45}
t = {{2,3,26},{2,18,19},{3,14,22},{4,12,23},{6,13,22},{7,8,24},{8,15,20},{12,16,17},{13,14,18}}
The numbers in list v are the totals of the triples in list t in corresponding order. I am wanting to extract from 't' only those sets of 3 that have multiple occurances in v, so I would wish to extract from t;- {{2,18,19},{3,14,22},{4,12,23},{7,8,24}, and {12,16,17},{13,14,18}}
I have tried using Select with no success, the closest I get is using Cases but with undesired results. For example
Cases[t, {a_, b_, c_} -> Total[a + b + c] == 39]
gives me this
{False, True, True, True, False, True, False, False, False}
Any help would be appreciated
Paul.