in reply to Re: Combinations of a set of elements
in thread Combinations of a set of elements

This will have a problem, if the set is ("a", "a", "a", "a", "b"), then you will repeat combinations unnecessarily.
  • Comment on Re: Re: Combinations of a set of elements

Replies are listed 'Best First'.
Re: Re: Re: Combinations of a set of elements
by sauoq (Abbot) on Nov 13, 2002 at 21:23 UTC

    Sets, by definition, don't have duplicate elements.

    Collections which permit duplicate elements are known as "bags" or "multisets."

    -sauoq
    "My two cents aren't worth a dime.";
    
Re: Re: Re: Combinations of a set of elements
by dreadpiratepeter (Priest) on Nov 13, 2002 at 21:07 UTC
    Maybe not. It depends on whether the duplicates are significant or not. That wasn't specified in the question.

    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."