Bags of marbles combination/permutation problem

  • Context: Undergrad 
  • Thread starter Thread starter Aztral
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on calculating the number of permutations of marbles from multiple bags, specifically when allowing for the duplication of a limited number of marbles. Given three bags with unique marbles, the total permutations without duplication is calculated as the product of the number of marbles in each bag (n1 * n2 * n3). When one marble is allowed to be duplicated, the permutations must be adjusted to avoid repeating combinations that exceed the duplication limit. The example provided illustrates the complexity of managing duplicates while maintaining unique selections from each bag.

PREREQUISITES
  • Understanding of combinatorial mathematics
  • Familiarity with permutations and combinations
  • Basic programming skills for implementing algorithms
  • Knowledge of set theory to manage unique selections
NEXT STEPS
  • Study combinatorial algorithms for generating permutations
  • Learn about backtracking techniques for constraint satisfaction problems
  • Explore programming libraries for combinatorial generation, such as Python's itertools
  • Research advanced counting techniques in combinatorics
USEFUL FOR

Mathematicians, computer scientists, and students tackling combinatorial problems, particularly those interested in algorithm design and optimization in scenarios involving unique selections and constraints.

Aztral
Messages
15
Reaction score
0
Okie. Here goes...

Let's say you have B bags of marbles B1, B2,...Bb (all marbles are unique);
The number of marbles in each bag varies. B1 has n1 marbles, B2 has n2 marbles, etc.

You want to to create a sequences of B marbles
{marble1, marble2,...marbleb}, where marble1 came from B1, marble2 from B2, etc.

The total number of permutations is n1*n2*...nb.

But...suppose you now only allow m marbles in each permutation to be duplicated.

//////////////////Question:How many permutations are there now?//////////////////////



Ex: You have 3 bags of marbles.
B1 {red,green,blue}, n1 = 3;
B2 {white,black}, n2 = 2;
B3 {silver,gold}, n3 = 2;

I will only allow 1 marble to be duplicated, so

{red,white,silver}
{red,black,gold}
{green,white,gold}
{green,black,silver}

Can't use blue now because the options would be...
{blue,white,gold}// { x, white, gold} was used in {green,white,gold} so would have 2 duplicated marbles
{blue,white,silver}// { x, white, silver} was used in {red,white,silver} so would have 2 duplicated marbles
{blue,black,gold}// { x, black,gold} was used in {red,black,gold} so would have 2 duplicated marbles
{blue,black,silver}// { x, black, silver} was used in {green,black,silver} so would have 2 duplicated marbles



Any help would be appreciated.

Thx! :)
 
Last edited:
Physics news on Phys.org
Try to figure it out for your small example and then generalize it for your homework problem.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 16 ·
Replies
16
Views
10K