MHB Combinations / Sets of objects

  • Thread starter Thread starter arno100
  • Start date Start date
  • Tags Tags
    Combinations Sets
Click For Summary
A solution is sought for generating unique combinations from a set of objects, such as {Apple, Pear, Orange}. The expected output includes all possible combinations without repetition, like Apple, Pear and Apple, Orange. The formula for calculating the total combinations is 2^n, where n is the number of elements in the set, although this also includes the empty set. Suggestions for online generators or resources to understand this concept better are requested. The discussion highlights the importance of ensuring combinations do not repeat in different orders.
arno100
Messages
1
Reaction score
0
Hi,

I am looking for a solution that generates combinations of objects from a series of objects in a set. For example, {Apple, Pear, Orange} should bring back
Apple
Pear
Orange
Apple, Pear
Apple, Pear, Orange,
Apple, Orange
...

Items in the series should not repeat (i.e. Apple, Orange / Orange, Apple should only appear once). Any online generators anybody can suggest? Or, material I can use to figure this out?

Many thanks
 
Mathematics news on Phys.org
You forgot "Pear, Orange", the formula is 2^n with n is the number of elements in the set. Beware that 2^n also includes an empty set.
 

Similar threads

Replies
5
Views
17K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
Replies
4
Views
5K