the MISSISSIPPI problem - 5 letter word and 6 letter word with constraints 1) Number of ways of selecting 5 letters such that 3 are alike of one type and 2 are alike of another type.
There are only 2 ways of selecting 3 letters of the same type i.e., III or SSS. Now with each of these 2, we can create 2 combinations of either 2S or 2P in the former and 2I or 2P in the latter case. This way, I know there are only 4 possibilities. But what if the number of S's and such repetitions are huge in number ? I want to know a formula (with an explanation please!).
2) My second problem is as follows: This is also simple but I need a formula:
Number of ways of selecting 6 letters out of the word MISSISSIPPI with exactly 2 different 'like pairs'. 
I can list out all the pairs: 
(SSSS   II),
 (SSS    III),
 (SSSS   PP),
 (IIII   SS),
 (IIII   PP),
 (III    SSS)  (neglect this because this is already done)
 (II     SSSS) (already there)
So, in all 5 such possibilities are there. Am I correct ? Please correct me if I am wrong here itself! :-) Ok, even if this is correct, how to arrive at this with a formula i.e., mathematically ?
Please help!
Thanks!!
kris
 A: 
Number of ways of selecting $5$ letters out of the word MISSISSIPPI such that $3$ are alike of one type and $2$ are alike of another type.

There are two ways of choosing the letter that appears three times since it must be an I or an S.  Once it has been selected, there are two ways of choosing the letter that appears twice since it must be an I, P, or S and cannot be the letter that has been selected to appear three times.  Once the two letters that appear in the word have been selected, the word is completely determined by selecting which three of the five places are filled with the letter that appears three times.
$$2 \cdot 2 \cdot \binom{5}{3}$$

Number of ways of selecting $6$ letters out of the word MISSISSIPPI with exactly $2$ different 'like pairs.'

There are three letters which could appear twice, namely I, S, or P.  We select two of those three to appear twice.  Whichever of those three letters that is not selected to appear twice appears once, as does M.  Thus, if we are looking for a six letter multiset that contains exactly two like pairs, there are $\binom{3}{2} = 3$.  They are 
$$\{2 \cdot I, 1 \cdot M, 2 \cdot P, 1 \cdot S\}, \{2 \cdot I, 1 \cdot M, 1 \cdot P, 2 \cdot S\}, \{1 \cdot I, 1 \cdot M, 2 \cdot P, 2 \cdot S\}$$
If you meant how many words of length six contain exactly two like pairs, after we choose the two repeated letters, we must select two of the six places for the repeated letter that appears first alphabetically, two of the remaining four places for the other repeated letter, one of the two places for whichever of the two singletons appears first alphabetically, and fill the remaining spot with the remaining singleton.
$$\binom{3}{2}\binom{6}{2}\binom{4}{2}\binom{2}{1}\binom{1}{1}$$   
