How many combinations of 2 letters are there?
Let us first define a combination and a permutation. Say we have
5 letters and we want to pick two at a time. First let's say the
order matters and we allow repetition.
There are 5 letters and we have 5 choices for the first letter
and then 5 choices for the second. The total choices is 5x5 or 52.
In general if we have n objects and we are picking r of them and
allowing for repetition, then there are nr ways to do that.
Remember that the order matters here.
If we don't allow for repetitions, then we have n! divided by
(n-r)! where ! means factorial. For example, 3! means simply 3x2x1
and 5! means 5x4x3x2x1.
So in the case of the 5 letters taken two at a time where order
matters we have
5!/((5-2)! which is 5x4x3x2x1 divided by 3x2x1. Cancel out the
3x2x1 and you are left with
5x4 or 20.
There is no need to remember this formula, just remember there
are 5 choices for the first letter, but whatever you pick for the
first one, you can't use that one again so there are 4 choices for
the second. The total is given by the multiplication rule and we
have 5x4=20.
In the case of the entire alphabet with 26 letters, if we allow
repetitions, we have 262 permutations. There are 26 choices for the
first letter and 26 for the second.
But if we don't allow repetitions, there are 26x25
permutations.
Now combination is the same thing, but order does not matter. So
AB is the same as BA.
Let's just worry about either lower case or upper case letters
first. Forget about things like Ab or cB for now. Only combinations
we are looking at are like ab or AB, but NOT aB.
First let's talk about combinations where we don't allow
repeats. This is much easier to understand. I will leave
combinations with repetitions for last. So AB is OK, but not
AA.
When we figures out how many permutations there were without
repeats, we found that if we are taking r objects taken from n of
them, we had n!/(n-r)!. Now since ab is the same as ba, for
example, if we know how many permutations we have of two letters
taken from the alphabet, we could just divide that by 2. This is
because ever time we have something like dc and CD, they are the
same as a combination since order no longer matters.
So in general we have n!/(n-r)! now divide by r! since if you
have r items the number of ways to arrange all r of them is r!. For
example, say you pick 5 letters out of the alphabet instead of 2,
then there would be 26!/(26-5)! permutations, but each one of the 5
letter permutations can be arranged in 5! ways. For example, 5
choices for the first letter, 4 for the second, 3 for the third
etc, which is 5!.
So the final formula for finding how many combinations of r
items you have if you take the r of them from a total of n items (
such as 5 letters from 26) is n!/(n-r)!r!.
This is usually written nCr.
Now combinations with repetitions is the toughest one to see.
This problem did not say if you have repeats or not. So the answer
to the problem using ONLY lower or ONLY upper case an allowing no
repeats is 26!/24!2!=325. If you allow upper and lower case
letters, think of the the upper and lower case as totally separate
things. So your alphabet now has
52 objects and the solutions becomes 52x51/2=1326
Now let's say we allow repetitions of the letters. So AA is ok
for example. So we are looking at combinations so order does not
matter and we allow repetitions.
Here is one common way to see this that is taught in many stats
classes.
The method is commonly called bars and stars. Say we have n
objects. Lets say 5.
Write down 5-1 or 4 vertical bars. In the case of n, draw n-1
vertical bars.
The 4 vertical bars look like this: | | | | you can see how they
create 5 spaces from left to write. I will label the space in case
you don't see it. 1| 2 |3 | 4 |5 where 1 is the first space etc.
Now put stars in each space. The number or stars can be anything
from 0 ( no stars) to r where you are picking r objects from n.
BUT, the total number of stars is r. So for example is I pick 5
letters out of 26 and allow repetitions and only worry about
combinations, then I have 25 bars and 5 stars. If I put all 5 stars
in the first space, I am done. If I put 2 in the first space, I
have 3 more to put anywhere I want.
Here is an example you can see: Example: n=3, r=5,
* | * | *** -> 1 object of type 1, 1 of type 2, 3 of type
3
| * | **** -> zero objects of type 1, 1 object of type 2, 4
objects of type 3.
Now, the number of combinations using bars and stars is equal to
the number of rows of n-1 bars and r stars. The total number of
bars and stars is n+r, then subtract 1 since we have n-1 bars. So
we have n+r-1 items (bars and stars combined) and we are selecting
the locations of the r stars out of the n+r-1 locations. The order
does not matter. Therefore, the number of such rows is C(n+r-1,r),
and this is also the number of combinations with repetitions
allowed. It might be hard to remember unless you think of n-1 bars
plus r stars is n+r-1 and you are finding where to place the r
stars, but it does not matter which space they go in.
So in the case of 2 letter combinations taken from 26 letters
and allowing repetitions, we have C(26+2-1,2) or C(27,2) This is
27x26/2=351 The general formula for this comes from just plugging
the n+r-1 chose r into the formula for combinations.
This is just considering upper or lower case letters. Now how
many combinations are there if you use both? I will leave that one
for you!
In this question, the issue of repititions is now mentioned and
upper or lower case is not noted either. In math we need precision,
so the questions does not have a unique answer without that
information.