Combinations with different number of repetitions

panos1712

New member
Joined
May 27, 2019
Messages
1
If we need to find how many combinations we can make from n items when we have r positions and allow repetition we can apply the following formula:
(r+n-1)!/(r!(n-1)!)

Is there any formula to calculate the number of combinations when the number of repetition for each item is limited? Namely, if we had 2 items s1 and s2 and We can use s1 x times and s2 y times. We have r positions how many combinations of those items We can make?

For example if s1 can be used 2 times ,s2 can be used 2 times as well and r = 2. The number of combinations is equal to 3 = {s1,s1} {s1, s2}, {s2,s2}
 
Suppose we want to use "#" in a selection from none to two times; "0" from one to four; "a" from none to three times; "z" from none to three times; but EACH selection must contain seven symbols. How many such selections are there?
Here are three examples: \(\displaystyle <0,\#,\#,a,a,a,z>,~<0,a,a,a,z,z,z>,~\&~<0,0,0,0,a,z,\#> \) note that zero most be present at least once.
So how many seven symbols selections with the given restrictions are there. well: Look at this EXPANSION.
See the term \(\displaystyle 34x^7\), it tells us that there are thirty-four possible selections.
Now \(\displaystyle <0,\#,\#,a,a,a,z>\) is just one of them which can be arranged into \(\displaystyle \frac{7!}{(3!)(2!)}=420\) different strings.
 
Top