in reply to finding tuples

I would try dividing the letters in buckets( like AADEFFVV -> {A=>2,D=>1,E=>1,F=>2,V=>2} and then try to make the maximum combinations, if I get it right, the maximum for a given string is its length/4 so my string here has a maximum of 2 sets, then, with this upper bound in mind I would try make 2 sets, if I can't, try 1 and on..until I find a combination that works and this one will be for sure the maximum possible for this string.

Replies are listed 'Best First'.
Re^2: finding tuples
by Anonymous Monk on Jun 24, 2009 at 12:36 UTC

    That's not helpful, I already wrote that I tried bruteforcing and that takes too long for the larger sets.

      its not exactly a bruteforce, but it can't have a straight answer either. any algorithm that solve this kind of problem will use heuristics, you can't do better than this. here is my try, didn't tried my algorithm against the others, don't know which is faster, anyway