Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: Faster alternative to Math::Combinatorics

by Laurent_R (Canon)
on Sep 01, 2017 at 17:40 UTC ( [id://1198540]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Faster alternative to Math::Combinatorics
in thread Faster alternative to Math::Combinatorics

If I understand you well, I think a selection of items from a set where the selection order is irrelevant is called a combination. See https://en.wikipedia.org/wiki/Combination. Note that combinations can be with or without repetitions.

Perhaps using this term might help you searching the Internet for algorithms.

  • Comment on Re^5: Faster alternative to Math::Combinatorics

Replies are listed 'Best First'.
Re^6: Faster alternative to Math::Combinatorics
by AppleFritter (Vicar) on Sep 01, 2017 at 18:27 UTC

    Ah, yes, thanks. Wikipedia writes:

    A k-combination with repetitions, or k-multicombination, or multisubset of size k from a set S is given by a sequence of k not necessarily distinct elements of S, where order is not taken into account: two sequences of which one can be obtained from the other by permuting the terms define the same multiset. In other words, the number of ways to sample k elements from a set of n elements allowing for duplicates (i.e., with replacement) but disregarding different orderings (e.g. {2,1,2} = {1,2,2}).

    So it seems that they're called "multicombinations" or "multisubsets", and I wasn't too far off the mark when talking about multisets.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198540]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-24 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found