I'm trying to figure out the formula I need...(adsbygoogle = window.adsbygoogle || []).push({});

ok, say that r=5, so there are 5 items {A,B,C,D,E}

And we want to chose 5 of those

Order doesn't matter, repitions allowed

so for example {A,A,A,B,B} is a feasible solution

{A,B,C,D,E} is feasible

so on

But the formula (n+r-1)!/r!(n-1)! doesn't work because here n=r so it becomes (2n-1)!/(2n-1)! = 1.

Also, what happens when I want to put certain restrictions. Like for example, say I want an example of the above format with the exception that A and B can only be chosen if C is chosen. I know I would just find all those infeasible solutions and subtract them but I have a hard time finding those infeasibles. I mean, that situation seems obviosu but what if it has to do with ranking. Like say, A chosen --> B,C,D,E, are chosen. B chosen --> C,D,E chosen. D chosen --> E chosen. So what if there are n such rules. Do I make a case for each individually?

I suck at these stupid things

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Combinations - order doesn't matter, repetitions allowed

Loading...

Similar Threads for Combinations order doesn't |
---|

B Combinations of n elements in pairs |

I Combinatorics & probability density |

I A specific combination problem |

I Combination of Non Adjacent Numbers |

B Arranging blocks so that they fit together |

**Physics Forums | Science Articles, Homework Help, Discussion**