Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
spx2,
Would you mind coding up a complete example? I ask because I haven't used Bit::Vector that much and don't immediately see how it could be used to accomplish this task. I solved this problem a long time ago but am always interested in seeing how abstraction modules can make my life easier. Keep in mind that the goal would be to have a known set ( say 'A' .. 'Z') and a known subset size (say 5). Then, given a valid subset of the specified size (say AMTXZ), determine if that subset has been "seen" before. If not, perform some action and then mark it as being "seen". Here is some starter code to give you an idea of what I have already accomplished:
Keep in mind that @set, @subset_size and @subset are all subject to change - so it has to be a general purpose solution. Cheers - L~R In reply to Re^2: Algorithm to convert combinations to bitstring
by Limbic~Region
|
|