Combinations / Sets of objects

  • Context: MHB 
  • Thread starter Thread starter arno100
  • Start date Start date
  • Tags Tags
    Combinations Sets
Click For Summary
SUMMARY

The discussion focuses on generating combinations of objects from a set, specifically using the example set {Apple, Pear, Orange}. The user seeks online generators or resources to create unique combinations without repetition. A key formula mentioned is 2^n, where n represents the number of elements in the set, which also accounts for the empty set. The importance of avoiding duplicate combinations, such as Apple, Orange and Orange, Apple, is emphasized.

PREREQUISITES
  • Understanding of combinatorial mathematics
  • Familiarity with the concept of sets
  • Basic programming skills for implementing combination algorithms
  • Knowledge of online tools or libraries for generating combinations
NEXT STEPS
  • Research algorithms for generating combinations in Python using itertools
  • Explore online combination generators like Combinatorics Calculator
  • Learn about the mathematical principles behind combinatorial generation
  • Investigate JavaScript libraries for generating combinations, such as lodash
USEFUL FOR

This discussion is beneficial for software developers, mathematicians, and anyone interested in combinatorial algorithms or needing to generate unique combinations of items in programming or data analysis.

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
 
Physics 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 14 ·
Replies
14
Views
2K
  • · Replies 5 ·
Replies
5
Views
17K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 3 ·
Replies
3
Views
18K